Skip to content

Commit

Permalink
ci(workflow): add installer build
Browse files Browse the repository at this point in the history
  • Loading branch information
maugde committed Aug 21, 2024
1 parent 41ef5c8 commit d59efea
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
python -m pip install --upgrade pip
pip install pydantic --no-binary pydantic
pip install -r requirements-dev.txt
pip install -r installer/requirements.txt
- name: 🐍 Install Windows dependencies
if: matrix.os == 'windows-latest'
Expand Down
13 changes: 13 additions & 0 deletions scripts/package_antares_web.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ PROJECT_DIR=$(dirname -- "${SCRIPT_DIR}")
DIST_DIR="${PROJECT_DIR}/dist/package"
RESOURCES_DIR="${PROJECT_DIR}/resources"
ANTARES_SOLVER_DIR="${DIST_DIR}/AntaresWeb/antares_solver"
INSTALLER_DIR="${PROJECT_DIR}/installer/src/antares_web_installer/"

if [[ "$OSTYPE" == "msys"* ]]; then
ANTARES_SOLVER_FOLDER_NAME="rte-antares-$ANTARES_SOLVER_FULL_VERSION-installer-64bits"
Expand Down Expand Up @@ -45,6 +46,18 @@ else
popd
fi

echo "INFO: Generating the Installer for the Desktop application..."
echo which python
if [[ "$OSTYPE" == "msys"* ]]; then
pushd ${PROJECT_DIR}
pyinstaller --onefile "${INSTALLER_DIR}gui/__main__.py" --distpath "${DIST_DIR}" --hidden-import antares_web_installer.shortcuts._linux_shell --hidden-import antares_web_installer.shortcuts._win32_shell --noconsole --name AntaresWebInstaller
popd
else
pushd ${PROJECT_DIR}
pyinstaller --onefile "${INSTALLER_DIR}cli/__main__.py" --distpath "${DIST_DIR}" --hidden-import antares_web_installer.shortcuts._linux_shell --hidden-import antares_web_installer.shortcuts._win32_shell --noconsole --name AntaresWebInstallerCLI
popd
fi

echo "INFO: Creating destination directory '${ANTARES_SOLVER_DIR}'..."
mkdir -p "${ANTARES_SOLVER_DIR}"

Expand Down

0 comments on commit d59efea

Please sign in to comment.