-
Notifications
You must be signed in to change notification settings - Fork 88
Windows Dev Py36
All commands here are in a bash terminal (from MSYS-Git, but cygwin should work the same).
This creates a Virtual Environment to install all dependencies into, keeping your environment self-contained and clean.
- Install Python 3.6
- Clone the client repo
-
cd
into the client repo - Create virtualenv:
python -m venv <venvpath>
- You may need to use the full path to python if you did not install it into your system path
-
<venvpath>
here and in the following steps should always be the full path to a location where you have access (For example,c:/users/<username>/fafclient-venv
)
- Activate venv
- how to do that depends on whether you are using cmd or bash
- bash:
source <venvpath>/Scripts/activate
- cmd:
<venvpath>/Script/activate.bat
pip install pyqt5
pip install https://github.com/FAForever/python-wheels/releases/download/2.0.0/pywin32-221-cp36-cp36m-win32.whl
pip install pytest
pip install -r requirements.txt
- Add pywin32 libs to path
- bash:
export PATH=<venvpath>/Lib/site-packages/pywin32_system32:$PATH
- cmd: ??
- bash:
That's all! python src
and python runtests.py
should now work, provided your working directory is a checkout of the client repository.
You will have to activate the venv and make sure the pywin32 libs are in path every time you launch a new terminal.
If you have trouble having a virtual environment, it is not necessary to run the client, you can do these steps instead :
- Install Python 3.6
- Clone the client repo
-
cd
into the client repo pip install pyqt5
pip install https://github.com/FAForever/python-wheels/releases/download/2.0.0/pywin32-221-cp36-cp36m-win32.whl
pip install pytest
-
pip install -r requirements.txt
Then you can start the client by doing :
python src
You can also try the tests by doing :
python runtests.py
It is most likely due because you don't have faf-uid.exe in the "lib" folder of the git repo you cloned. You can copy and paste the faf-uid.exe you have in the client you use to play
If the wheel doesn't work, you can download and install an executable instead, for example there: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20221/ Download and install pywin32-221.win32-py3.6 or pywin32-221.win-amd64-py3.6 (don't remember which one, try both I guess)
You can remove this message by having a "RELEASE-VERSION" file in the "res" folder, which has this content : 0.16.1-rc.1+2374 (or the last version it is, you can also grab this RELEASE-VERSION for the client you use to play)