diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8fd2adfce7..e34aef58ae 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,6 +18,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + submodules: true - name: 🔗 Install wget for Windows if: matrix.os == 'windows-latest' @@ -57,6 +58,13 @@ jobs: run: bash ./package_antares_web.sh working-directory: scripts + - name: Add installer to package + shell: bash + run: | + pip install hatch + ./package_antares_installer.sh + working-directory: scripts + - name: 📜️ Copy changelog file run: | cp docs/CHANGELOG.md dist/package/CHANGELOG.md diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..553c74283c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "installer"] + path = installer + url = https://github.com/AntaresSimulatorTeam/antares-web-installer.git diff --git a/installer b/installer new file mode 160000 index 0000000000..e7552a8a66 --- /dev/null +++ b/installer @@ -0,0 +1 @@ +Subproject commit e7552a8a66bef72f9e4b8fc6e1b274895f15a180 diff --git a/scripts/package_antares_installer.sh b/scripts/package_antares_installer.sh new file mode 100755 index 0000000000..0050a3edb5 --- /dev/null +++ b/scripts/package_antares_installer.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# Antares Desktop Installer +# +# This script must be run by ̀.github/worflows/deploy.yml`. +# It builds the installer application and stores it in the package directory. + +SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) +PROJECT_DIR=$(dirname -- "${SCRIPT_DIR}") +INSTALLER_DIR="${PROJECT_DIR}/installer" +DIST_DIR="${PROJECT_DIR}/dist/package" + +# build package +echo "INFO: Generating the Installer..." + +pushd ${INSTALLER_DIR} +if [[ "$OSTYPE" == "msys"* ]]; then + # For windows we build the GUI version + hatch run pyinstaller:build_gui AntaresWebInstaller + mv dist/AntaresWebInstaller ${DIST_DIR} +else + # For linux we build the command line version + hatch run pyinstaller:build_cli AntaresWebInstallerCLI + mv dist/AntaresWebInstallerCLI ${DIST_DIR} +fi +popd