From 863b49388206726cda7500dcc6985a88e4bdfb6f Mon Sep 17 00:00:00 2001 From: Ian Duncan <76043277+dr8co@users.noreply.github.com> Date: Fri, 3 May 2024 23:57:55 +0300 Subject: [PATCH 1/2] fix: Windows installer errors when cancelling the installation --- ConfigurePkgConfig.pas | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ConfigurePkgConfig.pas b/ConfigurePkgConfig.pas index 0ab17d5..bfc9fea 100644 --- a/ConfigurePkgConfig.pas +++ b/ConfigurePkgConfig.pas @@ -35,9 +35,14 @@ procedure ReplacePlaceholderInPkgConfig; end; end; -// Run after the installation has completed -procedure DeinitializeSetup(); +procedure CurStepChanged(CurStep: TSetupStep); begin - AppPath := ExpandConstant('{app}'); - ReplacePlaceholderInPkgConfig; + // Check if the installation is transitioning from ssPostInstall to ssDone + if (CurStep = ssDone) and (WizardForm.CurPageID = wpFinished) then + begin + // Save the installation path + AppPath := ExpandConstant('{app}'); + // Perform actions after installation + ReplacePlaceholderInPkgConfig; + end; end; From c18832ddb8ad9fecada0c6e662c8dc22601d88e8 Mon Sep 17 00:00:00 2001 From: Ian Duncan <76043277+dr8co@users.noreply.github.com> Date: Sat, 18 May 2024 20:09:03 +0300 Subject: [PATCH 2/2] Configure Qodana code analysis --- .github/workflows/code_quality.yml | 25 +++++++++++++++++++++++++ qodana.yaml | 29 +++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 .github/workflows/code_quality.yml create mode 100644 qodana.yaml diff --git a/.github/workflows/code_quality.yml b/.github/workflows/code_quality.yml new file mode 100644 index 0000000..3b7b1e8 --- /dev/null +++ b/.github/workflows/code_quality.yml @@ -0,0 +1,25 @@ +name: Qodana +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + - dev + +jobs: + qodana: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + checks: write + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit + fetch-depth: 0 # a full history is required for pull request analysis + - name: 'Qodana Scan' + uses: JetBrains/qodana-action@v2024.1 + env: + QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} diff --git a/qodana.yaml b/qodana.yaml new file mode 100644 index 0000000..76fb7ad --- /dev/null +++ b/qodana.yaml @@ -0,0 +1,29 @@ +#-------------------------------------------------------------------------------# +# Qodana analysis is configured by qodana.yaml file # +# https://www.jetbrains.com/help/qodana/qodana-yaml.html # +#-------------------------------------------------------------------------------# +version: "1.0" + +#Specify inspection profile for code analysis +profile: + name: qodana.starter + +#Enable inspections +#include: +# - name: + +#Disable inspections +#exclude: +# - name: +# paths: +# - + +#Execute shell command before Qodana execution (Applied in CI/CD pipeline) +#bootstrap: sh ./prepare-qodana.sh + +#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline) +#plugins: +# - id: #(plugin id can be found at https://plugins.jetbrains.com) + +#Specify Qodana linter for analysis (Applied in CI/CD pipeline) +linter: jetbrains/qodana-:latest