Skip to content

Instantly share code, notes, and snippets.

@FantomJAC
Created December 4, 2013 23:40
Show Gist options
  • Save FantomJAC/7797663 to your computer and use it in GitHub Desktop.
Save FantomJAC/7797663 to your computer and use it in GitHub Desktop.
A rootfs tool for OpenJFX8 custom sdk build.
#!/bin/bash
#
# Copyright (c) 2013 Shotaro Uchida <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
createSDK() {
RT=./rt
echo "Using OpenJFX working directory at $RT"
if [ ! -d ${RT}/build/${SDK} ]; then
echo "SDK Build ${SDK} not found."
exit 1
fi
echo "Creating JFX SDK..."
tar cfz ${SDK}-lib.tar.gz -C ${RT}/build/${SDK}/rt lib
}
removeJFX() {
echo "Removing JFX..."
rm ${JRE_HOME}/lib/jfxswt.jar
rm ${JRE_HOME}/lib/javafx.platform.properties
rm ${JRE_HOME}/lib/javafx.properties
rm ${JRE_HOME}/lib/ext/jfxrt*.jar
rm ${JRE_HOME}/lib/arm/libdecora_sse.so
rm ${JRE_HOME}/lib/arm/libfxplugins.so
rm ${JRE_HOME}/lib/arm/libglass*.so
rm ${JRE_HOME}/lib/arm/libgstreamer*.so
rm ${JRE_HOME}/lib/arm/libjavafx*.so
rm ${JRE_HOME}/lib/arm/libjfx*.so
rm ${JRE_HOME}/lib/arm/liblens*.so
rm ${JRE_HOME}/lib/arm/libprism*.so
}
installJFX() {
echo "Install JFX..."
tar xfz ${SDK}-lib.tar.gz -C ${JRE_HOME}
}
if [ -z $1 ]; then
echo "usage: update-jfx.sh ROOTFS"
exit 1
else
ROOTFS=$1
fi
JDK_HOME=${ROOTFS}/opt/jdk1.8.0
JRE_HOME=${JDK_HOME}/jre
SDK=armv7hf-sdk
if [ ! -e ${SDK}-lib.tar.gz ]; then
createSDK
fi
removeJFX
installJFX
echo "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment