karlsabo / packr Goto Github PK
View Code? Open in Web Editor NEWThis project forked from libgdx/packr
Packages your JAR, assets and a JVM for distribution on Windows, Linux and Mac OS X
License: Apache License 2.0
This project forked from libgdx/packr
Packages your JAR, assets and a JVM for distribution on Windows, Linux and Mac OS X
License: Apache License 2.0
Remove linux32, windows32 as supported platforms
Add support for JDK 11.
This may be me being an idiot, so apologies in advance.
I generated an application with packr and attempted to codesign it using the suggested entitlements from the README. Here is the command I am using:
codesign --force --options runtime --deep --sign "$DIST_CERT" --entitlements ../../../../buildTools/entitlement.plist Feud.app
The notarization process gives me back the following log:
"issues": [
{
"severity": "error",
"code": null,
"path": "Feud.app.zip/Feud.app/Contents/Resources/feud_desktop.jar/libgdx-freetype64.dylib",
"message": "The binary is not signed.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "Feud.app.zip/Feud.app/Contents/Resources/feud_desktop.jar/libgdx-freetype64.dylib",
"message": "The signature does not include a secure timestamp.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "Feud.app.zip/Feud.app/Contents/Resources/feud_desktop.jar/libgdx64.dylib",
"message": "The binary is not signed.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "Feud.app.zip/Feud.app/Contents/Resources/feud_desktop.jar/libgdx64.dylib",
"message": "The signature does not include a secure timestamp.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "Feud.app.zip/Feud.app/Contents/Resources/feud_desktop.jar/liblwjgl.dylib",
"message": "The binary is not signed.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "Feud.app.zip/Feud.app/Contents/Resources/feud_desktop.jar/liblwjgl.dylib",
"message": "The signature does not include a secure timestamp.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "Feud.app.zip/Feud.app/Contents/Resources/feud_desktop.jar/liblwjgl.dylib",
"message": "The binary is not signed.",
"docUrl": null,
"architecture": "x86_64h"
},
{
"severity": "error",
"code": null,
"path": "Feud.app.zip/Feud.app/Contents/Resources/feud_desktop.jar/liblwjgl.dylib",
"message": "The signature does not include a secure timestamp.",
"docUrl": null,
"architecture": "x86_64h"
},
{
"severity": "error",
"code": null,
"path": "Feud.app.zip/Feud.app/Contents/Resources/feud_desktop.jar/openal.dylib",
"message": "The binary is not signed.",
"docUrl": null,
"architecture": "i386"
},
{
"severity": "error",
"code": null,
"path": "Feud.app.zip/Feud.app/Contents/Resources/feud_desktop.jar/openal.dylib",
"message": "The signature does not include a secure timestamp.",
"docUrl": null,
"architecture": "i386"
},
{
"severity": "error",
"code": null,
"path": "Feud.app.zip/Feud.app/Contents/Resources/feud_desktop.jar/openal.dylib",
"message": "The binary is not signed.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "Feud.app.zip/Feud.app/Contents/Resources/feud_desktop.jar/openal.dylib",
"message": "The signature does not include a secure timestamp.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "Feud.app.zip/Feud.app/Contents/Resources/feud_desktop.jar/openal.dylib",
"message": "The binary is not signed.",
"docUrl": null,
"architecture": "x86_64h"
},
{
"severity": "error",
"code": null,
"path": "Feud.app.zip/Feud.app/Contents/Resources/feud_desktop.jar/openal.dylib",
"message": "The signature does not include a secure timestamp.",
"docUrl": null,
"architecture": "x86_64h"
},
{
"severity": "error",
"code": null,
"path": "Feud.app.zip/Feud.app/Contents/Resources/feud_desktop.jar/libjinput-osx.jnilib",
"message": "The binary is not signed.",
"docUrl": null,
"architecture": "i386"
},
{
"severity": "error",
"code": null,
"path": "Feud.app.zip/Feud.app/Contents/Resources/feud_desktop.jar/libjinput-osx.jnilib",
"message": "The signature does not include a secure timestamp.",
"docUrl": null,
"architecture": "i386"
},
{
"severity": "error",
"code": null,
"path": "Feud.app.zip/Feud.app/Contents/Resources/feud_desktop.jar/libjinput-osx.jnilib",
"message": "The binary is not signed.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "Feud.app.zip/Feud.app/Contents/Resources/feud_desktop.jar/libjinput-osx.jnilib",
"message": "The signature does not include a secure timestamp.",
"docUrl": null,
"architecture": "x86_64"
},
{
"severity": "error",
"code": null,
"path": "Feud.app.zip/Feud.app/Contents/Resources/feud_desktop.jar/libjinput-osx.jnilib",
"message": "The binary is not signed.",
"docUrl": null,
"architecture": "x86_64h"
},
{
"severity": "error",
"code": null,
"path": "Feud.app.zip/Feud.app/Contents/Resources/feud_desktop.jar/libjinput-osx.jnilib",
"message": "The signature does not include a secure timestamp.",
"docUrl": null,
"architecture": "x86_64h"
}
]
It looks like the binaries inside the JAR don't get signed. I've tried unpacking the JAR, signing everything and zipping it up again, with no change.
Is this even a Packr issue? Do I need to do this signing myself as part of the build process? If you have access to the incantations of codesign
you used when testing that would be really helpful.
Thanks!
Hi, thanks a lot for this fork and the fixes/additions, I found them very useful.
However I can only get the Windows and Linux executables to properly work.
On MacOS when running the executable directly, it seemed to use the system JRE somehow, because even though I package a version 8 JRE, I got the error from libgdx#156 which indicates a 11+ JRE (which is the system one). When running it as an app bundle, after ignoring security warnings, simply nothing happens. On a Mac where the system JRE was 8, it seemed to work.
Hey there,
I'm running macOS 10.14.6 (Mojave). The generated .app has a cross through the icon, and trying to run it throws this error:
I'm invoking packr (latest) with the following command:
java -jar buildTools/packr.jar \
--platform mac \
--jdk $JDK_ZIP_MAC_NAME \
--executable feud \
--classpath feud_desktop.jar \
--mainclass com.bearwaves.feud.desktop.AnonymousDesktopLauncher \
--vmargs Xmx1G \
--icon desktop/icons.icns \
--minimizejre ./buildTools/minimise.json \
--output build/desktop/mac/Feud.app
This happens regardless of whether the application is signed.
Is there some configuration option I'm missing? Thanks so much for the fork.
I like to use an uncaught exception handler to give the user some feedback upon crashing and also get stacktrace.
This works well when simply running the jar. However when I run the executable, (.exe on windows in my case), the uncaught exception handler is not invoked at all.
I set the exception handler like this:
Thread.setDefaultUncaughtExceptionHandler((thread, exception) -> {
log.error(exception.getMessage(), exception);
exception.printStackTrace();
try {
javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
e.printStackTrace();
}
StringWriter sw = new StringWriter();
exception.printStackTrace(new PrintWriter(sw));
JTextArea jTextField = new JTextArea();
jTextField.setText("Please report this crash with the following info:\n" + sw.toString());
jTextField.setEditable(false);
JOptionPane.showMessageDialog(null, jTextField, "Uncaught Exception", JOptionPane.ERROR_MESSAGE);
});
Then I use a button to throw an uncaught exception as a test:
new Button().addListener(new ChangeListener() {
@Override
public void changed(ChangeEvent event, Actor actor) {
throw new RuntimeException("test");
}
});
Which gives me a dialog like this when running the jar:
But nothing happens with the .exe (just crash)
The msvcr*.dll filename on Windows is hard coded, it should be able to load whatever msvcr*.dll is shipped with the JRE
I have the same problem as this issue from the upstream project: libgdx#101
(I assume it's okay to open a similar issue here, since the issue also seems to be present in this fork)
When closing the window on OSX, the process stays active and it has to be forcefully stopped.
The info on my setup:
macOS x64
JDK8 from https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/downloads-list.htmlLwjglApplicationConfiguration.forceExit
to true or falseAdd a high level test that runs a hello world from the packr launched JVM
It spawns a new console window (just like libgdx/master), but it doesn't print anything in it. For comparison libgdx/master with -c --console --verbose
will print something like:
Loading JVM runtime library ...
Passing VM options ...
# -Xmx1G
Creating Java VM ...
Passing command line arguments ...
Loading JAR file ...
Adding 1 classpaths ...
# lib/myapp.jar
Invoking static com.acmeApplication.main() function ...
Hi, me again (sorry) ;)
I managed to get everything code signed and notarized correctly but the application doesn't seem to want to start on Catalina. I've verified it works by running the JAR directly via the packaged JVM, so I suspect the issue is with either the app bundle or the native executable.
Here's the output I managed to pull from the system log. I have no idea if it's relevant or helpful.
default 17:25:32.858017+0100 open LAUNCHING:0x0-0x23e23e Feud foreground=1 bringForward=1 seed=935 userActivityCount=0
default 17:25:32.871983+0100 runningboardd Resolved pid 54956 to [executable<feud(501)>:54956]
default 17:25:32.875329+0100 runningboardd [executable<feud(501)>:54956] This process will not be managed.
default 17:25:32.875545+0100 runningboardd Now tracking process: [executable<feud(501)>:54956]
default 17:25:32.879340+0100 runningboardd Acquiring assertion targeting executable<feud(501)> from originator [daemon<com.apple.coreservices.launchservicesd>:152] with description <RBSAssertionDescriptor; foregroundApp:54956; ID: 285-152-2042; target: 54956> attributes = {
<RBSDomainAttribute: 0x7fc02141c2d0; domain: com.apple.launchservicesd; name: RoleUserInteractiveNonFocal; sourceEnvironment: 0x0>;
}
default 17:25:32.880183+0100 runningboardd Assertion 285-152-2042 (target:executable<feud(501)>) will be created as active
default 17:25:32.883379+0100 runningboardd Acquiring assertion targeting executable<feud(501)> from originator [daemon<com.apple.coreservices.launchservicesd>:152] with description <RBSAssertionDescriptor; foregroundApp:54956; ID: 285-152-2043; target: 54956> attributes = {
<RBSDomainAttribute: 0x7fc021731160; domain: com.apple.launchservicesd; name: RoleUserInteractiveNonFocal; sourceEnvironment: 0x0>;
}
default 17:25:32.883894+0100 runningboardd Assertion 285-152-2043 (target:executable<feud(501)>) will be created as active
default 17:25:32.884119+0100 runningboardd [executable<feud(501)>:54956] Ignoring jetsam update because this process is not memory-managed
default 17:25:32.884663+0100 runningboardd [executable<feud(501)>:54956] Ignoring resume because this process is not lifecycle managed
default 17:25:32.884712+0100 runningboardd [executable<feud(501)>:54956] Set darwin role to: UserInteractiveNonFocal
default 17:25:32.884749+0100 runningboardd [executable<feud(501)>:54956] Ignoring GPU update because this process is not GPU managed
default 17:25:32.886707+0100 runningboardd Finished acquiring assertion 285-152-2043 (target:executable<feud(501)>)
default 17:25:32.882399+0100 distnoted register name: com.apple.sharedfilelist.change object: com.apple.LSSharedFileList.ApplicationRecentDocuments/com.bearwaves.feud.desktop token: f456d pid: 464
default 17:25:32.870583+0100 loginwindow -[PersistentAppsSupport applicationReady:] | App: Feud, ready, updating active tracking timer
default 17:25:32.886826+0100 runningboardd Invalidating assertion 285-152-2042 (target:executable<feud(501)>) from originator 152
default 17:25:32.870670+0100 loginwindow -[ApplicationManager checkInAppContext:eventData:] | ApplicationManager: Checked in app : Feud
default 17:25:32.887087+0100 runningboardd Finished acquiring assertion 285-152-2042 (target:executable<feud(501)>)
default 17:25:33.606785+0100 feud HALPlugInManagement::RegisterPlugIns: skipping in-process plug-ins
error 17:25:33.606836+0100 feud AddInstanceForFactory: No factory registered for id <CFUUID 0x60000188a0e0> F8BB1C28-BAE8-11D6-9C31-00039315CD46
error 17:25:33.622128+0100 feud HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine
error 17:25:33.622684+0100 feud HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine
default 17:27:33.514640+0100 runningboardd Acquiring assertion targeting executable<feud(501)> from originator [daemon<com.apple.coreservices.launchservicesd>:152] with description <RBSAssertionDescriptor; frontmost:54956; ID: 285-152-2058; target: 54956> attributes = {
<RBSDomainAttribute: 0x7fc021433af0; domain: com.apple.launchservicesd; name: RoleUserInteractiveFocal; sourceEnvironment: 0x0>;
}
default 17:27:33.514885+0100 runningboardd Assertion 285-152-2058 (target:executable<feud(501)>) will be created as active
default 17:27:33.516122+0100 runningboardd [executable<feud(501)>:54956] Ignoring jetsam update because this process is not memory-managed
default 17:27:33.516351+0100 runningboardd Finished acquiring assertion 285-152-2058 (target:executable<feud(501)>)
default 17:27:33.516494+0100 runningboardd [executable<feud(501)>:54956] Set darwin role to: UserInteractiveFocal
default 17:27:33.516801+0100 runningboardd [executable<feud(501)>:54956] Ignoring GPU update because this process is not GPU managed
default 17:27:44.044856+0100 loginwindow -[PersistentAppsSupport applicationQuit:] | for app:Feud, _appTrackingState = 2
default 17:27:44.044905+0100 loginwindow -[PersistentAppsSupport applicationQuit:] | App: Feud, quit, updating active tracking timer
default 17:27:44.045258+0100 runningboardd Invalidating assertion 285-152-2058 (target:executable<feud(501)>) from originator 152
default 17:27:44.050400+0100 runningboardd [executable<feud(501)>:54956] Death sentinel fired!
default 17:27:44.052436+0100 runningboardd Invalidating assertion 285-152-2043 (target:executable<feud(501)>) from originator 152
default 17:27:44.154841+0100 runningboardd [executable<feud(501)>:54956] Ignoring jetsam update because this process is not memory-managed
default 17:27:44.155087+0100 runningboardd [executable<feud(501)>:54956] Ignoring suspend because this process is not lifecycle managed
default 17:27:44.155328+0100 runningboardd [executable<feud(501)>:54956] Ignoring GPU update because this process is not GPU managed
default 17:27:44.156605+0100 runningboardd Removing process: [executable<feud(501)>:54956]
default 17:27:44.167346+0100 runningboardd Removing assertions for terminated process: [executable<feud(501)>:54956]
The error logs are these ones:
error 17:25:33.606836+0100 feud AddInstanceForFactory: No factory registered for id <CFUUID 0x60000188a0e0> F8BB1C28-BAE8-11D6-9C31-00039315CD46
error 17:25:33.622128+0100 feud HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine
error 17:25:33.622684+0100 feud HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine
These errors aren't thrown when running on Mojave.
When executed, the application simply hangs, with no error message. This happens even when running the binary via the terminal.
Thanks,
Joel
Mac and Linux are distributed as tar gz files.
Updates the readme
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.