Inno-Setup-Action
Inno-Setup-Action copied to clipboard
[BUG] Unable to pass custom params via /D
This is my job step:
- name: Create installer
uses: Minionguyjpro/[email protected]
with:
path: ./pos-service-setup.iss
options: /o+ /DMyAppVersion=${{steps.gitversion.outputs.MajorMinorPatch}} /DMyAppBuild=${{steps.gitversion.outputs.buildMetaData}} /DAppVersionInfo=${{steps.gitversion.outputs.semVer}} /DFrontendVersion="${{github.event.client_payload.version}}"
All of those parameters end up empty when the script is compiled. I even had one param hardcoded /DSourceDir=.\build, but that was also empty. I know my 'gitVersion' commands work because I'm using before and after this step. I also thought that maybe it has to do with spaces, but I've checked the all the data I'm trying to pass and none of it has spaces.
Am I missing something?
This is my job step:
- name: Create installeruses: Minionguyjpro/[email protected]with:path: ./pos-service-setup.issoptions: /o+ /DMyAppVersion=${{steps.gitversion.outputs.MajorMinorPatch}} /DMyAppBuild=${{steps.gitversion.outputs.buildMetaData}} /DAppVersionInfo=${{steps.gitversion.outputs.semVer}} /DFrontendVersion="${{github.event.client_payload.version}}"All of those parameters end up empty when the script is compiled. I even had one param hardcoded/DSourceDir=.\build, but that was also empty. I know my 'gitVersion' commands work because I'm using before and after this step. I also thought that maybe it has to do with spaces, but I've checked the all the data I'm trying to pass and none of it has spaces.Am I missing something?
I would expect this to work either. Can you try adding another step that tries to echo one of the contexts (the ${{}}) things? Tell me whether that does return something or not.
This is my job step:
- name: Create installeruses: Minionguyjpro/[email protected]with:path: ./pos-service-setup.issoptions: /o+ /DMyAppVersion=${{steps.gitversion.outputs.MajorMinorPatch}} /DMyAppBuild=${{steps.gitversion.outputs.buildMetaData}} /DAppVersionInfo=${{steps.gitversion.outputs.semVer}} /DFrontendVersion="${{github.event.client_payload.version}}"All of those parameters end up empty when the script is compiled. I even had one param hardcoded/DSourceDir=.\build, but that was also empty. I know my 'gitVersion' commands work because I'm using before and after this step. I also thought that maybe it has to do with spaces, but I've checked the all the data I'm trying to pass and none of it has spaces. Am I missing something?I would expect this to work either. Can you try adding another step that tries to echo one of the contexts (the ${{}}) things? Tell me whether that does return something or not.
Otherwise what you could try is adding adding a space before and after the part in the context itself, e.g. ${{steps.gitversion.outputs.MajorMinorPatch}} would become ${{ steps.gitversion.outputs.MajorMinorPatch }}.
I ended using the workflow scripting and vanilla inno tool for the moment. I'm assigned to other things now. I will have to try this when I get back to it.
@UMDev-Brian Any news on this?
No sorry, it'll be a quite a while longer. We're not ready to automate builds yet.
No sorry, it'll be a quite a while longer. We're not ready to automate builds yet.
Any more news yet?
I ran into a similar issue. I set the OutputPath as the first argument and noticed that all addtional arguments were added to the path name. After doing some digging I think I found the bug and the potential fix.
The bug seems to be that the options are being interpreted as one single option instead of an array of options, which is what execFile() expects.
I think changing core.getInput("options") into core.getMultilineInput("options") would solve it as this would return the options as an array. This would also change the - options argument in the workflow to a list so you would define it something like:
name: Build Installer
on: push
jobs:
build:
name: Build the Inno Setup Installer
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Compile .ISS to .EXE Installer
uses: Minionguyjpro/[email protected]
with:
path: src/setup.iss
options: |
/o+
/DMyAppVersion=${{steps.gitversion.outputs.MajorMinorPatch}}*
I tried to make a PR but I had issues getting the project up and running locally and I am not super strong in JS/Node so I will leave that up to someone else 😁
I ran into a similar issue. I set the OutputPath as the first argument and noticed that all addtional arguments were added to the path name. After doing some digging I think I found the bug and the potential fix.
The bug seems to be that the options are being interpreted as one single option instead of an array of options, which is what
execFile()expects.I think changing
core.getInput("options")intocore.getMultilineInput("options")would solve it as this would return the options as an array. This would also change the- optionsargument in the workflow to a list so you would define it something like:name: Build Installer on: push jobs: build: name: Build the Inno Setup Installer runs-on: windows-latest steps: - uses: actions/checkout@v4 - name: Compile .ISS to .EXE Installer uses: Minionguyjpro/[email protected] with: path: src/setup.iss options: | /o+ /DMyAppVersion=${{steps.gitversion.outputs.MajorMinorPatch}}*I tried to make a PR but I had issues getting the project up and running locally and I am not super strong in JS/Node so I will leave that up to someone else 😁
Thanks for your suggestion! I'll try adding it into the main branch. Could someone test it afterwards by replacing their version of the step by main to make it up with the branch?
I have added this change plus .join to make it into a single string, should work. Am testing with someone else right now.
i test current @main version and it works with /D params like. It's nesse
- name: Compile .ISS to .EXE Installer
uses: Minionguyjpro/Inno-Setup-Action@main
with:
path: frostwolf.iss
options: |
/O+
/DMyAppVersion=${{ github.ref_name }}
/DMySourcePath=${{ github.workspace }}
/DMyBuildPath=${{ github.workspace }}\build\${{ matrix.targetPlatform }}
/DMyOutputDir=${{ github.workspace }}\setup\${{ matrix.targetPlatform }}
/DMyPassword=1
/DMyAppPlatform=${{ matrix.targetPlatform }}
It is important to understand that double quotes are escaped and this will not work.
- name: Compile .ISS to .EXE Installer
uses: Minionguyjpro/Inno-Setup-Action@main
with:
path: frostwolf.iss
options: |
/O+
/DMyAppVersion="${{ github.ref_name }}"