#423 Added PKG Installer build for macOS systems - #2098
Conversation
Coverage Report for CI Build 30590298921Coverage decreased (-0.02%) to 72.621%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions1 previously-covered line in 1 file lost coverage.
Coverage Stats💛 - Coveralls |
…staller debugging screen
4a6b166 to
51a5cc9
Compare
|
@laim2003
|
|
@oanding-blrng Can you maybe upload the information that is printed to the installation protocol? So the content from „Fenster“->“Installationsprotokoll“; here in the logs there either is an error, or a log message printing the path to the (second) IDEasy internal installation log. Could you maybe upload both so I can investigate what exactly goes wrong on your device? I suspect that this may not actually be a gatekeeper issue, but I'm not sure. Thanks!
… Am 06.07.2026 um 11:36 schrieb OAnding ***@***.***>:
oanding-blrng
left a comment
(devonfw/IDEasy#2098)
<#2098 (comment)>
@laim2003 <https://github.com/laim2003>
I'm able to create the PKG installer, but I can't install IDEasy with it. It get the following output from the installer which is fine due to the mentioned lack of the Apple Developer License. But the mac gatekeeper workaround isn't working for me, because the option to allow the specific program doesn't appear. The workaround still works for the traditional way via extracting the .tar.gz and running setup.
Bild.06.07.26.um.10.44.png (view on web) <https://github.com/user-attachments/assets/ec068ead-7c7e-404b-a549-3a929ca3c4cb>
—
Reply to this email directly, view it on GitHub <#2098?email_source=notifications&email_token=AJQDEFQP5A4BWPR5MAV4DS35DNXKRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIOBZGEZDMNJZHAZ2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-4891265983>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AJQDEFWAV7DHJORFWMPYGZL5DNXKRAVCNFSNUABFKJSXA33TNF2G64TZHM3DSMRQG43DINRUHNEXG43VMU5TINZYGQZDMMBUHAZKC5QC>.
You are receiving this because you were mentioned.
|
|
Installation protocol (Error and status messages): Last message mentioned a problem with the UI. Maybe the underlying problem here is connected to the nightly build (https://github.com/devonfw/IDEasy/actions/runs/28696754044/job/85107587327). |
|
@oanding-blrng i quickly pushed a small fix. now, when you look at the installation log, you should see a log message that points to the IDEasy installation log. Also, what size did the installer display when choosing the disk? |
|
The installtion log: The installer is showing 62,5 MB for the size. Although not in the "Choose Disk" but rather in "Installation type". I only have one big partition for the hard drive. I assume, that MacOS and the installer dosn't bother to ask if there is only one possible option to choose. |
|
For better manual testing I extracted the relevant commands from the jobs of release.yaml into it's own script. maven_config="$(cat .mvn/maven.config)"
current_version="${maven_config/#*-Drevision=}"
current_version="${current_version/ */}"
next_version="${current_version/-SNAPSHOT/}"
cd cli
mvn -B -ntp -Drevision=${next_version} -Pnative -DskipTests=true package
cd ..
cd documentation
mvn -B -ntp clean install
cd ..
mkdir -p macos-installer/pkg-root/Library/IDEasy/bin
mkdir -p macos-installer/Resources
cp documentation/target/generated-docs/LICENSE.rtf macos-installer/Resources/LICENSE.rtf
cp -r cli/target/package/* macos-installer/pkg-root/Library/IDEasy/
rm -rf macos-installer/pkg-root/Library/IDEasy/system/windows
rm -rf macos-installer/pkg-root/Library/IDEasy/system/linux
cp cli/target/ideasy macos-installer/pkg-root/Library/IDEasy/bin/
chmod +x macos-installer/pkg-root/Library/IDEasy/bin/ideasy
chmod +x macos-installer/scripts/postinstall
cd macos-installer
pkgbuild --root pkg-root --identifier com.devonfw.ideasy \
--version $next_version --install-location "/" \
--scripts scripts IDEasyComponent.pkg
sed -i '' "s/\${next_version}/${next_version}/" Distribution.xml
productbuild --distribution Distribution.xml --resources Resources \
--package-path . IDEasy-$next_version.pkg |
|
I now updated the cleaning task. |
|
So i tried the PKG installer on a completely clean, freshly installed virtual machine as well and I had no problems there. I recommend you run mvn clean, then again run the most recent version of the nightly build scripts and try again. |
oanding-blrng
left a comment
There was a problem hiding this comment.
I was able to:
- create a PKG installer with the steps mentioned in
nightly-build.ymlandrelease.yml - install IDEasy without additional steps regarding security settings
- upgrade IDEasy with
ide upgrade --mode=...without problems - install IDEasy in proper location without additional files/directories somewhere else
After the suggestion this pr can move forward.
fixed background not visible on dark theme systems Co-authored-by: OAnding <oscar.anding@capgemini.com>
…ler' into feature/devonfw#433-macos-installer
| * Windows: https://repo1.maven.org/maven2/com/devonfw/tools/IDEasy/ide-cli/${current_version}/ide-cli-${current_version}-windows-x64.tar.gz | ||
| * Mac(arm64): https://repo1.maven.org/maven2/com/devonfw/tools/IDEasy/ide-cli/${current_version}/ide-cli-${current_version}-mac-arm64.tar.gz | ||
| * Mac(x64): https://repo1.maven.org/maven2/com/devonfw/tools/IDEasy/ide-cli/${current_version}/ide-cli-${current_version}-mac-x64.tar.gz | ||
| * Mac(PKG): https://repo1.maven.org/maven2/com/devonfw/tools/IDEasy/ide-cli/${current_version}/ide-cli-${current_version}-mac.pkg |
There was a problem hiding this comment.
I'm not sure if this is implemented properly. I oriented myself based on the MSI link above.
hohwille
left a comment
There was a problem hiding this comment.
@laim2003 thanks for this PR and the nice work behind all this. 👍
Sorry, that I also have to add my concerns and left you with some rework.
However, I hope it all makes sense to improve and finally merge a clean solution for this feature.
| maven_config="$(cat .mvn/maven.config)" | ||
| current_version="${maven_config/#*-Drevision=}" | ||
| current_version="${current_version/ */}" | ||
| cd documentation |
There was a problem hiding this comment.
Do not copy&paste this.
PR #2223 just introduced a clean solution to avoid this.
Please use RELEASE_VERSION variable.
| cd documentation | ||
| mvn -B -ntp clean install | ||
| cd .. | ||
| mkdir -p macos-installer/pkg-root/bin | ||
| mkdir -p macos-installer/Resources | ||
| cp documentation/target/generated-docs/IDEasy.pdf macos-installer/pkg-root/ | ||
| cp documentation/target/generated-docs/LICENSE.rtf macos-installer/Resources/LICENSE.rtf | ||
| cp cli/target/macos-installer/Distribution.xml macos-installer/Distribution.xml | ||
| cp -r cli/target/package/* macos-installer/pkg-root/ | ||
| cp cli/target/ideasy macos-installer/pkg-root/bin/ | ||
| rm -rf macos-installer/pkg-root/system/windows | ||
| rm -rf macos-installer/pkg-root/system/linux | ||
| chmod +x macos-installer/pkg-root/bin/ideasy | ||
| chmod +x macos-installer/scripts/postinstall | ||
| cd macos-installer | ||
| pkgbuild --root pkg-root --identifier com.devonfw.ideasy --version $current_version --install-location /projects/_ide/tmp/ideasy --scripts scripts IDEasyComponent.pkg | ||
| productbuild --distribution Distribution.xml --resources Resources --package-path . ideasy.pkg | ||
| # pkgbuild is responsible for building the installation bundle. By using productbuild, we can custimze the installation process, including things like showing a license. |
There was a problem hiding this comment.
workflows are hard to test, read and maintain.
Maybe better extract to a shell script in our repo that you call from the workflow.
Then mac developers can also update and test this script in isolation without the workflow that is hard to test.
| maven_config="$(cat .mvn/maven.config)" | ||
| current_version="${maven_config/#*-Drevision=}" | ||
| current_version="${current_version/ */}" | ||
| next_version="${current_version/-SNAPSHOT/}" |
| cd documentation | ||
| mvn -B -ntp clean install | ||
| cd .. | ||
| mkdir -p macos-installer/pkg-root/bin | ||
| mkdir -p macos-installer/Resources | ||
| cp documentation/target/generated-docs/IDEasy.pdf macos-installer/pkg-root/ | ||
| cp documentation/target/generated-docs/LICENSE.rtf macos-installer/Resources/LICENSE.rtf | ||
| cp cli/target/macos-installer/Distribution.xml macos-installer/Distribution.xml | ||
| cp -r cli/target/package/* macos-installer/pkg-root/ | ||
| cp cli/target/ideasy macos-installer/pkg-root/bin/ | ||
| rm -rf macos-installer/pkg-root/system/windows | ||
| rm -rf macos-installer/pkg-root/system/linux | ||
| chmod +x macos-installer/pkg-root/bin/ideasy | ||
| chmod +x macos-installer/scripts/postinstall | ||
| cd macos-installer | ||
| pkgbuild --root pkg-root --identifier com.devonfw.ideasy --version $next_version --install-location /projects/_ide/tmp/ideasy --scripts scripts IDEasyComponent.pkg | ||
| productbuild --distribution Distribution.xml --resources Resources --package-path . ideasy.pkg | ||
| # pkgbuild is responsible for building the installation bundle. By using productbuild, we can custimze the installation process, including things like showing a license. |
There was a problem hiding this comment.
confirmed that we need to extract as script to avoid this copy&paste redundancies.
| </configuration> | ||
| </execution> | ||
| <execution> | ||
| <id>Copy Distribution.xml [macOS Installer]</id> |
There was a problem hiding this comment.
an execution ID is not a descriptive comment but a short unique identifier without spaces and special characters. It may be there to be reference it from CLI or other POMs.
To add documentation simply use an XML comment.
| <delimiters> | ||
| <delimiter>$[*]</delimiter> | ||
| </delimiters> |
There was a problem hiding this comment.
Instead of copy&paste you should extract this to <configuration> element outside of the <executions>.
It will then be inherited by all executions.
| graphify-out/ | ||
|
|
||
| #macOs installer files | ||
| macos-installer/*.pkg |
There was a problem hiding this comment.
| macos-installer/*.pkg | |
| *.pkg |
|
|
||
| <!-- Clean up macOS installer artifacts --> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> |
There was a problem hiding this comment.
IMHO we should improve the design how you integrated this into maven.
What if you instead create a new pom.xml inside macos-installer and add it as module in our top-level pom.xml.
Then you can do all the magic inside that POM and things get clear and consistent.
Currently it is buggy (if I call mvn clean on cli it will not revert what mvn install on cli has created) and hard to understand because aspects for macos-installer are spread across different POMs as well as copy commands in the workflow files (where we also could use maven or a script as already suggested).

This PR fixes #423
Implemented changes:
A few notes:
Testing instructions
Disclaimer: Testing this requires a mac.
Build native imageand thenBuild MacOS PKG) and running them from /workspaces/main/ideasy/ide -videcommand should be usable from the command line.ide -vin the default mac terminalideasyfolder should exist after a succesful installationRetesting:
Checklist for this PR
Make sure everything is checked before merging this PR. For further info please also see
our DoD.
mvn clean testlocally all tests pass and build is successful#«issue-id»: «brief summary»(e.g.#921: fixed setup.bat). If no issue ID exists, title only.In Progressand assigned to you or there is no issue (might happen for very small PRs)with
internal