Skip to content

Builder main installer #17

Builder main installer

Builder main installer #17

Workflow file for this run

name: Builder main installer
on:
workflow_dispatch:
env:
SRC_PATH: ${{ github.workspace }}/src
INSTALLER_SCRIPT_PATH: ${{ github.workspace }}/src/bin/installer/bin
FULL_INSTALLER_PATH: ${{ github.workspace }}/src/bin/installer/iss/full
LITE_INSTALLER_PATH: ${{ github.workspace }}/src/bin/installer/iss/lite
jobs:
build-job:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ env.SRC_PATH }}
- name: Install Python packages
run: pip install py7zr pefile colorama
- name: Unpack tools
working-directory: ${{ env.INSTALLER_SCRIPT_PATH }}
run: python unpack-project.py -f ${{ env.SRC_PATH }}/toolkit
- name: Build documents
working-directory: ${{ env.INSTALLER_SCRIPT_PATH }}
run: ./build-docs.bat
- name: Update full installer .iss config paths
working-directory: ${{ env.FULL_INSTALLER_PATH }}
shell: bash
run: |
WORKSPACE_BUILD_PATH=$(echo "${{ github.workspace }}" | tr '\\' '/')
WORKSPACE_SRC_PATH=$(echo "${{ env.SRC_PATH }}" | tr '\\' '/')
sed -i "s|C:\\\\code\\\\toolkit|$WORKSPACE_SRC_PATH|g" setup.iss
sed -i "s|C:\\\\code|$WORKSPACE_BUILD_PATH|g" setup.iss
- name: Update version number in full installer .iss
working-directory: ${{ env.FULL_INSTALLER_PATH }}
shell: bash
run: |
VERSION_CODE=$(date +'%Y.%m')
sed -i "s/#define MyAppVersion \"RELEASE\"/#define MyAppVersion \"$VERSION_CODE\"/g" setup.iss
- name: Build full installer
working-directory: ${{ env.FULL_INSTALLER_PATH }}
run: ISCC.exe setup.iss /DMySrcDir="${{ env.SRC_PATH }}" /DMyOutputDir="${{ github.workspace }}"
- name: Update lite installer .iss config paths
working-directory: ${{ env.LITE_INSTALLER_PATH }}
shell: bash
run: |
WORKSPACE_BUILD_PATH=$(echo "${{ github.workspace }}" | tr '\\' '/')
WORKSPACE_SRC_PATH=$(echo "${{ env.SRC_PATH }}" | tr '\\' '/')
sed -i "s|C:\\\\code\\\\toolkit|$WORKSPACE_SRC_PATH|g" setup.iss
sed -i "s|C:\\\\code|$WORKSPACE_BUILD_PATH|g" setup.iss
- name: Update version number in lite installer .iss
working-directory: ${{ env.FULL_INSTALLER_PATH }}
shell: bash
run: |
VERSION_CODE=$(date +'%Y.%m')
sed -i "s/#define MyAppVersion \"RELEASE\"/#define MyAppVersion \"$VERSION_CODE\"/g" setup.iss
- name: Build lite installer
working-directory: ${{ env.LITE_INSTALLER_PATH }}
run: ISCC.exe setup.iss /DMySrcDir="${{ env.SRC_PATH }}" /DMyOutputDir="${{ github.workspace }}"
- name: Upload Setup as Artifact
uses: actions/upload-artifact@v4
with:
name: setup-installer-artifact
path: ./*.exe