-
Notifications
You must be signed in to change notification settings - Fork 412
Developers: Creating Executable Builds for Pyfa
Ebag333 edited this page Apr 4, 2017
·
6 revisions
Currently builds are not done using pyInstaller
. This is simply documenting one method to creating builds.
You will need to modify the pyfa.spec
file. This file should always be executed from the same level as pyfa.py
.
pathex=['C:\\Users\\Ebag333\\Documents\\GitHub\\Ebag333\\Pyfa'],
pathex
points to where your pyfa.py
and pyfa.spec
file lives.
icon='C:/Users/Ebag333/Documents/GitHub/Ebag333/Pyfa/dist_assets/win/pyfa.ico',
icon
can be found twice. Modify both locations. Make sure to point to the correct distribution icon.
debug=False,
console=False,
By default we don't show the console or output debugging info. If the build does not run, you may need to enable these to troubleshoot.
- Install Linux (steps below use Ubuntu as a reference)
- Escalate to su
sudo su
or prepend all commands below withsudo
- Update apt-get:
apt-get update
- Install python if not already installed (2.7 recommended)
- Install pip
apt-get install python-pip python-dev build-essential
pip install --upgrade pip
pip install --upgrade virtualenv
- Install wxPython. (If 3.0 isn't available, you can fall back to 2.8, you do not need both.)
apt-get install python-wxgtk3.0
apt-get install python-wxgtk2.8
- Create a directory to place the build files. (I used
/tmp/Pyfa_build
) - Change directory to the one you created above.
- Upload all files into the directory (can be done via git or simply copying the files)
- Install Pyfa requirements.
If you get any memory errors, use--no-cache-dir
. If you get build errors ("python setup.py egg_info" failed
) try installinglibfreetype6-dev
.
pip install -r requirements.txt
pip install -r requirements_build_linux.txt
apt-get install libfreetype6-dev
pip --no-cache-dir install -r requirements.txt
- From within the same directory as
pyfa.py
andpyfa.spec
run:pyinstaller --clean --noconfirm --windowed pyfa.spec
- Because Linux doesn't bundle all the libraries in the package, it may not be backwards compatible. It should be forward compatible, but it's recommended to build on the oldest version you want to support.
.
- Install Windows (steps below use Windows 10 as a reference)
- Install python if not already installed (2.7 recommended
- Install wxPython (version 2.8)
- Install Visual Studio (there is a free community edition)
- Create a directory to place the build files. (I used
/tmp/Pyfa_build
) - Change directory to the one you created above.
- Upload all files into the directory (can be done via git or simply copying the files)
- Install Pyfa requirements:
pip install -r requirements.txt
pip install -r requirements_build_windows.txt
##Build Process
- From within the same directory as
pyfa.py
andpyfa.spec
run:pyinstaller.exe --clean --noconfirm --windowed --upx-dir=.\scripts\upx.exe pyfa.spec