forked from HumbleUI/JWM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
native_image.py
executable file
·36 lines (32 loc) · 1.15 KB
/
native_image.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#! /usr/bin/env python3
import common, glob, os, platform, shutil, subprocess, sys
def main():
os.chdir(os.path.dirname(__file__) + '/..')
os.makedirs('target', exist_ok=True)
subprocess.check_call(
["jar",
"--create",
"--file", "target/jwm.jar",
"--main-class", "io.github.humbleui.jwm.examples.Example",
"-C", "macos/target/classes", ".",
"-C", "shared/target/classes", ".",
"-C", "examples/target/classes", ".",
"-C", "/Users/prokopov/ws/skija/shared/target/classes", ".",])
shutil.copy('macos/build/libjwm_x64.dylib', 'target')
shutil.copy('/Users/prokopov/ws/skija/native/build/libskija_x64.dylib', 'target')
os.chdir('target')
# https://github.com/cubuspl42/JavaFX-Graal-HelloWorld
# https://github.com/maxum2610/HelloJFX-GraalSVM
subprocess.check_call([
'/Library/Java/JavaVirtualMachines/graalvm-ce-java16-21.1.0/Contents/Home/bin/native-image',
'--server-shutdown-all',
'--no-fallback',
'--report-unsupported-elements-at-runtime',
'--enable-all-security-services',
'--allow-incomplete-classpath',
'-H:+JNI',
'-jar', 'jwm.jar'
])
return 0
if __name__ == '__main__':
sys.exit(main())