I am building Apple Silicon + Intel version of my ...
# compose-desktop
a
I am building Apple Silicon + Intel version of my app in parallel But right now they both output their respective dmg to the same file, which is problematic Any way to add a suffix to each one somehow? I tried changing the
packageName
and it does change the dmg file, but it also changes the app name inside of the dmg
Alternative if i could change the output path also works
a
I am building Apple Silicon + Intel version of my app in parallel
How do you do that?
a
via kotlin. each packaging is a gradle task that runs in its own coroutine. cant really parallize them though rn because of the file clash
gradle tasks are the ones coming from the compose tooling.
./gradlew notarizeReleaseDmg
a
I’m confused. Doesn’t jpackage work by packaging the JVM it’s running on, so you must run it on Intel to get an Intel distributable, and on Apple Silicon to get an Apple Silicon distributable?
a
nah. you can change the JAVA_HOME on the environment u are running and it works. i am on a m3. running the task itself uses the apple silicon jdk. for the intel one i do
export JAVA_HOME=/path/to/intel/jkd && ./gradlew xyz
so yes. jpackage does work on the jvm you are running on, so i change the JAVA_HOME before it runs
a
So does it run the x86 JVM on Apple Silicon?
a
yes
or rather. not sure
a
Does macOS emulate x86 for that?
a
all i know is that it exports an intel app and im happy that it works on intel macs
mac os runs x86 apps yes via rosetta
a
Sorry I can’t help, but I’ve learned something new 🙂
a
i dont think this is possible. ill make my own tooling
m
What if you change the output path based on the JAVA HOME path? You can change it with that: https://github.com/prof18/feed-flow/blob/76ea49b81bb5f0a6cf7949cb8fcf52b19fb59364/desktopApp/build.gradle.kts#L83 And to do the if/else you use a Callable, like here. So gradle will compute it at runtime and not at evaluation time. Not sure if it works, seems resonable in my head 😅