crschnick / pdx_unlimiter

A smart savegame manager, editor, and toolbox for all current major Paradox Grand Strategy games.
https://discord.gg/BVE4vxqFpU
GNU General Public License v3.0
250 stars 23 forks source link

Mac version not updated #129

Closed gebau00a closed 3 weeks ago

gebau00a commented 1 month ago

Downloading the recent versions still showed version 2.13.4 I thought this might be a string bug, that the wrong string is included. Installing the latest version yesterday, it still shows the EU4 warning of DLCs missing, due to the merge with the base game. This is to my knowledge already solved in the latest release.

I assume the workflow for the macOS packaging is using an old tag, thus sticking to 2.13.4. Will start to investigate as well.

crschnick commented 1 month ago

there is no up-to-date app for mac anymore, has something to do with the signing and notarization requirements

crschnick commented 1 month ago

A library that I use isn't signed, so the notarization of pdxu fails. The problem is that it's not easy to sign that, you would have to extract the library jar, sign the dylibs, and repackage it again.

gebau00a commented 1 month ago

Would it be possible to provide an unsigned version? There's a way to locally un-quarantine it

crschnick commented 1 month ago

Yes, but in practice 90% of users are overwhelmed by removing the quarantine

gebau00a commented 1 month ago

Do you have a small guide to compile myself including the app package ./gradle/gradlew createDist with a following./gradle/gradlew jreleaserRelease --stacktrace "-Dorg.gradle.jvmargs=-Xmx2048M" does not work, because my release.github.token is blank

crschnick commented 1 month ago

I will fix the build when I find some time hopefully soon. The issue is that hasn't been tested for quite a while, so issues like this might happen

crschnick commented 1 month ago

Can you try again

gebau00a commented 1 month ago

Local build fails `FAILURE: Build failed with an exception.

The run also seemed to crash, but at the certificate level https://github.com/crschnick/pdx_unlimiter/actions/runs/11556266764/job/32163554616

crschnick commented 1 month ago

What JDK version are you using? The certificate level failure is the one I meant why this is not maintained right now

gebau00a commented 1 month ago

Oracle GraalVM 23.0.1+11.1 (build 23.0.1+11-jvmci-b01) I would comment out the certificate section in the

crschnick commented 1 month ago

can you try again

gebau00a commented 1 month ago

After the gradle package upgrade, when running ./gradle/gradlew createDist, it runs. It stops at certificate error again:

> Task :jpackageImage FAILED
[23:11:47.998] No certificate found matching [Developer ID Application: Christopher Schnick (PF6V9HYACS)] using keychain []
[23:11:47.946] Running /usr/bin/security
[23:11:47.968] Command [PID: 72235]:
    /usr/bin/security find-certificate -c Developer ID Application: Christopher Schnick (PF6V9HYACS) -a
[23:11:47.969] Returned: 0

[23:11:47.970] Running /usr/bin/security
[23:11:47.985] Command [PID: 72236]:
    /usr/bin/security find-certificate -c Developer ID Application: Christopher Schnick (PF6V9HYACS) -a -p
[23:11:47.985] Returned: 0

[23:11:47.986] Running /usr/bin/openssl
[23:11:47.996] Command [PID: 72237]:
    /usr/bin/openssl x509 -noout -subject -in /private/var/folders/7v/h41zvbn54hj70prv736dm9jr0000gn/T/tempfile394562005753757769.tmp
[23:11:47.997] Output:
    unable to load certificate
    8334176832:error:09FFF06C:PEM routines:CRYPTO_internal:no start line:/AppleInternal/Library/BuildRoots/e0873e53-5185-11ef-9a51-9ab6d782fe32/Library/Caches/com.apple.xbs/Sources/libressl/libressl-3.3/crypto/pem/pem_lib.c:694:Expecting: TRUSTED CERTIFICATE
[23:11:47.997] Returned: 1

I propose to try packaging without the signing

crschnick commented 1 month ago

What about now

gebau00a commented 1 month ago

Working, created an app archive which starts up, 2.13.14-SNAPSHOT version as expected. Haven't tested any functionality yet but I do not assume any problems

gebau00a commented 1 month ago

Interesting, that the workflow still fails with the signing

crschnick commented 1 month ago

Feel free to test it as I can't do that

Maybe I can fix the signing with something like this: https://github.com/dg76/signpackage

gebau00a commented 1 month ago

I now found an error, when importing a save game, rakaly_mac is reported missing in the package. I assume that's caused by the code sign removal, as misc/macos_notarize.sh:mv -f "$APP_DIR/Contents/Resources/resources/bin/rakaly_mac" $APP_DIR/Contents/MacOS/rakaly_mac" || true moved the file into another location

Confirmed, moving it manually in the AppImage to the location $APP_DIR/Contents/MacOS/rakaly_mac solves it

crschnick commented 1 month ago

Can you try again

gebau00a commented 1 month ago

Ok, that was a harder nut to crack. You shifted the moving to the DMG creation stage. If possible, I would prefer having it during the packaging stage, but not how to change the gradle build script for that. Running ./misc/macos_dmg.sh . did the trick once I recognised the . behind the script name, as $1 expects an argument

crschnick commented 1 month ago

The moving should be done only at that stage because the target is only created there. It should be available during the packaging stage, there should be a .app bundle generated and a .dmg when running createDist. In your case you might have to clean it first, i.e. run clean createDist

gebau00a commented 1 month ago

I did. The app package is created during createDist, but then rakaly_mac is still in the wrong location. CreateDMG moves the app package into a disk image for distribution.

crschnick commented 1 month ago

Can you try again

gebau00a commented 1 month ago

It's now working out of the box for local compilation. Workflow still crashes for now.

crschnick commented 4 weeks ago

Can you try the signed mac artifact from this build: https://github.com/crschnick/pdx_unlimiter/actions/runs/11620576834

gebau00a commented 4 weeks ago

It worked directly. Thanks.

gebau00a commented 4 weeks ago

Anything else, I can close the topic for now I guess

crschnick commented 3 weeks ago

This is now released