Skip to content

Latest commit

 

History

History
 
 

launcher

How to build

Prerequisites

Tip

pnpm is used instead of npm to save disk space on your system. This is particularly useful as multiple projects in this repository are using the same dependencies.

  1. Clone the repository:
git clone https://github.com/tiltedphoques/CyberpunkMP.git
  1. Go to launcher directory:
cd code/launcher
  1. Install dependencies:
pnpm install
cd electron/
pnpm install
cd ..

Warning

On Windows, depending on where you installed this repository, long path might be an issue when trying to build electron app. You can add electron/.npmrc with this line virtual-store-dir-max-length=50 to fix it. You might need to change this value based on your environment. See official documentation for more.

Development

  1. Run pnpm run start:all to concurrently run:
  • React with vite
  • react-devtools for debugging
  • electron app with overwolf
  1. CTRL + C or exit any of these programs to kill them all.

Note

You can manually start each process in three terminals using pnpm run start, pnpm run start:electron and npx react-devtools.

Warning

If react-devtools is globally installed on your system, it will likely fail to work when using command start:all. You can either uninstall global dependency, or run commands independently.

Production

  1. Go through Development first.
  2. Run pnpm run build:all to build:
  • React app
  • Electron app
  1. Output will be in the electron/out folder.
  2. You are ready to run CyberpunkMP.exe in win-unpacked/!