Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#420: Create Windows Installer with WixToolset #978

Open
wants to merge 55 commits into
base: main
Choose a base branch
from

Conversation

alfeilex
Copy link
Member

@alfeilex alfeilex commented Jan 22, 2025

Fixes: #420

This PR implements the creation of a MSI file for Windows Installer with WixToolset

It includes:

  • The Windows Installer Build Package with UI Sequence:
    • Accept License
    • Continue with default installation (default C:\projects) or customize
      • Volume Drive
      • Root Folder or User Home Folder
    • Copy files into installation folder and run ideasy.exe -f install
  • The integration of the WixToolSet build logic into the Nightly Build and Release workflow

@coveralls
Copy link
Collaborator

coveralls commented Jan 22, 2025

Pull Request Test Coverage Report for Build 13548740329

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 68.227%

Totals Coverage Status
Change from base Build 13547736881: 0.0%
Covered Lines: 7860
Relevant Lines: 11071

💛 - Coveralls

@alfeilex alfeilex self-assigned this Jan 22, 2025
@alfeilex

This comment was marked as outdated.

<?define version = "1.0.0"?>
<?define publisher = "devonfw-ide"?>
<?define guid = "ba3ad5c0-94e9-42c3-9374-efaaddd3b967"?>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also define the correct meta information for the MSI packages

@alfeilex
Copy link
Member Author

One thing is that on the windows build (in matrix os), we need to build the MSI.
Further in maven (see here), we need to attach the artifact to the release being deployed. This does not make sense via assembly-plugin since we already have the artifact that is the MSI itself. Instead use attach-artifact.

But as I understand it, in the current workflow, we build the native image and include it in the deployment for the release. In the MSI build itself, we also need the whole package, including the binary ideasy.exe and also documentation, which is not built before mvn deploy.

@alfeilex alfeilex added the windows specific for Microsoft Windows OS label Feb 23, 2025
@alfeilex
Copy link
Member Author

@alfeilex now that my PR #1055 is merged, your MSI installer only needs to call ideasy.exe -f install:

./bin/ideasy -f install

Is added but has to be tested when #1084 is merged.

@@ -52,10 +73,9 @@ jobs:
- name: Download natives and build project
uses: actions/download-artifact@v4
with:
pattern: natives-*
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the pattern key here, because we use all uploaded artifacts anyway. Since we also include the msi artifact, we would have to check how to extend the pattern here in the case, we want to stick with it.

@@ -34,6 +34,27 @@ jobs:
with:
name: natives-${{ matrix.os }}
path: cli/target/ideasy*
- name: Build MSI with WixToolSet
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to integrate the whole MSI installation into maven, but the plugins are not compatbile with the latest version 5. https://wix-maven.github.io/wix-maven-plugin/

So I chose this place to insert the Wixtoolset installation. I would also be possible to move this to the last deploy job, but there we are using ubuntu as a runner and dotnet would not work properly.

I think we could also move the whole thing into a separate Github Action. But maybe, we could create a new issue for that.

If you have any suggestions, than please comment on this

path: ./cli/target/
- name: Deploy to OSSRH nexus
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: mvn --settings .mvn/settings.xml -DskipTests=true -Darchetype.test.skip=true -Dgpg.skip=true -Dstyle.color=always -B -ntp -Passembly,deploy deploy
run: mvn --settings .mvn/settings.xml -DskipTests=true -Darchetype.test.skip=true -Dgpg.skip=true -Dstyle.color=always -B -ntp -Passembly,msi,deploy deploy
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the MSI is attached into the deployment. I haven't change the release workflow yet. Maybe we can first run the Nightly Build and then adapt the changes to the release workflow

https://github.com/alfeilex/IDEasy/actions/runs/13546792586/job/37860853837#step:5:1240

@alfeilex alfeilex marked this pull request as ready for review February 26, 2025 15:28
<configuration>
<artifacts>
<artifact>
<file>${project.basedir}/target/${project.artifactId}-${revision}.msi</file>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now, its named ide-cli-2025.02.002-beta.msi

If you change the name or the artifact-id, then you have also to change line 279 because I rename the downloaded ideasy.msi there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
windows specific for Microsoft Windows OS
Projects
Status: Team Review
Development

Successfully merging this pull request may close these issues.

Create installer for Windows
3 participants