HumbleUI / JWM

Cross-platform window management and OS integration library for Java
Apache License 2.0
552 stars 44 forks source link

Fix native image example #164

Closed i10416 closed 2 years ago

i10416 commented 2 years ago

I notice that packaging script does not include native libs. Thus, application fails to run when using the jar packaged by script/package.py. Is this intentional or should I fix this too? https://github.com/HumbleUI/JWM/issues/163

tonsky commented 2 years ago

Sharing example sources looks great!

I have only two concerns:

First, I am not a big fan of scripts that do the same thing but slightly different. What would you say if we make package.py accept --version argument and include native artifacts from (windows|linux|macos)/build directory? It will work both for CI and for the local development.

Then publish_local.py could focus on actually publishing jar/pom. It could either invoke package.py or just expect libs to be there.

Second,

I see you suggest editing Dependencies.scala before running an example. A simpler solution might be to always publish version 0.0.0-SNAPSHOT and use it as default it in Dependencies.scala. That way you could run example without editing anything, and it will always rely on latest version. What do you think?

i10416 commented 2 years ago

@tonsky

First, I am not a big fan of scripts that do the same thing but slightly different.

I agree with you. I separated package function into smaller ones and removed copy-pasted code from publish_local.py.

It is good idea to use 0.0.0-SNAPSHOT as default. Thank you.

tonsky commented 2 years ago

Merged, thanks!