Print at Dec 16, 2025, 12:43:53 PM
Posted by buzzz at Jun 17, 2023, 3:03:35 PM
build SW bundle for MacOS
Hi All,

I just see that in the ant build, we can bundle a mac app directly.

I build the jar on windows using ant.
But when I try to build the mac bundle, I obtain this error :



macosx10.4Bundle:
[move] Moving 1 file to C:\Users\toto\Desktop\SweetHome3D-7.1-src\install\macosx\10.4\SweetHome3D-7.1\Sweet Home 3D.app\Contents\Resources\Java
[move] Moving 1 file to C:\Users\toto\Desktop\SweetHome3D-7.1-src\install\macosx\10.4\SweetHome3D-7.1\Sweet Home 3D.app\Contents\Resources\Java
[move] Moving 1 file to C:\Users\toto\Desktop\SweetHome3D-7.1-src\install\macosx\10.4\SweetHome3D-7.1\Sweet Home 3D.app\Contents\Resources\Java
[move] Moving 1 file to C:\Users\toto\Desktop\SweetHome3D-7.1-src\install\macosx\10.4\SweetHome3D-7.1\Sweet Home 3D.app\Contents\Resources\Java
[move] Moving 1 file to C:\Users\toto\Desktop\SweetHome3D-7.1-src\install\macosx\10.4\SweetHome3D-7.1\Sweet Home 3D.app\Contents\Resources\Java
[exec] FINDá: format incorrect de paramΦtre

SweetHome3D-7.1-src\build.xml:865: exec returned: 2

I also have many questions :
- Maybe I need to build from a Mac ?
- For mac, which version of java/ant do I need ?
- I see that bundle uses Azul OpenJDK 15.0.2, I suppose I have to install this version before trying to build ?

Thx for help

Posted by Puybaret at Jun 17, 2023, 4:24:32 PM
Re: build SW bundle for MacOS
Don't try macosx10.4Bundle target but rather the macosxBundle target in build.xml.
Both targets require lipo found in macOS tools, but if you target only Intel or ARM processor, you could only copy the Java version of your choice (if you want an Intel version, change 3 times javaHome_macosx_arm64 property by javaHome_macosx_x86_64) and remove the the other calls to lipo used to build an Universal OpenJDK.
I never tried this tip under another system. If it doesn't work under Windows, remove or adapt the exec tag which copies legal files with their symlinks). You could try also under to run Ant under Linux.

The Intel or ARM OpenJDK 15 must be installed in the folder indicated in the properties javaHome_macosx_x86_64 or javaHome_macosx_arm64.

Note that other targets like macosxInstaller and macosxSignedInstaller require also hdiutil and codesign which are tools of macOS.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by buzzz at Jun 18, 2023, 1:38:51 AM
Re: build SW bundle for MacOS
Thx

Which version of eclipse do you recommend to open and run SW ?

Posted by Puybaret at Jun 19, 2023, 9:33:52 AM
Re: build SW bundle for MacOS
No special version, I generally use the latest version of Eclipse but I don't update it each time a new version is released.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator