Skip to content

Commit

Permalink
fix: .bat file in bundle without jre
Browse files Browse the repository at this point in the history
  • Loading branch information
jcharlet committed Feb 21, 2020
1 parent 1c2c947 commit 2552873
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 2 deletions.
4 changes: 2 additions & 2 deletions droid-binary/bin/droid.bat
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ IF "%1"=="" GOTO NOPARAM

:PARAM
REM Has command-line parameters -- run command-line version:
%DROID_HOME%/jre/bin/java %DROID_OPTIONS% -jar "%DROID_HOME%droid-command-line-${project.version}.jar" %*
${JRE_BIN_PATH}java %DROID_OPTIONS% -jar "%DROID_HOME%droid-command-line-${project.version}.jar" %*

GOTO end

:NOPARAM
REM No command-line parameters passed -- run GUI version:
start %DROID_HOME%/jre/bin/javaw %DROID_OPTIONS% -jar "%DROID_HOME%droid-ui-${project.version}.jar"
start ${JRE_BIN_PATH}javaw %DROID_OPTIONS% -jar "%DROID_HOME%droid-ui-${project.version}.jar"

:END
6 changes: 6 additions & 0 deletions droid-binary/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@
<goal>single</goal> <!-- goals == mojos -->
</goals>
<configuration>
<filters>
<filter>${basedir}/src/assembly/filter.properties</filter>
</filters>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
Expand All @@ -98,6 +101,9 @@
<goal>single</goal>
</goals>
<configuration>
<filters>
<filter>${basedir}/src/assembly/filter-windows-with-jre.properties</filter>
</filters>
<descriptors>
<descriptor>assembly-windows-with-jre.xml</descriptor>
</descriptors>
Expand Down
33 changes: 33 additions & 0 deletions droid-binary/src/assembly/filter-windows-with-jre.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# Copyright (c) 2016, The National Archives <[email protected]>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following
# conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the name of the The National Archives nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

JRE_BIN_PATH=%DROID_HOME%/jre/bin/
33 changes: 33 additions & 0 deletions droid-binary/src/assembly/filter.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# Copyright (c) 2016, The National Archives <[email protected]>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following
# conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the name of the The National Archives nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

JRE_BIN_PATH=

0 comments on commit 2552873

Please sign in to comment.