diff options
Diffstat (limited to 'bin/build-python')
| -rwxr-xr-x | bin/build-python | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/bin/build-python b/bin/build-python index 13d2d893..c6213f7e 100755 --- a/bin/build-python +++ b/bin/build-python @@ -5,15 +5,10 @@ info_year=$( date "+%Y" ) # PyInstaller v6.x rearranges folder configuration causing broken builds, This re-enables old onedir layout. pyinstaller_args+="--contents-directory . " -# We need to use the precompiled bootloader linked with graphical Mac OS X -# libraries if we develop a GUI application for Mac: -if [ "$BUILD" = "osx" -o "$BUILD" = "windows" ]; then - pyinstaller_args+="--windowed " -fi - # output useful debugging info that helps us trace library dependency issues pyinstaller_args+="--log-level DEBUG " +# Setting up pyinstaller arguments for each OS. # This adds bundle identifier in reverse DSN format for macos if [ "$BUILD" = "osx" ]; then pyinstaller_args+="--osx-bundle-identifier org.inkstitch.app " @@ -22,18 +17,15 @@ if [ "$BUILD" = "osx" ]; then echo "Dev or Local Build" else bash bin/import-macos-keys - python -m PyInstaller $pyinstaller_args inkstitch.py; fi -elif [ "$BUILD" = "linux" ] || [ "$BUILD" = "linux-new" ] || [ "$BUILD" = "linux-old" ]; then +elif [ "$BUILD" = "linux" ]; then pyinstaller_args+="--hidden-import gi.repository.Gtk " pyinstaller_args+="--add-binary /lib/x86_64-linux-gnu/libcrypt.so.1:. " pyinstaller_args+="--add-binary /lib/x86_64-linux-gnu/libnsl.so.1:. " - python -m PyInstaller $pyinstaller_args --strip inkstitch.py; elif [ "$BUILD" = "linux32" ]; then pyinstaller_args+="--hidden-import gi.repository.Gtk " pyinstaller_args+="--add-binary /lib/i386-linux-gnu/libcrypt.so.1:. " pyinstaller_args+="--add-binary /lib/i386-linux-gnu/libnsl.so.1:. " - python -m PyInstaller $pyinstaller_args --strip inkstitch.py; elif [ "$BUILD" = "windows" ]; then if [[ "$VERSION" =~ ^v[0-9][.0-9]+$ ]]; then # setting the file and product version for release @@ -51,9 +43,16 @@ elif [ "$BUILD" = "windows" ]; then sed -i'' 's/1.1.1/'"${VERSION#v}"'/' installer_scripts/file_version_info.txt sed -i'' 's/1234/'"${info_year}"'/' installer_scripts/file_version_info.txt # sets icon to inkstitch.exe - pyinstaller_args+="-i images/inkstitch/win/inkstitch.ico " + pyinstaller_args+="-i images/inkstitch/win/inkstitch.ico " pyinstaller_args+="--version-file installer_scripts/file_version_info.txt " - python -m PyInstaller $pyinstaller_args inkstitch.py +fi + +# Finally we build for each os with the finalized settings +if [ "$BUILD" = "osx" -o "$BUILD" = "windows" ]; then + pyinstaller_args+="--windowed " + python -m PyInstaller $pyinstaller_args inkstitch.py; +else + python -m PyInstaller $pyinstaller_args --strip inkstitch.py; fi # pyinstaller put a whole mess of libraries under dist/inkstitch. We'd like |
