try to cleanup and correct some logic. Might have made things worse...

This commit is contained in:
Jay Lee
2024-09-18 08:01:46 -04:00
parent ee32bb87f0
commit 484238ece2

View File

@ -529,13 +529,8 @@ jobs:
- name: Build GAM with PyInstaller - name: Build GAM with PyInstaller
if: matrix.goal != 'test' if: matrix.goal != 'test'
run: | run: |
if [[ "${staticx}" == "yes" ]]; then export distpath="./dist/gam"
export distpath="./dist/gam" export gampath="$distpath"
export gampath="${distpath}"
else
export distpath="./dist"
export gampath="${distpath}/gam"
fi
mkdir -p -v "${gampath}" mkdir -p -v "${gampath}"
if [[ "${RUNNER_OS}" == "macOS" ]]; then if [[ "${RUNNER_OS}" == "macOS" ]]; then
# Tell our gam.spec to use our code sign certificate # Tell our gam.spec to use our code sign certificate
@ -543,8 +538,8 @@ jobs:
# brew OpenSSL gets picked up by PyInstaller # brew OpenSSL gets picked up by PyInstaller
# breaking our self-compiled version # breaking our self-compiled version
brew uninstall --ignore-dependencies openssl brew uninstall --ignore-dependencies openssl
export gampath=$($PYTHON -c "import os; print(os.path.realpath('$gampath'))")
export PYINSTALLER_BUILD_ONEDIR=yes export PYINSTALLER_BUILD_ONEDIR=yes
export gampath=$($PYTHON -c "import os; print(os.path.realpath('${gampath}/gam'))")
elif [[ "${RUNNER_OS}" == "Windows" ]]; then elif [[ "${RUNNER_OS}" == "Windows" ]]; then
# Work around issue where PyInstaller picks up python3.dll from other Python versions # Work around issue where PyInstaller picks up python3.dll from other Python versions
# https://github.com/pyinstaller/pyinstaller/issues/7102 # https://github.com/pyinstaller/pyinstaller/issues/7102
@ -556,8 +551,6 @@ jobs:
fi fi
export gam="${gampath}/gam" export gam="${gampath}/gam"
echo "gampath=${gampath}" >> $GITHUB_ENV echo "gampath=${gampath}" >> $GITHUB_ENV
export distpath="./dist/gam"
export gampath="${distpath}"
"${PYTHON}" -m PyInstaller --clean --noconfirm --distpath="${distpath}" gam.spec "${PYTHON}" -m PyInstaller --clean --noconfirm --distpath="${distpath}" gam.spec
echo "dist results:" echo "dist results:"
ls -alRF "$distpath" ls -alRF "$distpath"