Skip to content

LevrikM/mafia2-launcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

English | Русский

Mafia II Online - Custom Launcher + Website

Atmospheric launcher and website for the "Mafia II Online" RP project

Launcher main screen

Electron Node.js HTML5 CSS3 JavaScript


πŸš€ About The Project

This repository contains the code for a custom launcher built with Electron and a simple backend website for it. The launcher was developed from scratch in the style of Mafia II and includes all the necessary functionality for an RP project.

🌟 Key Features

  • Dynamic News: The launcher loads news and version lists directly from the connected website (/site/api/news.json).
  • Version Check: Automatically compares the local game version with the latest version on the server and prompts to "Update".
  • Game "Installation": Includes installation logic: folder selection, "downloading" with a progress bar, and saving the path.
  • Settings Panel:
    • Change game path.
    • Checkbox "Close launcher on game start".
    • Field for custom launch parameters (e.g., -windowed).
    • Full settings reset with a reload.
  • Custom Design: The entire interface, including the window frame, buttons (minimize, close), and scrollbar, is styled to match the Mafia II atmosphere.

πŸ› οΈ Technologies Used

  • Electron: To create a desktop application using web technologies.
  • Node.js (fs, path, net): For working with the file system (saving settings) and network (loading news).
  • HTML5 / CSS3 / JavaScript: For the entire interface and logic.

Electron Node.js HTML5 CSS3 JavaScript


πŸ“¦ Installation and Launch

The project is divided into two parts: /launcher (the application itself) and /site (the website for news).

1. Running the Website (Backend)

The site is static, but to load news.json via http:// (instead of file://), it needs to be served through a local server.

  1. Install serve (if you don't have it):
    npm install -g serve
  2. Run the server from the project root folder:
    serve
    After this, the site will be available at http://localhost:3000 (or similar), and the news API at http://localhost:3000/site/api/news.json.

2. Running the Launcher (Development)

  1. Navigate to the launcher directory:
    cd launcher
  2. Install dependencies:
    npm install
  3. Run the launcher in development mode:
    npm start

3. Building the Launcher (Creating .exe)

The project uses Electron Forge to automatically build the application into an .exe installer.

  1. Icon: Ensure the icon.ico file is present in the /launcher directory. It will be automatically used for the .exe file and the installer (configuration is already in package.json).

  2. Run the command in the terminal (in the /launcher directory):

    npm run make
  3. The finished installer will be located in the folder:

    /launcher/out/make/nsis/x64/
    

πŸ–ΌοΈ Gallery

Launcher Interface

News
News Feed
Update Prompt
Version Check
Installation Progress
Progress Bar
Settings Panel
Settings

Website Interface

Website Home
Home Page
Community Page
Community (Dossier & Gallery)
Rules Page
Rules
How to Play Page
How to Start
Website News Feed
News Feed (Website)

πŸ“ž Contact Me

About

Custom Electron launcher for "Mafia II Online" RP project. Features dynamic news, game updates, and a rich settings panel.

Resources

Stars

Watchers

Forks

Contributors