From c1869ee0fed3ca982a8dbc59110dc0f0e83b8545 Mon Sep 17 00:00:00 2001 From: Xerxes Rånby Date: Thu, 20 Aug 2015 20:07:24 +0200 Subject: doc/misc/robovm.txt: Writedown howto use JogAmp in combination with RoboVM AOT --- doc/misc/robovm.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/misc/robovm.txt (limited to 'doc/misc') diff --git a/doc/misc/robovm.txt b/doc/misc/robovm.txt new file mode 100644 index 000000000..3b5606db4 --- /dev/null +++ b/doc/misc/robovm.txt @@ -0,0 +1,15 @@ +#get jogamp and robovm +wget http://download.robovm.org/nightlies/robovm-1.6.1-SNAPSHOT-20150820_014200-647.tar.gz +wget http://jogamp.org/deployment/archive/master/gluegen_885-joal_611-jogl_1424-jocl_1073/fat/jogamp-fat.jar + +#unpack +tar zxvf robovm-1.6.1-SNAPSHOT-20150820_014200-647.tar.gz + +#compile using robovm +./robovm-1.6.1-SNAPSHOT/bin/robovm -verbose -dynamic-jni -forcelinkclasses jogamp.**:com.jogamp.** -cp jogamp-fat.jar com.jogamp.newt.opengl.GLWindow + +#run +cd com.jogamp.newt.opengl.GLWindow +#robovm currently fail to find natives inside jars, unpack them +unzip lib/jogamp-fat.jar natives/*/* +time ./com.jogamp.newt.opengl.GLWindow -- cgit v1.2.3 From 20dc629cb92f48412090ab020c1d5a282ceaa268 Mon Sep 17 00:00:00 2001 From: Xerxes Rånby Date: Thu, 20 Aug 2015 20:21:12 +0200 Subject: doc/misc/robovm.txt: Mention -rvm: runtime flags --- doc/misc/robovm.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'doc/misc') diff --git a/doc/misc/robovm.txt b/doc/misc/robovm.txt index 3b5606db4..7d457c0cb 100644 --- a/doc/misc/robovm.txt +++ b/doc/misc/robovm.txt @@ -13,3 +13,15 @@ cd com.jogamp.newt.opengl.GLWindow #robovm currently fail to find natives inside jars, unpack them unzip lib/jogamp-fat.jar natives/*/* time ./com.jogamp.newt.opengl.GLWindow + +# Runtime options +# All robovm runtimeoptions starts with +# -rvm: +# +# To set jogamp specific java properties use +# -rvm:Djogamp.debug +# -rvm:Djogl.debug +# +# for more rvm flag examples see +# https://github.com/robovm/robovm/wiki/Hacking-on-RoboVM#controlling-a-robovm-executable +time ./com.jogamp.newt.opengl.GLWindow -rvm:Djogl.debug -- cgit v1.2.3 From cdef0114f029698d129762a5da9edbf77de174c7 Mon Sep 17 00:00:00 2001 From: Xerxes Rånby Date: Tue, 8 Sep 2015 09:50:38 +0200 Subject: doc/misc/robovm.txt: Explore low footprint deployment 6.3Mb --- doc/misc/robovm.txt | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) (limited to 'doc/misc') diff --git a/doc/misc/robovm.txt b/doc/misc/robovm.txt index 7d457c0cb..4c522807f 100644 --- a/doc/misc/robovm.txt +++ b/doc/misc/robovm.txt @@ -1,19 +1,21 @@ #get jogamp and robovm -wget http://download.robovm.org/nightlies/robovm-1.6.1-SNAPSHOT-20150820_014200-647.tar.gz -wget http://jogamp.org/deployment/archive/master/gluegen_885-joal_611-jogl_1424-jocl_1073/fat/jogamp-fat.jar +wget http://download.robovm.org/nightlies/robovm-1.7.1-SNAPSHOT-20150903_014201-674.tar.gz +wget http://jogamp.org/deployment/archive/master/gluegen_886-joal_612-jogl_1433-jocl_1079-signed/fat/jogamp-fat.jar #unpack -tar zxvf robovm-1.6.1-SNAPSHOT-20150820_014200-647.tar.gz +tar zxvf robovm-1.7.1-SNAPSHOT-20150903_014201-674.tar.gz #compile using robovm -./robovm-1.6.1-SNAPSHOT/bin/robovm -verbose -dynamic-jni -forcelinkclasses jogamp.**:com.jogamp.** -cp jogamp-fat.jar com.jogamp.newt.opengl.GLWindow +./robovm-1.7.1-SNAPSHOT/bin/robovm -verbose -dynamic-jni -forcelinkclasses jogamp.**:com.jogamp.** -cp jogamp-fat.jar com.jogamp.newt.opengl.GLWindow #run cd com.jogamp.newt.opengl.GLWindow #robovm currently fail to find natives inside jars, unpack them -unzip lib/jogamp-fat.jar natives/*/* +unzip -o lib/jogamp-fat.jar natives/*/* time ./com.jogamp.newt.opengl.GLWindow + + # Runtime options # All robovm runtimeoptions starts with # -rvm: @@ -25,3 +27,32 @@ time ./com.jogamp.newt.opengl.GLWindow # for more rvm flag examples see # https://github.com/robovm/robovm/wiki/Hacking-on-RoboVM#controlling-a-robovm-executable time ./com.jogamp.newt.opengl.GLWindow -rvm:Djogl.debug + + +# Make the generated robovm binary smaller +# we can use the robovm -treeshaker aggressive to remove classes from the binary +# and we can more carefully select which nativewindow backends to include using forcelinkclasses. +# finally we can reduce the size using strip and upx +./robovm-1.7.1-SNAPSHOT/bin/robovm -treeshaker aggressive -verbose -dynamic-jni -forcelinkclasses jogamp.nativewindow.x11.X11GraphicsConfigurationFactory:jogamp.** -cp jogamp-fat.jar com.jogamp.newt.opengl.GLWindow +cd com.jogamp.newt.opengl.GLWindow +strip com.jogamp.newt.opengl.GLWindow +upx com.jogamp.newt.opengl.GLWindow +# the final binary is then below 5Mb! +# du -s -h com.jogamp.newt.opengl.GLWindow +# 4,7M com.jogamp.newt.opengl.GLWindow + + + +# Real world example using jogl-demos compressed to small size: 6,3Mb +wget http://jogamp.org/deployment/archive/master/gluegen_886-joal_612-jogl_1433-jocl_1079-signed/archive/jogl-demos.7z +7z x jogl-demos.7z +./robovm-1.7.1-SNAPSHOT/bin/robovm -treeshaker aggressive -verbose -dynamic-jni -forcelinkclasses jogamp.nativewindow.x11.X11GraphicsConfigurationFactory:jogamp.** -cp jogamp-fat.jar:jogl-demos/jar/jogl-demos.jar demos.es2.RawGL2ES2demo +cd demos.es2.RawGL2ES2demo +unzip -o lib/jogamp-fat.jar natives/*/* +zip -d lib/jogamp-fat.jar natives/*/* +strip demos.es2.RawGL2ES2demo +upx demos.es2.RawGL2ES2demo +chmod +x natives/*/* +strip natives/*/* +upx natives/*/* +./demos.es2.RawGL2ES2demo -- cgit v1.2.3 From 8b1e9185aedc070b5f6cddfe361f54dc5d310eec Mon Sep 17 00:00:00 2001 From: Xerxes Rånby Date: Fri, 30 Oct 2015 14:23:39 +0100 Subject: doc/misc/robovm.txt: Update to JogAmp JOGL 2.3.2 and last libre RoboVM 1.6.1 --- doc/misc/robovm.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'doc/misc') diff --git a/doc/misc/robovm.txt b/doc/misc/robovm.txt index 4c522807f..a7099752f 100644 --- a/doc/misc/robovm.txt +++ b/doc/misc/robovm.txt @@ -1,12 +1,12 @@ #get jogamp and robovm -wget http://download.robovm.org/nightlies/robovm-1.7.1-SNAPSHOT-20150903_014201-674.tar.gz -wget http://jogamp.org/deployment/archive/master/gluegen_886-joal_612-jogl_1433-jocl_1079-signed/fat/jogamp-fat.jar +wget https://libgdx.badlogicgames.com/robovm/robovm-1.6.1-SNAPSHOT.tar.gz +wget http://jogamp.org/deployment/jogamp-current/fat/jogamp-fat.jar #unpack -tar zxvf robovm-1.7.1-SNAPSHOT-20150903_014201-674.tar.gz +tar zxvf robovm-1.6.1-SNAPSHOT.tar.gz #compile using robovm -./robovm-1.7.1-SNAPSHOT/bin/robovm -verbose -dynamic-jni -forcelinkclasses jogamp.**:com.jogamp.** -cp jogamp-fat.jar com.jogamp.newt.opengl.GLWindow +./robovm-1.6.1-SNAPSHOT/bin/robovm -verbose -dynamic-jni -forcelinkclasses jogamp.**:com.jogamp.** -cp jogamp-fat.jar com.jogamp.newt.opengl.GLWindow #run cd com.jogamp.newt.opengl.GLWindow @@ -33,7 +33,7 @@ time ./com.jogamp.newt.opengl.GLWindow -rvm:Djogl.debug # we can use the robovm -treeshaker aggressive to remove classes from the binary # and we can more carefully select which nativewindow backends to include using forcelinkclasses. # finally we can reduce the size using strip and upx -./robovm-1.7.1-SNAPSHOT/bin/robovm -treeshaker aggressive -verbose -dynamic-jni -forcelinkclasses jogamp.nativewindow.x11.X11GraphicsConfigurationFactory:jogamp.** -cp jogamp-fat.jar com.jogamp.newt.opengl.GLWindow +./robovm-1.6.1-SNAPSHOT/bin/robovm -treeshaker aggressive -verbose -dynamic-jni -forcelinkclasses jogamp.nativewindow.x11.X11GraphicsConfigurationFactory:jogamp.** -cp jogamp-fat.jar com.jogamp.newt.opengl.GLWindow cd com.jogamp.newt.opengl.GLWindow strip com.jogamp.newt.opengl.GLWindow upx com.jogamp.newt.opengl.GLWindow @@ -44,9 +44,9 @@ upx com.jogamp.newt.opengl.GLWindow # Real world example using jogl-demos compressed to small size: 6,3Mb -wget http://jogamp.org/deployment/archive/master/gluegen_886-joal_612-jogl_1433-jocl_1079-signed/archive/jogl-demos.7z +wget http://jogamp.org/deployment/jogamp-current/archive/jogl-demos.7z 7z x jogl-demos.7z -./robovm-1.7.1-SNAPSHOT/bin/robovm -treeshaker aggressive -verbose -dynamic-jni -forcelinkclasses jogamp.nativewindow.x11.X11GraphicsConfigurationFactory:jogamp.** -cp jogamp-fat.jar:jogl-demos/jar/jogl-demos.jar demos.es2.RawGL2ES2demo +./robovm-1.6.1-SNAPSHOT/bin/robovm -treeshaker aggressive -verbose -dynamic-jni -forcelinkclasses jogamp.nativewindow.x11.X11GraphicsConfigurationFactory:jogamp.** -cp jogamp-fat.jar:jogl-demos/jar/jogl-demos.jar demos.es2.RawGL2ES2demo cd demos.es2.RawGL2ES2demo unzip -o lib/jogamp-fat.jar natives/*/* zip -d lib/jogamp-fat.jar natives/*/* -- cgit v1.2.3