try another technique to package

This commit is contained in:
Jay Lee
2020-04-23 19:29:18 -04:00
parent eeebf56a78
commit f92c4d18db
4 changed files with 19 additions and 12 deletions

View File

@@ -41,7 +41,7 @@
<ComponentGroup
Id="ProductComponents"
Directory="INSTALLFOLDER"
Source="dist">
Source="dist/gam">
<Component Id="gam_exe" Guid="886abc07-73c5-4acc-9f71-58daf62aabc1">
<File Name="gam.exe" KeyPath="yes" />
<Environment Id="PATH" Name="PATH" Value="[INSTALLFOLDER]" Permanent="yes" Part="last" Action="set" System="yes" />

View File

@@ -3,8 +3,11 @@ if [[ "$TRAVIS_JOB_NAME" == *"Testing" ]]; then
export gam="$python -m gam"
export gampath=$(readlink -e .)
else
$python -OO -m PyInstaller --clean --noupx --strip -F gam.spec
export gampath=$(readlink -e dist)
export gampath="dist/gam"
rm -rf $gampath
mkdir -p $gampath
export gampath=$(readlink -e $gampath)
$python -OO -m PyInstaller --clean --noupx --strip -F --distpath $gampath gam.spec
export gam="${gampath}/gam"
export GAMVERSION=`$gam version simple`
cp LICENSE $gampath
@@ -13,11 +16,11 @@ else
this_glibc_ver=$(ldd --version | awk '/ldd/{print $NF}')
GAM_ARCHIVE=gam-$GAMVERSION-$GAMOS-$PLATFORM-glibc$this_glibc_ver.tar.xz
rm $gampath/lastupdatecheck.txt
tar cfJ $GAM_ARCHIVE $gampath --transform s/.*dist/gam/
# tar will cd to dist and compres gam/
tar cfJ -C dist/ $GAM_ARCHIVE gam/
echo "PyInstaller GAM info:"
du -h $gam
time $gam version extended
if [ "${TRAVIS_DIST}" == "xenial" ] && [ "${PLATFORM}" == "x86_64" ]; then
GAM_LEGACY_ARCHIVE=gam-${GAMVERSION}-${GAMOS}-${PLATFORM}-legacy.tar.xz
$python -OO -m staticx -l /lib/x86_64-linux-gnu/libresolv.so.2 -l /lib/x86_64-linux-gnu/libnss_dns.so.2 $gam $gam-staticx
@@ -25,7 +28,7 @@ else
rm $gampath/gam
mv $gam-staticx $gam
chmod 755 $gam
tar cvfJ --transform s/dist/gam/ $GAM_LEGACY_ARCHIVE $gampath
tar cvfJ -C dist/ $GAM_LEGACY_ARCHIVE gam/
echo "Legacy StaticX GAM info:"
du -h $gam
time $gam version extended

View File

@@ -1,8 +1,9 @@
cd src
echo "MacOS Version Info According to Python:"
python -c "import platform; print(platform.mac_ver())"
$python -OO -m PyInstaller --clean --noupx --strip -F gam.spec
export gampath=dist
export gampath=dist/gam
rm -rf $gampath
$python -OO -m PyInstaller --clean --noupx --strip -F --distpath $gampath gam.spec
export gam="$gampath/gam"
$gam version extended
export GAMVERSION=`$gam version simple`
@@ -12,4 +13,5 @@ cp GamCommands.txt $gampath
MACOSVERSION=$(defaults read loginwindow SystemVersionStampAsString)
GAM_ARCHIVE=gam-$GAMVERSION-$GAMOS-$PLATFORM-MacOS$MACOSVERSION.tar.xz
rm $gampath/lastupdatecheck.txt
tar cfJ $GAM_ARCHIVE $gampath --transform s/$gampath/gam/
# tar will cd to dist/ and tar up gam/
tar cfJ -C dist/ $GAM_ARCHIVE gam/

View File

@@ -1,7 +1,10 @@
cd src
echo "compiling GAM with pyinstaller..."
pyinstaller --clean --noupx -F gam.spec
export gampath=$(readlink -e dist)
export gampath="dist/gam"
rm -rf $gampath
mkdir -p $gampath
export gampath=$(readlink -e $gampath)
pyinstaller --clean --noupx -F --distpath $gampath gam.spec
export gam="${gampath}/gam"
echo "running compiled GAM..."
$gam version
@@ -13,7 +16,6 @@ cp whatsnew.txt $gampath
cp gam-setup.bat $gampath
GAM_ARCHIVE=gam-$GAMVERSION-$GAMOS-$PLATFORM.zip
/c/Program\ Files/7-Zip/7z.exe a -tzip $GAM_ARCHIVE $gampath -xr!.svn
/c/Program\ Files/7-Zip/7z.exe rn $GAM_ARCHIVE dist\ gam\
echo "Running WIX candle $WIX_BITS..."
/c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.11/bin/candle.exe -arch $WIX_BITS gam.wxs