CDDA Game Launcher is developed using Python. In order to run or build the launcher, you will need to download a recent version of Python and install all the requirements.
The full list of requirements is available in requirements.txt. Most of these requirements are Python packages that can be installed using pip. Unfortunately, some of these requirements need build tools which are not easy to use nor easy to install on Windows. Here are those special requirements:
- pylzma
- Microsoft C++ Build Tools
- Windows 10 SDK
- Inno Setup
Compiled binaries for lxml and pylzma can be found on Christoph Gohlke's Unofficial Windows Binaries. If you are using Python >= 3.5, scandir should already be included. If you are using Python <= 3.4, you can also find compiled binaries for scandir on that website.
Once you have Python installed and all the requirements, you can run the launcher by going into the project directory and by running python -m cddagl
.
Once you have Python installed and all the requirements, you can build the launcher installer for distribution by going into the project directory and running python setup.py create_installer
. This will use the PyInstaller package to create a frozen stand-alone executable with all the dependencies alongside. Afterwards, it will build the installer using Inno Setup. If you want the executable to support RAR archives, you will also need to have the UnRAR command line tool in your PATH (note: a local copy of this utility is already provided in ./third-party/unrar-command-line-tool
)
The resulting launcher installer should be in the dist\innosetup
directory.
- Download and install Python 3.9 from python.org. The rest of this guide will assume that you are using the 64-bit (x64) version of Python 3.9.
- Optional but thoroughly recommended: Setup a virtual environment. It will make your development experience immensely easier.
- Install most requirements by typing the following
pip
command in your command line window:pip install SQLAlchemy alembic PyQt5 PyInstaller html5lib cssselect arrow rarfile Babel pypiwin32 pywinutils Markdown Werkzeug httpx markdown2 requests
and press↵ Enter
. 3. Alternatively, install all the dependencies specified inrequirements.txt
. - Install the
pylzma
package from Christoph Gohlke's Unofficial Windows Binaries.cp39
means CPython 3.9 andamd64
means 64-bit and in Christoph Gohlke's packages naming convention. The package name you are looking for should be similar topylzma-0.5.0-cp39-cp39-win_amd64.whl
. To install.whl
packages from Christoph Gohlke's Unofficial Windows Binaries page, you can use pip. In your command line window, type:pip install [path to .whl]
and press↵ Enter
.- A local copy of a usable pylzma package can be found in
./third-party/pylzma/pylzma-0.5.0-cp39-cp39-win_amd64.whl
, so you can go ahead andpip install
that one if you have Python 3.9 and a 64-bit Windows installation.
- A local copy of a usable pylzma package can be found in
- Download the CDDA Game Launcher source code. If you have git installed, you can type the following command in your command line window:
git clone https://github.com/DazedNConfused-/CDDA-Game-Launcher.git
. You can also download the source code from https://github.com/DazedNConfused-/CDDA-Game-Launcher/archive/master.zip. Make sure to extract the zip file somewhere before trying to run the code. - In your command line window, change directory to the source code directory. Type
cd [path to source code]
and press↵ Enter
. - See if you can run the launcher by typing the following command in your command line window:
python -m cddagl
and press↵ Enter
. If you have everything installed correctly, you should see the launcher running. - A local copy of Inno Setup is already provided in
./third-party/inno-setup/
. It will get automatically picked up during the build process.- If you do not use the default installation provided (ie: you want to use your own local version of Inno Setup), you will have to use the
--compiler=[path to Compil32.exe]
option with thecreate_installer
command.
- If you do not use the default installation provided (ie: you want to use your own local version of Inno Setup), you will have to use the
- Install the Microsoft C++ Build Tools, they are required for
pylzma
's compilation during the build process.- A local offline copy of the Build Tools' installer is already provided in
./third-party/vs-build-tools/vs_BuildTools.exe
. You should mark the Visual C++ Build Tools and the Windows 10 SDK (listed in the optional components) for installation.- Alternatively, you can import the needed configuration already exported as
./third-party/vs-build-tools/.vsconfig
and the Build Tools' installer shall take care of the rest without further user input.
- Alternatively, you can import the needed configuration already exported as
- A local offline copy of the Build Tools' installer is already provided in
- To build the launcher installer, type the following command in your command line window:
python setup.py create_installer
and press↵ Enter
. The resulting launcher installer should be in thedist\innosetup
subdirectory.