Skip to content

Commit

Permalink
Merge pull request #1095 from gouttegd/release-5.6.0-new-launcher
Browse files Browse the repository at this point in the history
Use universal launcher for 5.6.0
  • Loading branch information
gouttegd authored Jan 13, 2023
2 parents 7ea4dc4 + b9d9531 commit fe3328a
Show file tree
Hide file tree
Showing 21 changed files with 73 additions and 101 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>edu.stanford.protege</groupId>
<artifactId>protege-parent</artifactId>
<version>5.6.0-beta-1-SNAPSHOT</version>
<version>5.6.0-beta-2-SNAPSHOT</version>
<packaging>pom</packaging>

<name>protege-parent</name>
Expand Down
2 changes: 1 addition & 1 deletion protege-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>edu.stanford.protege</groupId>
<artifactId>protege-parent</artifactId>
<version>5.6.0-beta-1-SNAPSHOT</version>
<version>5.6.0-beta-2-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>

Expand Down
58 changes: 1 addition & 57 deletions protege-desktop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>edu.stanford.protege</groupId>
<artifactId>protege-parent</artifactId>
<version>5.6.0-beta-1-SNAPSHOT</version>
<version>5.6.0-beta-2-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>

Expand Down Expand Up @@ -145,62 +145,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<version>2.1.3</version>
<executions>
<execution>
<configuration>
<headerType>gui</headerType>
<outfile>target/Protege.exe</outfile>
<dontWrapJar>true</dontWrapJar>
<jar>bin/protege-launcher.jar</jar>
<errTitle>Protege</errTitle>
<icon>src/main/resources/app/Protege.ico</icon>
<stayAlive>true</stayAlive>
<chdir>.</chdir>
<classPath>
<mainClass>org.protege.osgi.framework.Launcher</mainClass>
<addDependencies>false</addDependencies>
<preCp>bundles/guava.jar;bundles/logback-classic.jar;bundles/logback-core.jar;bundles/slf4j-api.jar;bundles/glassfish-corba-orb.jar;bin/org.apache.felix.main.jar;bin/maven-artifact.jar;bin/protege-launcher.jar</preCp>
</classPath>
<jre>
<path>jre</path>
<minVersion>11.0.1</minVersion>
<bundledJreAsFallback>false</bundledJreAsFallback>
<bundledJre64Bit>true</bundledJre64Bit>
<!-- <initialHeapSize>${conf.mem.xms}</initialHeapSize> -->
<!-- <maxHeapSize>${conf.mem.xmx}</maxHeapSize> -->
<opts>
<!-- <opt>-Xss${conf.mem.xss}M</opt> -->
<opt>${conf.extra.args}</opt>
<opt>-DentityExpansionLimit=100000000</opt>
<opt>-Dlogback.configurationFile=conf/logback-win.xml</opt>
<opt>-Dfile.encoding=utf-8</opt>
<opt>-Dorg.protege.plugin.dir=plugins</opt>
</opts>
</jre>
<versionInfo>
<fileVersion>5.0.0.0</fileVersion>
<txtFileVersion>Protégé ${project.version}</txtFileVersion>
<fileDescription>Protégé Ontology Editor</fileDescription>
<copyright>Stanford University</copyright>
<productVersion>5.0.0.0</productVersion>
<txtProductVersion>Protégé ${project.version}</txtProductVersion>
<productName>Protégé</productName>
<internalName>Protege</internalName>
<originalFilename>Protege.exe</originalFilename>
</versionInfo>
</configuration>
<phase>package</phase>
<goals>
<goal>launch4j</goal>
</goals>
</execution>
</executions>
</plugin>


<plugin>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down
12 changes: 2 additions & 10 deletions protege-desktop/src/main/assembly/dependency-sets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,11 @@
<dependencySets>

<dependencySet>
<outputDirectory>bin</outputDirectory>
<outputDirectory>bundles</outputDirectory>
<includes>
<include>edu.stanford.protege:protege-launcher:jar</include>
<include>org.apache.felix:org.apache.felix.main:jar</include>
<include>org.apache.maven:maven-artifact</include>
</includes>
<useStrictFiltering>true</useStrictFiltering>
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
</dependencySet>

<dependencySet>
<outputDirectory>bundles</outputDirectory>
<includes>
<include>edu.stanford.protege:protege-common:jar</include>
<include>edu.stanford.protege:protege-editor-core:jar</include>
<include>org.eclipse.equinox:org.eclipse.equinox.registry:jar</include>
Expand Down Expand Up @@ -57,4 +49,4 @@
</dependencySet>

</dependencySets>
</component>
</component>
13 changes: 12 additions & 1 deletion protege-desktop/src/main/assembly/protege-linux.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,22 @@
<outputDirectory>.</outputDirectory>
<fileMode>0755</fileMode>
<directoryMode>0755</directoryMode>
<filtered>true</filtered>
<excludes>
<exclude>run.sh</exclude>
</excludes>
</fileSet>

</fileSets>

<files>
<file>
<source>src/main/env/linux/run.sh</source>
<outputDirectory>.</outputDirectory>
<fileMode>0755</fileMode>
<filtered>true</filtered>
</file>
</files>

<dependencySets>

<dependencySet>
Expand Down
20 changes: 12 additions & 8 deletions protege-desktop/src/main/assembly/protege-os-x.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,23 +99,27 @@
<directory>src/main/resources</directory>
<outputDirectory>${osx.bundle.name}/Contents</outputDirectory>
<includes>
<include>conf/*</include>
<include>conf/**</include>
</includes>
</fileSet>


<fileSet>
<directory>src/main/env/os-x/bundle-resources</directory>
<directory>src/main/env/os-x</directory>
<outputDirectory>${osx.bundle.name}/Contents/</outputDirectory>
<excludes>
<exclude>Info.plist</exclude>
</excludes>
</fileSet>

<!-- This is done separately in order to use resource filtering to incorporate version info -->
<fileSet>
<directory>src/main/env/os-x/bundle-info</directory>
</fileSets>

<files>
<file>
<source>src/main/env/os-x/Info.plist</source>
<outputDirectory>${osx.bundle.name}/Contents/</outputDirectory>
<filtered>true</filtered>
</fileSet>

</fileSets>
</file>
</files>

</assembly>
20 changes: 11 additions & 9 deletions protege-desktop/src/main/assembly/protege-win.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,21 @@
<outputDirectory>.</outputDirectory>
<fileMode>0755</fileMode>
<directoryMode>0755</directoryMode>
<filtered>true</filtered>
<excludes>
<exclude>run.bat</exclude>
</excludes>
</fileSet>

<fileSet>
<directory>target</directory>
</fileSets>

<files>
<file>
<source>src/main/env/win/run.bat</source>
<outputDirectory>.</outputDirectory>
<fileMode>0755</fileMode>
<includes>
<include>Protege.exe</include>
</includes>
</fileSet>

</fileSets>
<filtered>true</filtered>
</file>
</files>

<dependencySets>

Expand Down
Binary file added protege-desktop/src/main/env/linux/protege
Binary file not shown.
14 changes: 10 additions & 4 deletions protege-desktop/src/main/env/linux/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,29 @@ done
cd "$( cd -P "$( dirname "$SOURCE" )" && pwd )"

conf_file=
if [ -f "$HOME/.protege/conf/jvm.conf" ]; then
conf_file="$HOME/.protege/conf/jvm.conf"
if [ -f "$HOME/.Protege/conf/jvm.conf" ]; then
conf_file="$HOME/.Protege/conf/jvm.conf"
elif [ -f conf/jvm.conf ]; then
conf_file=conf/jvm.conf
fi

EXTRA_JVM_OPTIONS=
EFFECTIVE_JAVA_HOME=
if [ -n "$conf_file" ]; then
EXTRA_JVM_OPTIONS=$(sed -n 's/^max_heap_size=/-Xmx/p; s/^min_heap_size=/-Xms/p; s/^stack_size=/-Xss/p; s/^append=//p;' "$conf_file" | tr '\n' ' ')
EFFECTIVE_JAVA_HOME=$(sed -n 's/^java_home=//p' "$conf_file")
fi

jre/bin/java \
[ -z "$EFFECTIVE_JAVA_HOME" ] && EFFECTIVE_JAVA_HOME="$PROTEGE_JAVA_HOME"
[ -z "$EFFECTIVE_JAVA_HOME" -a ! -d jre ] && EFFECTIVE_JAVA_HOME="$JAVA_HOME"
[ -z "$EFFECTIVE_JAVA_HOME" ] && EFFECTIVE_JAVA_HOME="jre"

$EFFECTIVE_JAVA_HOME/bin/java \
-DentityExpansionLimit=100000000 \
-Dlogback.configurationFile=conf/logback.xml \
-Dfile.encoding=UTF-8 \
${conf.extra.args} \
-classpath bundles/guava.jar:bundles/logback-classic.jar:bundles/logback-core.jar:bundles/slf4j-api.jar:bundles/glassfish-corba-orb.jar:bin/org.apache.felix.main.jar:bin/maven-artifact.jar:bin/protege-launcher.jar \
-classpath bundles/guava.jar:bundles/logback-classic.jar:bundles/logback-core.jar:bundles/slf4j-api.jar:bundles/glassfish-corba-orb.jar:bundles/org.apache.felix.main.jar:bundles/maven-artifact.jar:bundles/protege-launcher.jar \
$CMD_OPTIONS $EXTRA_JVM_OPTIONS org.protege.osgi.framework.Launcher $1


Expand Down
Binary file added protege-desktop/src/main/env/os-x/MacOS/protege
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion protege-desktop/src/main/env/platform-independent/run.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
setlocal
cd /d %~dp0
java ${conf.extra.args} -DentityExpansionLimit=100000000 -Dlogback.configurationFile=conf/logback-win.xml -Dfile.encoding=utf-8 -Dorg.protege.plugin.dir=plugins -classpath bundles/guava.jar;bundles/logback-classic.jar;bundles/logback-core.jar;bundles/slf4j-api.jar;bundles/glassfish-corba-orb.jar;bin/org.apache.felix.main.jar;bin/maven-artifact.jar;bin/protege-launcher.jar org.protege.osgi.framework.Launcher %1
java ${conf.extra.args} -DentityExpansionLimit=100000000 -Dlogback.configurationFile=conf/logback-win.xml -Dfile.encoding=utf-8 -Dorg.protege.plugin.dir=plugins -classpath bundles/guava.jar;bundles/logback-classic.jar;bundles/logback-core.jar;bundles/slf4j-api.jar;bundles/glassfish-corba-orb.jar;bundles/org.apache.felix.main.jar;bundles/maven-artifact.jar;bundles/protege-launcher.jar org.protege.osgi.framework.Launcher %1
15 changes: 11 additions & 4 deletions protege-desktop/src/main/env/platform-independent/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,29 @@ done
cd "$( cd -P "$( dirname "$SOURCE" )" && pwd )"

conf_file=
if [ -f "$HOME/.protege/conf/jvm.conf" ]; then
conf_file="$HOME/.protege/conf/jvm.conf"
if [ -f "$HOME/.Protege/conf/jvm.conf" ]; then
conf_file="$HOME/.Protege/conf/jvm.conf"
elif [ -f conf/jvm.conf ]; then
conf_file=conf/jvm.conf
fi

EXTRA_JVM_OPTIONS=
EFFECTIVE_JAVA_HOME=
if [ -n "$conf_file" ]; then
EXTRA_JVM_OPTIONS=$(sed -n 's/^max_heap_size=/-Xmx/p; s/^min_heap_size=/-Xms/p; s/^stack_size=/-Xss/p; s/^append=//p;' "$conf_file" | tr '\n' ' ')
EFFECTIVE_JAVA_HOME=$(sed -n 's/^java_home=//p' "$conf_file")
fi

java -Dlogback.configurationFile=conf/logback.xml \
[ -z "$EFFECTIVE_JAVA_HOME" ] && EFFECTIVE_JAVA_HOME="$PROTEGE_JAVA_HOME"
[ -z "$EFFECTIVE_JAVA_HOME" -a ! -d jre ] && EFFECTIVE_JAVA_HOME="$JAVA_HOME"
[ -z "$EFFECTIVE_JAVA_HOME" ] && EFFECTIVE_JAVA_HOME="jre"

$EFFECTIVE_JAVA_HOME/bin/java \
-DentityExpansionLimit=100000000 \
-Dlogback.configurationFile=conf/logback.xml \
-Dfile.encoding=UTF-8 \
${conf.extra.args} \
-classpath bundles/guava.jar:bundles/logback-classic.jar:bundles/logback-core.jar:bundles/slf4j-api.jar:bundles/glassfish-corba-orb.jar:bin/org.apache.felix.main.jar:bin/maven-artifact.jar:bin/protege-launcher.jar \
-classpath bundles/guava.jar:bundles/logback-classic.jar:bundles/logback-core.jar:bundles/slf4j-api.jar:bundles/glassfish-corba-orb.jar:bundles/org.apache.felix.main.jar:bundles/maven-artifact.jar:bundles/protege-launcher.jar \
$CMD_OPTIONS $EXTRA_JVM_OPTIONS org.protege.osgi.framework.Launcher $1


Expand Down
Binary file added protege-desktop/src/main/env/win/Protege.exe
Binary file not shown.
8 changes: 7 additions & 1 deletion protege-desktop/src/main/env/win/Protege.l4j.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# Uncomment the following line to set the maximal heap size to 8GB
# The preferred way to pass Java options to Protege is to use the
# conf/jvm.conf file. The present file is ignored when conf/jvm.conf
# is present.
# To use this file, delete or rename the conf/jvm.conf file, then
# append Java options below, one per line.
# For example, to set the maximal heap size to 8GB, uncomment the
# following line:
#-Xmx8G
2 changes: 1 addition & 1 deletion protege-desktop/src/main/env/win/run.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
setlocal
cd /d %~dp0
jre\bin\java ${conf.extra.args} -DentityExpansionLimit=100000000 -Dlogback.configurationFile=conf/logback-win.xml -Dfile.encoding=utf-8 -Dorg.protege.plugin.dir=plugins -classpath bundles/guava.jar;bundles/logback-classic.jar;bundles/logback-core.jar;bundles/slf4j-api.jar;bundles/glassfish-corba-orb.jar;bin/org.apache.felix.main.jar;bin/maven-artifact.jar;bin/protege-launcher.jar org.protege.osgi.framework.Launcher %1
jre\bin\java ${conf.extra.args} -DentityExpansionLimit=100000000 -Dlogback.configurationFile=conf/logback-win.xml -Dfile.encoding=utf-8 -Dorg.protege.plugin.dir=plugins -classpath bundles/guava.jar;bundles/logback-classic.jar;bundles/logback-core.jar;bundles/slf4j-api.jar;bundles/glassfish-corba-orb.jar;bundles/org.apache.felix.main.jar;bundles/maven-artifact.jar;bundles/protege-launcher.jar org.protege.osgi.framework.Launcher %1
2 changes: 1 addition & 1 deletion protege-editor-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>edu.stanford.protege</groupId>
<artifactId>protege-parent</artifactId>
<version>5.6.0-beta-1-SNAPSHOT</version>
<version>5.6.0-beta-2-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion protege-editor-owl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>edu.stanford.protege</groupId>
<artifactId>protege-parent</artifactId>
<version>5.6.0-beta-1-SNAPSHOT</version>
<version>5.6.0-beta-2-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion protege-launcher/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>edu.stanford.protege</groupId>
<artifactId>protege-parent</artifactId>
<version>5.6.0-beta-1-SNAPSHOT</version>
<version>5.6.0-beta-2-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>

Expand Down

0 comments on commit fe3328a

Please sign in to comment.