Updated launch4j
This commit is contained in:
@@ -8,11 +8,10 @@
|
||||
<classpathentry kind="lib" path="lib/xstream.jar"/>
|
||||
<classpathentry kind="lib" path="lib/commons-beanutils.jar"/>
|
||||
<classpathentry kind="lib" path="lib/commons-logging.jar"/>
|
||||
<classpathentry kind="lib" path="lib/foxtrot.jar"/>
|
||||
<classpathentry kind="lib" path="lib/ant.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6"/>
|
||||
<classpathentry kind="lib" path="lib/jgoodies-common.jar"/>
|
||||
<classpathentry kind="lib" path="lib/jgoodies-forms.jar"/>
|
||||
<classpathentry kind="lib" path="lib/jgoodies-looks.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="lib" path="lib/flatlaf.jar"/>
|
||||
<classpathentry kind="output" path="build"/>
|
||||
</classpath>
|
||||
|
||||
2
launch4j/.gitignore
vendored
2
launch4j/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
/build
|
||||
/target
|
||||
@@ -1,11 +1,23 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
|
||||
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
|
||||
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
|
||||
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
|
||||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.APILeak=warning
|
||||
org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
@@ -16,7 +28,9 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
|
||||
@@ -30,7 +44,9 @@ org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
@@ -39,34 +55,52 @@ org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignor
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
|
||||
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info
|
||||
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
|
||||
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
||||
@@ -76,6 +110,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
|
||||
4
launch4j/.settings/org.eclipse.m2e.core.prefs
Normal file
4
launch4j/.settings/org.eclipse.m2e.core.prefs
Normal file
@@ -0,0 +1,4 @@
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
||||
21
launch4j/.vscode/c_cpp_properties.json
vendored
Normal file
21
launch4j/.vscode/c_cpp_properties.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Win32",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**",
|
||||
"c:\\Program Files (x86)\\Dev-Cpp\\MinGW32\\include\\**"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE",
|
||||
"_UNICODE"
|
||||
],
|
||||
"cStandard": "gnu89",
|
||||
"cppStandard": "gnu++98",
|
||||
"intelliSenseMode": "windows-gcc-x86",
|
||||
"compilerPath": "c:\\Program Files (x86)\\Dev-Cpp\\MinGW32\\bin\\gcc.exe"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
17
launch4j/.vscode/tasks.json
vendored
Normal file
17
launch4j/.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"type": "make",
|
||||
"targetName": "all",
|
||||
"makeFileRelativePath": "head_src\\makefile",
|
||||
"problemMatcher": [],
|
||||
"label": "make: all",
|
||||
"detail": "./head_src\\makefile",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
Launch4j (http://launch4j.sourceforge.net/)
|
||||
Cross-platform Java application wrapper for creating Windows native executables.
|
||||
|
||||
Copyright (c) 2004, 2017 Grzegorz Kowal
|
||||
Copyright (c) 2004, 2021 Grzegorz Kowal
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</target>
|
||||
|
||||
<target name="compile" depends="init" description="compile the source">
|
||||
<javac srcdir="${src}" destdir="${build}" classpathref="dist.classpath" source="1.6" debug="on" includeantruntime="false" />
|
||||
<javac srcdir="${src}" destdir="${build}" classpathref="dist.classpath" source="1.8" debug="on" includeantruntime="false" />
|
||||
<copy todir="${build}/images">
|
||||
<fileset dir="${src}/images">
|
||||
<include name="**/*" />
|
||||
|
||||
1
launch4j/demo/ConsoleApp/.gitignore
vendored
1
launch4j/demo/ConsoleApp/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
/build
|
||||
Binary file not shown.
@@ -17,7 +17,7 @@
|
||||
</target>
|
||||
|
||||
<target name="compile" depends="init" description="compile the source">
|
||||
<javac srcdir="${src}" destdir="${build}" classpathref="dist.classpath" source="1.6" debug="on" includeantruntime="false" />
|
||||
<javac srcdir="${src}" destdir="${build}" classpathref="dist.classpath" source="1.8" debug="on" includeantruntime="false" />
|
||||
</target>
|
||||
|
||||
<target name="jar" depends="compile" description="create the jar">
|
||||
@@ -44,7 +44,7 @@
|
||||
<launch4j>
|
||||
<config headerType="console" jarPath="ConsoleApp.jar" dontWrapJar="true" outfile="ConsoleApp.exe" errTitle="ConsoleApp" chdir="." icon="l4j/ConsoleApp.ico">
|
||||
<singleInstance mutexName="net.sf.launch4j.example.ConsoleApp" />
|
||||
<jre minVersion="1.6.0" />
|
||||
<jre path="%JAVA_HOME%;%PATH%" minVersion="1.8.0" />
|
||||
</config>
|
||||
</launch4j>
|
||||
</target>
|
||||
|
||||
2
launch4j/demo/ExitCodeApp/.gitignore
vendored
2
launch4j/demo/ExitCodeApp/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
/build
|
||||
/target
|
||||
@@ -1,72 +1,75 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.sf.launch4j.example</groupId>
|
||||
<artifactId>ExitCodeApp</artifactId>
|
||||
<version>1.0</version>
|
||||
<name>ExitCodeApp</name>
|
||||
<packaging>jar</packaging>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.sf.launch4j.example</groupId>
|
||||
<artifactId>ExitCodeApp</artifactId>
|
||||
<version>1.0</version>
|
||||
<name>ExitCodeApp</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src</directory>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.1</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.akathist.maven.plugins.launch4j</groupId>
|
||||
<artifactId>launch4j-maven-plugin</artifactId>
|
||||
<version>1.7.6</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>l4j</id>
|
||||
<phase>package</phase>
|
||||
<goals><goal>launch4j</goal></goals>
|
||||
<configuration>
|
||||
<headerType>console</headerType>
|
||||
<outfile>target/ExitCodeApp.exe</outfile>
|
||||
<jar>target/ExitCodeApp-1.0.jar</jar>
|
||||
<errTitle>ExitCodeApp</errTitle>
|
||||
<classPath>
|
||||
<mainClass>net.sf.launch4j.example.ExitCodeApp</mainClass>
|
||||
<addDependencies>false</addDependencies>
|
||||
<preCp>anything</preCp>
|
||||
</classPath>
|
||||
<jre>
|
||||
<minVersion>1.5.0</minVersion>
|
||||
</jre>
|
||||
<versionInfo>
|
||||
<fileVersion>1.0.0.0</fileVersion>
|
||||
<txtFileVersion>1.0</txtFileVersion>
|
||||
<fileDescription>Simple app for testing exit code.</fileDescription>
|
||||
<copyright>Copyright (C) 2015 GK</copyright>
|
||||
<productVersion>3.9.0.0</productVersion>
|
||||
<txtProductVersion>3.9</txtProductVersion>
|
||||
<productName>ExitCodeApp</productName>
|
||||
<internalName>ExitCodeApp</internalName>
|
||||
<originalFilename>ExitCodeApp.exe</originalFilename>
|
||||
</versionInfo>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
<build>
|
||||
<sourceDirectory>src</sourceDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src</directory>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.1</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.akathist.maven.plugins.launch4j</groupId>
|
||||
<artifactId>launch4j-maven-plugin</artifactId>
|
||||
<version>1.7.22</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>l4j</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>launch4j</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<headerType>console</headerType>
|
||||
<outfile>target/ExitCodeApp.exe</outfile>
|
||||
<jar>target/ExitCodeApp-1.0.jar</jar>
|
||||
<errTitle>ExitCodeApp</errTitle>
|
||||
<classPath>
|
||||
<mainClass>net.sf.launch4j.example.ExitCodeApp</mainClass>
|
||||
<addDependencies>false</addDependencies>
|
||||
<preCp>anything</preCp>
|
||||
</classPath>
|
||||
<jre>
|
||||
<path>%JAVA_HOME%;%PATH%</path>
|
||||
<minVersion>1.8.0</minVersion>
|
||||
</jre>
|
||||
<versionInfo>
|
||||
<fileVersion>1.0.0.0</fileVersion>
|
||||
<txtFileVersion>1.0</txtFileVersion>
|
||||
<fileDescription>Simple app for testing exit code.</fileDescription>
|
||||
<copyright>Copyright (C) 2022 GK</copyright>
|
||||
<productVersion>3.9.0.0</productVersion>
|
||||
<txtProductVersion>3.9</txtProductVersion>
|
||||
<productName>ExitCodeApp</productName>
|
||||
<internalName>ExitCodeApp</internalName>
|
||||
<originalFilename>ExitCodeApp.exe</originalFilename>
|
||||
</versionInfo>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
1
launch4j/demo/SimpleApp/.gitignore
vendored
1
launch4j/demo/SimpleApp/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
/build
|
||||
Binary file not shown.
@@ -17,7 +17,7 @@
|
||||
</target>
|
||||
|
||||
<target name="compile" depends="init" description="compile the source">
|
||||
<javac srcdir="${src}" destdir="${build}" classpathref="dist.classpath" source="1.6" debug="on" includeantruntime="false" />
|
||||
<javac srcdir="${src}" destdir="${build}" classpathref="dist.classpath" source="1.8" debug="on" includeantruntime="false" />
|
||||
</target>
|
||||
|
||||
<target name="jar" depends="compile" description="create the jar">
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
<icon>SimpleApp.ico</icon>
|
||||
<restartOnCrash>true</restartOnCrash>
|
||||
<jre>
|
||||
<minVersion>1.6.0</minVersion>
|
||||
<path>%JAVA_HOME%;%PATH%</path>
|
||||
<minVersion>1.8.0</minVersion>
|
||||
</jre>
|
||||
<splash>
|
||||
<file>splash.bmp</file>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2
launch4j/head_src/consolehead/.gitignore
vendored
2
launch4j/head_src/consolehead/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
/consolehead.exe
|
||||
/consolehead.layout
|
||||
@@ -1,30 +1,28 @@
|
||||
# Project: consolehead
|
||||
# Makefile created by Dev-C++ 4.9.9.2
|
||||
# Makefile created by Dev-C++ 5.7.1
|
||||
|
||||
CPP = g++.exe
|
||||
CC = gcc.exe
|
||||
WINDRES = windres.exe
|
||||
RES =
|
||||
OBJ = ../../head/consolehead.o ../../head/head.o $(RES)
|
||||
LINKOBJ = ../../head/consolehead.o ../../head/head.o $(RES)
|
||||
LIBS = -L"C:/Dev-Cpp/lib" -n -s
|
||||
INCS = -I"C:/Dev-Cpp/include"
|
||||
CXXINCS = -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
|
||||
BIN = consolehead.exe
|
||||
CXXFLAGS = $(CXXINCS) -fexpensive-optimizations -O3
|
||||
CFLAGS = $(INCS) -fexpensive-optimizations -O3
|
||||
RM = rm -f
|
||||
CPP = g++.exe
|
||||
CC = gcc.exe
|
||||
WINDRES = windres.exe
|
||||
OBJ = ../../head/consolehead.o ../../head/head.o
|
||||
LINKOBJ = ../../head/consolehead.o ../../head/head.o
|
||||
LIBS = -L"C:/Program Files (x86)/Dev-Cpp/MinGW32/lib" -L"C:/Program Files (x86)/Dev-Cpp/MinGW32/mingw32/lib" -static-libstdc++ -static-libgcc -n -s
|
||||
INCS = -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/mingw32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/lib/gcc/mingw32/4.8.1/include"
|
||||
CXXINCS = -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/mingw32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/lib/gcc/mingw32/4.8.1/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/lib/gcc/mingw32/4.8.1/include/c++"
|
||||
BIN = consolehead.exe
|
||||
CXXFLAGS = $(CXXINCS) -Os
|
||||
CFLAGS = $(INCS) -Os
|
||||
RM = rm.exe -f
|
||||
|
||||
.PHONY: all all-before all-after clean clean-custom
|
||||
|
||||
all: all-before consolehead.exe all-after
|
||||
|
||||
all: all-before $(BIN) all-after
|
||||
|
||||
clean: clean-custom
|
||||
${RM} $(OBJ) $(BIN)
|
||||
|
||||
$(BIN): $(OBJ)
|
||||
# $(CC) $(LINKOBJ) -o "consolehead.exe" $(LIBS)
|
||||
$(CC) $(LINKOBJ) -o $(BIN) $(LIBS)
|
||||
|
||||
../../head/consolehead.o: consolehead.c
|
||||
$(CC) -c consolehead.c -o ../../head/consolehead.o $(CFLAGS)
|
||||
|
||||
@@ -55,7 +55,7 @@ int main(int argc, char* argv[])
|
||||
cmdLine = "";
|
||||
}
|
||||
|
||||
int result = prepare(cmdLine);
|
||||
int result = prepare(cmdLine, FALSE);
|
||||
|
||||
if (result == ERROR_ALREADY_EXISTS)
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ FileName=consolehead.dev
|
||||
Name=consolehead
|
||||
UnitCount=4
|
||||
Type=1
|
||||
Ver=1
|
||||
Ver=2
|
||||
ObjFiles=
|
||||
Includes=
|
||||
Libs=
|
||||
@@ -22,12 +22,14 @@ OverrideOutputName=consolehead.exe
|
||||
HostApplication=
|
||||
Folders=
|
||||
CommandLine=
|
||||
UseCustomMakefile=1
|
||||
UseCustomMakefile=0
|
||||
CustomMakefile=Makefile.win
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=0
|
||||
CompilerSettings=0000000001001000000100
|
||||
CompilerSettings=000000d000000000000001000
|
||||
LogOutput=
|
||||
LogOutputEnabled=0
|
||||
|
||||
[Unit1]
|
||||
FileName=consolehead.c
|
||||
@@ -47,7 +49,7 @@ Build=1
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=
|
||||
FileVersion=0.1.1.1
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
@@ -56,6 +58,7 @@ OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=
|
||||
AutoIncBuildNr=0
|
||||
SyncProduct=0
|
||||
|
||||
[Unit2]
|
||||
FileName=..\resource.h
|
||||
|
||||
2
launch4j/head_src/guihead/.gitignore
vendored
2
launch4j/head_src/guihead/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
/guihead.exe
|
||||
/guihead.layout
|
||||
@@ -1,30 +1,28 @@
|
||||
# Project: guihead
|
||||
# Makefile created by Dev-C++ 4.9.9.2
|
||||
# Makefile created by Dev-C++ 5.7.1
|
||||
|
||||
CPP = g++.exe
|
||||
CC = gcc.exe
|
||||
WINDRES = windres.exe
|
||||
RES =
|
||||
OBJ = ../../head/guihead.o ../../head/head.o $(RES)
|
||||
LINKOBJ = ../../head/guihead.o ../../head/head.o $(RES)
|
||||
LIBS = -L"C:/Dev-Cpp/lib" -mwindows -n -s
|
||||
INCS = -I"C:/Dev-Cpp/include"
|
||||
CXXINCS = -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"
|
||||
BIN = guihead.exe
|
||||
CXXFLAGS = $(CXXINCS) -fexpensive-optimizations -O3
|
||||
CFLAGS = $(INCS) -fexpensive-optimizations -O3
|
||||
RM = rm -f
|
||||
CPP = g++.exe
|
||||
CC = gcc.exe
|
||||
WINDRES = windres.exe
|
||||
OBJ = ../../head/guihead.o ../../head/head.o
|
||||
LINKOBJ = ../../head/guihead.o ../../head/head.o
|
||||
LIBS = -L"C:/Program Files (x86)/Dev-Cpp/MinGW32/lib" -L"C:/Program Files (x86)/Dev-Cpp/MinGW32/mingw32/lib" -static-libstdc++ -static-libgcc -mwindows -n -s
|
||||
INCS = -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/mingw32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/lib/gcc/mingw32/4.8.1/include"
|
||||
CXXINCS = -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/mingw32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/lib/gcc/mingw32/4.8.1/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/lib/gcc/mingw32/4.8.1/include/c++"
|
||||
BIN = guihead.exe
|
||||
CXXFLAGS = $(CXXINCS) -Os
|
||||
CFLAGS = $(INCS) -Os
|
||||
RM = rm.exe -f
|
||||
|
||||
.PHONY: all all-before all-after clean clean-custom
|
||||
|
||||
all: all-before guihead.exe all-after
|
||||
|
||||
all: all-before $(BIN) all-after
|
||||
|
||||
clean: clean-custom
|
||||
${RM} $(OBJ) $(BIN)
|
||||
|
||||
$(BIN): $(OBJ)
|
||||
# $(CC) $(LINKOBJ) -o "guihead.exe" $(LIBS)
|
||||
$(CC) $(LINKOBJ) -o $(BIN) $(LIBS)
|
||||
|
||||
../../head/guihead.o: guihead.c
|
||||
$(CC) -c guihead.c -o ../../head/guihead.o $(CFLAGS)
|
||||
|
||||
@@ -49,7 +49,7 @@ int APIENTRY WinMain(HINSTANCE hInstance,
|
||||
LPSTR lpCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
int result = prepare(lpCmdLine);
|
||||
int result = prepare(lpCmdLine, FALSE);
|
||||
|
||||
if (result == ERROR_ALREADY_EXISTS)
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ FileName=guihead.dev
|
||||
Name=guihead
|
||||
UnitCount=5
|
||||
Type=0
|
||||
Ver=1
|
||||
Ver=2
|
||||
ObjFiles=
|
||||
Includes=
|
||||
Libs=
|
||||
@@ -22,12 +22,14 @@ OverrideOutputName=guihead.exe
|
||||
HostApplication=
|
||||
Folders=
|
||||
CommandLine=
|
||||
UseCustomMakefile=1
|
||||
UseCustomMakefile=0
|
||||
CustomMakefile=Makefile.win
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=0
|
||||
CompilerSettings=0000000001001000000100
|
||||
CompilerSettings=000000d000000000000001000
|
||||
LogOutput=
|
||||
LogOutputEnabled=0
|
||||
|
||||
[Unit1]
|
||||
FileName=guihead.c
|
||||
@@ -66,6 +68,7 @@ OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=
|
||||
AutoIncBuildNr=0
|
||||
SyncProduct=0
|
||||
|
||||
[Unit4]
|
||||
FileName=..\head.h
|
||||
@@ -95,7 +98,7 @@ Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
BuildCmd=$(CC) -c head.c -o ../../head/head.o $(CFLAGS)
|
||||
|
||||
[Unit5]
|
||||
FileName=..\resource.h
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Launch4j (http://launch4j.sourceforge.net/)
|
||||
Cross-platform Java application wrapper for creating Windows native executables.
|
||||
|
||||
Copyright (c) 2004, 2015 Grzegorz Kowal,
|
||||
Copyright (c) 2004, 2019 Grzegorz Kowal,
|
||||
Ian Roberts (jdk preference patch)
|
||||
Sylvain Mina (single instance patch)
|
||||
|
||||
@@ -37,6 +37,7 @@ FILE* hLog;
|
||||
BOOL debugAll = FALSE;
|
||||
BOOL console = FALSE;
|
||||
BOOL wow64 = FALSE;
|
||||
BOOL jniHeader = FALSE;
|
||||
char oldPwd[_MAX_PATH];
|
||||
|
||||
PROCESS_INFORMATION processInformation;
|
||||
@@ -51,16 +52,15 @@ struct
|
||||
|
||||
struct
|
||||
{
|
||||
int runtimeBits;
|
||||
int foundJava;
|
||||
BOOL bundledJreAsFallback;
|
||||
BOOL requiresJdk;
|
||||
BOOL requires64Bit;
|
||||
BOOL corruptedJreFound;
|
||||
char originalJavaMinVer[STR];
|
||||
char originalJavaMaxVer[STR];
|
||||
char javaMinVer[STR];
|
||||
char javaMaxVer[STR];
|
||||
char foundJavaVer[STR];
|
||||
char foundJavaKey[_MAX_PATH];
|
||||
char foundJavaHome[_MAX_PATH];
|
||||
} search;
|
||||
|
||||
@@ -71,8 +71,9 @@ struct
|
||||
char args[MAX_ARGS];
|
||||
} launcher;
|
||||
|
||||
BOOL initGlobals()
|
||||
BOOL initGlobals(BOOL jni)
|
||||
{
|
||||
jniHeader = jni;
|
||||
hModule = GetModuleHandle(NULL);
|
||||
|
||||
if (hModule == NULL)
|
||||
@@ -82,9 +83,9 @@ BOOL initGlobals()
|
||||
|
||||
strcpy(error.title, LAUNCH4j);
|
||||
|
||||
search.runtimeBits = INIT_RUNTIME_BITS;
|
||||
search.foundJava = NO_JAVA_FOUND;
|
||||
search.bundledJreAsFallback = FALSE;
|
||||
search.foundJava = JAVA_NOT_FOUND;
|
||||
search.requiresJdk = FALSE;
|
||||
search.requires64Bit = FALSE;
|
||||
search.corruptedJreFound = FALSE;
|
||||
|
||||
return TRUE;
|
||||
@@ -141,7 +142,7 @@ void setWow64Flag()
|
||||
fnIsWow64Process(GetCurrentProcess(), &wow64);
|
||||
}
|
||||
|
||||
debug("WOW64:\t\t%s\n", wow64 ? "yes" : "no");
|
||||
debug("WOW64:\t\t%s\n", wow64 ? "Yes" : "No");
|
||||
}
|
||||
|
||||
void setConsoleFlag()
|
||||
@@ -464,28 +465,23 @@ void regSearch(const char* keyName, const int searchType)
|
||||
debug("Check:\t\t%s\n", fullKeyName);
|
||||
formatJavaVersion(version, originalVersion);
|
||||
|
||||
if (strcmp(version, search.javaMinVer) >= 0
|
||||
&& (!*search.javaMaxVer || strcmp(version, search.javaMaxVer) <= 0)
|
||||
&& strcmp(version, search.foundJavaVer) > 0
|
||||
&& isJavaHomeValid(fullKeyName, searchType))
|
||||
if (isJavaVersionGood(version, wow64KeyMask)
|
||||
&& isRegistryJavaHomeValid(fullKeyName, searchType))
|
||||
{
|
||||
strcpy(search.foundJavaVer, version);
|
||||
strcpy(search.foundJavaKey, fullKeyName);
|
||||
search.foundJava = searchType;
|
||||
debug("Match:\t\t%s\n", version);
|
||||
}
|
||||
else
|
||||
{
|
||||
debug("Ignore:\t\t%s\n", version);
|
||||
break;
|
||||
}
|
||||
|
||||
debug("Ignore:\t\t%s\n", version);
|
||||
versionSize = _MAX_PATH;
|
||||
}
|
||||
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
|
||||
BOOL isJavaHomeValid(const char* keyName, const int searchType)
|
||||
BOOL isRegistryJavaHomeValid(const char* keyName, const int searchType)
|
||||
{
|
||||
BOOL valid = FALSE;
|
||||
HKEY hKey;
|
||||
@@ -531,6 +527,7 @@ BOOL isLauncherPathValid(const char* path)
|
||||
{
|
||||
struct _stat statBuf;
|
||||
char launcherPath[_MAX_PATH] = {0};
|
||||
char javacPath[_MAX_PATH] = {0};
|
||||
BOOL result = FALSE;
|
||||
|
||||
if (*path)
|
||||
@@ -538,6 +535,15 @@ BOOL isLauncherPathValid(const char* path)
|
||||
strcpy(launcherPath, path);
|
||||
appendLauncher(launcherPath);
|
||||
result = _stat(launcherPath, &statBuf) == 0;
|
||||
debug("Check launcher:\t%s %s\n", launcherPath, result ? "(OK)" : "(not found)");
|
||||
|
||||
if (result && search.requiresJdk)
|
||||
{
|
||||
strcpy(javacPath, path);
|
||||
appendPath(javacPath, "bin\\javac.exe");
|
||||
result = _stat(javacPath, &statBuf) == 0;
|
||||
debug("Check javac:\t%s %s\n", javacPath, result ? "(OK)" : "(not found)");
|
||||
}
|
||||
|
||||
if (!result)
|
||||
{
|
||||
@@ -546,120 +552,73 @@ BOOL isLauncherPathValid(const char* path)
|
||||
}
|
||||
}
|
||||
|
||||
debug("Check launcher:\t%s %s\n", launcherPath, result ? "(OK)" : "(not found)");
|
||||
return result;
|
||||
}
|
||||
|
||||
void regSearchWow(const char* keyName, const int searchType)
|
||||
void regSearchWow(const char* keyName)
|
||||
{
|
||||
if (search.runtimeBits == INIT_RUNTIME_BITS)
|
||||
if (search.foundJava != JAVA_NOT_FOUND)
|
||||
{
|
||||
search.runtimeBits = loadInt(RUNTIME_BITS);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (search.runtimeBits)
|
||||
if (wow64 && !jniHeader)
|
||||
{
|
||||
case USE_64_BIT_RUNTIME:
|
||||
if (wow64)
|
||||
{
|
||||
regSearch(keyName, searchType | KEY_WOW64_64KEY);
|
||||
}
|
||||
break;
|
||||
regSearch(keyName, JAVA_FOUND | KEY_WOW64_64KEY);
|
||||
|
||||
case USE_64_AND_32_BIT_RUNTIME:
|
||||
if (wow64)
|
||||
{
|
||||
regSearch(keyName, searchType | KEY_WOW64_64KEY);
|
||||
if ((search.foundJava & KEY_WOW64_64KEY) != JAVA_NOT_FOUND)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ((search.foundJava & KEY_WOW64_64KEY) != NO_JAVA_FOUND)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
regSearch(keyName, searchType);
|
||||
break;
|
||||
|
||||
case USE_32_AND_64_BIT_RUNTIME:
|
||||
regSearch(keyName, searchType);
|
||||
|
||||
if (search.foundJava != NO_JAVA_FOUND
|
||||
&& (search.foundJava & KEY_WOW64_64KEY) == NO_JAVA_FOUND)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (wow64)
|
||||
{
|
||||
regSearch(keyName, searchType | KEY_WOW64_64KEY);
|
||||
}
|
||||
break;
|
||||
|
||||
case USE_32_BIT_RUNTIME:
|
||||
regSearch(keyName, searchType);
|
||||
break;
|
||||
|
||||
default:
|
||||
debug("Runtime bits:\tFailed to load.\n");
|
||||
break;
|
||||
if (!search.requires64Bit)
|
||||
{
|
||||
regSearch(keyName, JAVA_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
void regSearchJreSdk(const char* jreKeyName, const char* sdkKeyName,
|
||||
const int jdkPreference)
|
||||
BOOL findRegistryJavaHome(char* path)
|
||||
{
|
||||
if (jdkPreference == JDK_ONLY || jdkPreference == PREFER_JDK)
|
||||
{
|
||||
regSearchWow(sdkKeyName, FOUND_SDK);
|
||||
if (jdkPreference != JDK_ONLY)
|
||||
{
|
||||
regSearchWow(jreKeyName, FOUND_JRE);
|
||||
}
|
||||
debugAll("findRegistryJavaHome()\n");
|
||||
if (!search.requiresJdk)
|
||||
{
|
||||
regSearchWow("SOFTWARE\\JavaSoft\\Java Runtime Environment");
|
||||
}
|
||||
else
|
||||
{
|
||||
// jdkPreference == JRE_ONLY or PREFER_JRE
|
||||
regSearchWow(jreKeyName, FOUND_JRE);
|
||||
if (jdkPreference != JRE_ONLY)
|
||||
{
|
||||
regSearchWow(sdkKeyName, FOUND_SDK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOL findJavaHome(char* path, const int jdkPreference)
|
||||
{
|
||||
debugAll("findJavaHome()\n");
|
||||
regSearchJreSdk("SOFTWARE\\JavaSoft\\Java Runtime Environment",
|
||||
"SOFTWARE\\JavaSoft\\Java Development Kit",
|
||||
jdkPreference);
|
||||
regSearchWow("SOFTWARE\\JavaSoft\\Java Development Kit");
|
||||
|
||||
// Java 9 support
|
||||
regSearchJreSdk("SOFTWARE\\JavaSoft\\JRE",
|
||||
"SOFTWARE\\JavaSoft\\JDK",
|
||||
jdkPreference);
|
||||
if (!search.requiresJdk)
|
||||
{
|
||||
regSearchWow("SOFTWARE\\JavaSoft\\JRE");
|
||||
}
|
||||
regSearchWow("SOFTWARE\\JavaSoft\\JDK");
|
||||
|
||||
// IBM Java 1.8
|
||||
if (search.foundJava == NO_JAVA_FOUND)
|
||||
if (search.foundJava == JAVA_NOT_FOUND)
|
||||
{
|
||||
regSearchJreSdk("SOFTWARE\\IBM\\Java Runtime Environment",
|
||||
"SOFTWARE\\IBM\\Java Development Kit",
|
||||
jdkPreference);
|
||||
if (!search.requiresJdk)
|
||||
{
|
||||
regSearchWow("SOFTWARE\\IBM\\Java Runtime Environment");
|
||||
}
|
||||
regSearchWow("SOFTWARE\\IBM\\Java Development Kit");
|
||||
}
|
||||
|
||||
// IBM Java 1.7 and earlier
|
||||
if (search.foundJava == NO_JAVA_FOUND)
|
||||
if (search.foundJava == JAVA_NOT_FOUND)
|
||||
{
|
||||
regSearchJreSdk("SOFTWARE\\IBM\\Java2 Runtime Environment",
|
||||
"SOFTWARE\\IBM\\Java Development Kit",
|
||||
jdkPreference);
|
||||
if (!search.requiresJdk)
|
||||
{
|
||||
regSearchWow("SOFTWARE\\IBM\\Java2 Runtime Environment");
|
||||
}
|
||||
regSearchWow("SOFTWARE\\IBM\\Java Development Kit");
|
||||
}
|
||||
|
||||
if (search.foundJava != NO_JAVA_FOUND)
|
||||
if (search.foundJava != JAVA_NOT_FOUND)
|
||||
{
|
||||
strcpy(path, search.foundJavaHome);
|
||||
debug("Runtime used:\t%s (%s-bit)\n", search.foundJavaVer,
|
||||
(search.foundJava & KEY_WOW64_64KEY) != NO_JAVA_FOUND ? "64" : "32");
|
||||
(search.foundJava & KEY_WOW64_64KEY) != JAVA_NOT_FOUND ? "64" : "32");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -911,51 +870,90 @@ void setWorkingDirectory(const char *exePath, const int pathLen)
|
||||
}
|
||||
}
|
||||
|
||||
BOOL bundledJreSearch(const char *exePath, const int pathLen)
|
||||
void removeChar(char *src, const char toRemove)
|
||||
{
|
||||
debugAll("bundledJreSearch()\n");
|
||||
char tmpPath[_MAX_PATH] = {0};
|
||||
BOOL is64BitJre = loadBool(BUNDLED_JRE_64_BIT);
|
||||
char* dst = src;
|
||||
|
||||
if (!wow64 && is64BitJre)
|
||||
do
|
||||
{
|
||||
if (*src != toRemove)
|
||||
{
|
||||
*dst++ = *src;
|
||||
}
|
||||
} while (*src++ != 0);
|
||||
}
|
||||
|
||||
BOOL pathJreSearch(const char *exePath, const int pathLen)
|
||||
{
|
||||
debugAll("pathJreSearch()\n");
|
||||
char jrePathSpec[_MAX_PATH] = {0};
|
||||
|
||||
if (!wow64 && search.requires64Bit)
|
||||
{
|
||||
debug("Bundled JRE:\tCannot use 64-bit runtime on 32-bit OS.\n");
|
||||
debug("JRE:\t\tCannot use 64-bit runtime on 32-bit OS.\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (loadString(JRE_PATH, tmpPath))
|
||||
if (loadString(JRE_PATH, jrePathSpec))
|
||||
{
|
||||
char jrePath[MAX_ARGS] = {0};
|
||||
expandVars(jrePath, tmpPath, exePath, pathLen);
|
||||
debug("Bundled JRE:\t%s\n", jrePath);
|
||||
expandVars(jrePath, jrePathSpec, exePath, pathLen);
|
||||
debug("JRE paths:\t%s\n", jrePath);
|
||||
char* path = strtok(jrePath, ";");
|
||||
|
||||
if (jrePath[0] == '\\' || jrePath[1] == ':')
|
||||
{
|
||||
// Absolute
|
||||
strcpy(launcher.cmd, jrePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Relative
|
||||
strncpy(launcher.cmd, exePath, pathLen);
|
||||
appendPath(launcher.cmd, jrePath);
|
||||
}
|
||||
while (path != NULL)
|
||||
{
|
||||
char pathNoBin[_MAX_PATH] = {0};
|
||||
char *lastBackslash = strrchr(path, '\\');
|
||||
char *lastSlash = strrchr(path, '/');
|
||||
|
||||
if (isLauncherPathValid(launcher.cmd))
|
||||
{
|
||||
search.foundJava = is64BitJre ? FOUND_BUNDLED | KEY_WOW64_64KEY : FOUND_BUNDLED;
|
||||
strcpy(search.foundJavaHome, launcher.cmd);
|
||||
return TRUE;
|
||||
}
|
||||
if (lastBackslash != NULL && strcasecmp(lastBackslash, "\\bin") == 0)
|
||||
{
|
||||
strncpy(pathNoBin, path, lastBackslash - path);
|
||||
}
|
||||
else if (lastSlash != NULL && strcasecmp(lastSlash, "/bin") == 0)
|
||||
{
|
||||
strncpy(pathNoBin, path, lastSlash - path);
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(pathNoBin, path);
|
||||
}
|
||||
|
||||
removeChar(pathNoBin, '"');
|
||||
|
||||
if (*pathNoBin == '\\' || (*pathNoBin != '\0' && *(pathNoBin + 1) == ':'))
|
||||
{
|
||||
// Absolute
|
||||
strcpy(launcher.cmd, pathNoBin);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Relative
|
||||
strncpy(launcher.cmd, exePath, pathLen);
|
||||
launcher.cmd[pathLen] = 0;
|
||||
appendPath(launcher.cmd, pathNoBin);
|
||||
}
|
||||
|
||||
BOOL is64Bit;
|
||||
if (isLauncherPathValid(launcher.cmd) && isPathJavaVersionGood(launcher.cmd, &is64Bit))
|
||||
{
|
||||
search.foundJava = is64Bit ? JAVA_FOUND | KEY_WOW64_64KEY : JAVA_FOUND;
|
||||
strcpy(search.foundJavaHome, launcher.cmd);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
path = strtok(NULL, ";");
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL installedJreSearch()
|
||||
BOOL registryJreSearch()
|
||||
{
|
||||
debugAll("installedJreSearch()\n");
|
||||
return *search.javaMinVer && findJavaHome(launcher.cmd, loadInt(JDK_PREFERENCE));
|
||||
debugAll("registryJreSearch()\n");
|
||||
return *search.javaMinVer && findRegistryJavaHome(launcher.cmd);
|
||||
}
|
||||
|
||||
void createJreSearchError()
|
||||
@@ -972,12 +970,9 @@ void createJreSearchError()
|
||||
strcat(error.msg, search.originalJavaMaxVer);
|
||||
}
|
||||
|
||||
if (search.runtimeBits == USE_64_BIT_RUNTIME
|
||||
|| search.runtimeBits == USE_32_BIT_RUNTIME)
|
||||
if (search.requires64Bit)
|
||||
{
|
||||
strcat(error.msg, " (");
|
||||
strcat(error.msg, search.runtimeBits == USE_64_BIT_RUNTIME ? "64" : "32");
|
||||
strcat(error.msg, "-bit)");
|
||||
strcat(error.msg, " (64-bit)");
|
||||
}
|
||||
|
||||
if (search.corruptedJreFound)
|
||||
@@ -995,7 +990,7 @@ void createJreSearchError()
|
||||
}
|
||||
else
|
||||
{
|
||||
loadString(BUNDLED_JRE_ERR, error.msg);
|
||||
loadString(JRE_NOT_FOUND_ERR, error.msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1004,7 +999,10 @@ BOOL jreSearch(const char *exePath, const int pathLen)
|
||||
debugAll("jreSearch()\n");
|
||||
BOOL result = TRUE;
|
||||
|
||||
search.bundledJreAsFallback = loadBool(BUNDLED_JRE_AS_FALLBACK);
|
||||
search.requiresJdk = loadBool(REQUIRES_JDK);
|
||||
debug("Requires JDK:\t%s\n", search.requiresJdk ? "Yes" : "No");
|
||||
search.requires64Bit = loadBool(REQUIRES_64_BIT);
|
||||
debug("Requires 64-Bit: %s\n", search.requires64Bit ? "Yes" : "No");
|
||||
loadString(JAVA_MIN_VER, search.originalJavaMinVer);
|
||||
formatJavaVersion(search.javaMinVer, search.originalJavaMinVer);
|
||||
debug("Java min ver:\t%s\n", search.javaMinVer);
|
||||
@@ -1012,19 +1010,9 @@ BOOL jreSearch(const char *exePath, const int pathLen)
|
||||
formatJavaVersion(search.javaMaxVer, search.originalJavaMaxVer);
|
||||
debug("Java max ver:\t%s\n", search.javaMaxVer);
|
||||
|
||||
if (search.bundledJreAsFallback)
|
||||
if (!pathJreSearch(exePath, pathLen))
|
||||
{
|
||||
if (!installedJreSearch())
|
||||
{
|
||||
result = bundledJreSearch(exePath, pathLen);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!bundledJreSearch(exePath, pathLen))
|
||||
{
|
||||
result = installedJreSearch();
|
||||
}
|
||||
result = registryJreSearch();
|
||||
}
|
||||
|
||||
if (!result)
|
||||
@@ -1209,9 +1197,9 @@ void setCommandLineArgs(const char *lpCmdLine)
|
||||
}
|
||||
}
|
||||
|
||||
int prepare(const char *lpCmdLine)
|
||||
int prepare(const char *lpCmdLine, BOOL jni)
|
||||
{
|
||||
if (!initGlobals())
|
||||
if (!initGlobals(jni))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1230,6 +1218,7 @@ int prepare(const char *lpCmdLine)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
debug("JNI:\t\t%s\n", jniHeader ? "Yes" : "No");
|
||||
setWow64Flag();
|
||||
|
||||
// Set default error message, title and optional support web site url.
|
||||
@@ -1333,3 +1322,131 @@ const char* getLauncherArgs()
|
||||
return launcher.args;
|
||||
}
|
||||
|
||||
/* read java version output and save version string in version */
|
||||
void getVersionFromOutput(HANDLE outputRd, char *version, int versionLen, BOOL *is64Bit)
|
||||
{
|
||||
CHAR chBuf[BIG_STR] = {0}, *bptr = chBuf;
|
||||
DWORD dwRead, remain = sizeof(chBuf);
|
||||
BOOL bSuccess = FALSE;
|
||||
|
||||
while (remain > 0) {
|
||||
bSuccess = ReadFile(outputRd, bptr, remain, &dwRead, NULL);
|
||||
if (! bSuccess || dwRead == 0) break;
|
||||
bptr += dwRead;
|
||||
remain -= dwRead;
|
||||
}
|
||||
debugAll("Java version output: %s\n", chBuf);
|
||||
*version = '\0';
|
||||
const char *verStartPtr = strchr(chBuf, '"');
|
||||
if (verStartPtr == NULL)
|
||||
{
|
||||
debug("Cannot get version string: cannot find quote\n");
|
||||
return;
|
||||
}
|
||||
const char *verEndPtr = strchr(++verStartPtr, '"');
|
||||
if (verEndPtr == NULL)
|
||||
{
|
||||
debug("Cannot get version string: missing end quote\n");
|
||||
return;
|
||||
}
|
||||
size_t len = verEndPtr - verStartPtr;
|
||||
if (len >= versionLen) {
|
||||
debug("Cannot get version string: data too large\n");
|
||||
return;
|
||||
}
|
||||
memcpy(version, verStartPtr, len);
|
||||
version[len] = '\0';
|
||||
*is64Bit = strstr(chBuf, "64-Bit") != NULL || strstr(chBuf, "64-bit") != NULL;
|
||||
}
|
||||
|
||||
/* create a child process with cmdline and set stderr/stdout to outputWr */
|
||||
BOOL CreateChildProcess(char *cmdline, HANDLE outputWr)
|
||||
{
|
||||
PROCESS_INFORMATION piProcInfo;
|
||||
STARTUPINFO siStartInfo;
|
||||
BOOL bSuccess = FALSE;
|
||||
|
||||
ZeroMemory(&piProcInfo, sizeof(PROCESS_INFORMATION));
|
||||
ZeroMemory(&siStartInfo, sizeof(STARTUPINFO));
|
||||
siStartInfo.cb = sizeof(STARTUPINFO);
|
||||
siStartInfo.hStdError = outputWr;
|
||||
siStartInfo.hStdOutput = outputWr;
|
||||
siStartInfo.dwFlags |= STARTF_USESTDHANDLES;
|
||||
|
||||
debugAll("Create process: %s\n", cmdline);
|
||||
bSuccess = CreateProcess(NULL, cmdline, NULL, NULL, TRUE, CREATE_NO_WINDOW, NULL, NULL, &siStartInfo, &piProcInfo);
|
||||
if (!bSuccess)
|
||||
{
|
||||
debug("Cannot create process %s\n", cmdline);
|
||||
}
|
||||
else
|
||||
{
|
||||
CloseHandle(piProcInfo.hProcess);
|
||||
CloseHandle(piProcInfo.hThread);
|
||||
}
|
||||
CloseHandle(outputWr);
|
||||
return bSuccess;
|
||||
}
|
||||
|
||||
BOOL isJavaVersionGood(const char *version, BOOL is64Bit)
|
||||
{
|
||||
BOOL result = (!*search.javaMinVer || strcmp(version, search.javaMinVer) >= 0)
|
||||
&& (!*search.javaMaxVer || strcmp(version, search.javaMaxVer) <= 0)
|
||||
&& (!search.requires64Bit || is64Bit)
|
||||
&& (!jniHeader || !is64Bit);
|
||||
debug("Version string: %s / %s-Bit (%s)\n", version, is64Bit ? "64" : "32", result ? "OK" : "Ignore");
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* Run <path>/bin/java(w) -version. Return TRUE if version is good.
|
||||
*/
|
||||
BOOL isPathJavaVersionGood(const char *path, BOOL *is64Bit)
|
||||
{
|
||||
SECURITY_ATTRIBUTES saAttr;
|
||||
HANDLE outputRd = NULL;
|
||||
HANDLE outputWr = NULL;
|
||||
|
||||
debugAll("Check Java Version: %s min=%s max=%s\n", path, search.javaMinVer, search.javaMaxVer);
|
||||
|
||||
saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
|
||||
saAttr.bInheritHandle = TRUE;
|
||||
saAttr.lpSecurityDescriptor = NULL;
|
||||
|
||||
// Create a pipe for the child process's STDOUT.
|
||||
if (!CreatePipe(&outputRd, &outputWr, &saAttr, 0))
|
||||
{
|
||||
debug("Cannot create pipe\n");
|
||||
return FALSE;
|
||||
}
|
||||
// Ensure the read handle to the pipe for STDOUT is not inherited.
|
||||
if (!SetHandleInformation(outputRd, HANDLE_FLAG_INHERIT, 0))
|
||||
{
|
||||
debug("Cannot set handle information\n");
|
||||
CloseHandle(outputRd);
|
||||
CloseHandle(outputWr);
|
||||
return FALSE;
|
||||
}
|
||||
// create child process
|
||||
char cmdline[MAX_ARGS] = {0};
|
||||
char launcherPath[_MAX_PATH] = {0};
|
||||
strcpy(launcherPath, path);
|
||||
appendLauncher(launcherPath);
|
||||
snprintf(cmdline, MAX_ARGS, "\"%s\" -version", launcherPath);
|
||||
if (!CreateChildProcess(cmdline, outputWr))
|
||||
{
|
||||
debug("Cannot run java(w) -version\n");
|
||||
CloseHandle(outputRd);
|
||||
return FALSE;
|
||||
}
|
||||
char version[STR] = {0}, formattedVersion[STR] = {0};
|
||||
|
||||
getVersionFromOutput(outputRd, version, sizeof(version), is64Bit);
|
||||
CloseHandle(outputRd);
|
||||
if (*version != '\0')
|
||||
{
|
||||
formatJavaVersion(formattedVersion, version);
|
||||
return isJavaVersionGood(formattedVersion, *is64Bit);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -54,25 +54,12 @@
|
||||
#include <process.h>
|
||||
|
||||
#define LAUNCH4j "Launch4j"
|
||||
#define VERSION "3.12"
|
||||
#define VERSION "3.50"
|
||||
|
||||
#define JRE_VER_MAX_DIGITS_PER_PART 3
|
||||
|
||||
#define NO_JAVA_FOUND 0
|
||||
#define FOUND_JRE 1
|
||||
#define FOUND_SDK 2
|
||||
#define FOUND_BUNDLED 4
|
||||
|
||||
#define JRE_ONLY 0
|
||||
#define PREFER_JRE 1
|
||||
#define PREFER_JDK 2
|
||||
#define JDK_ONLY 3
|
||||
|
||||
#define USE_64_BIT_RUNTIME 1
|
||||
#define USE_64_AND_32_BIT_RUNTIME 2
|
||||
#define USE_32_AND_64_BIT_RUNTIME 3
|
||||
#define USE_32_BIT_RUNTIME 4
|
||||
#define INIT_RUNTIME_BITS 9
|
||||
#define JAVA_NOT_FOUND 0
|
||||
#define JAVA_FOUND 1
|
||||
|
||||
#define KEY_WOW64_64KEY 0x0100
|
||||
|
||||
@@ -97,7 +84,7 @@
|
||||
|
||||
typedef void (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
|
||||
|
||||
BOOL initGlobals();
|
||||
BOOL initGlobals(BOOL jni);
|
||||
FILE* openLogFile(const char* exePath, const int pathLen);
|
||||
void closeLogFile();
|
||||
BOOL initializeLogging(const char *lpCmdLine, const char* exePath, const int pathLen);
|
||||
@@ -110,12 +97,10 @@ BOOL regQueryValue(const char* regPath, unsigned char* buffer,
|
||||
unsigned long bufferLength);
|
||||
void formatJavaVersion(char* version, const char* originalVersion);
|
||||
void regSearch(const char* keyName, const int searchType);
|
||||
BOOL isJavaHomeValid(const char* keyName, const int searchType);
|
||||
BOOL isRegistryJavaHomeValid(const char* keyName, const int searchType);
|
||||
BOOL isLauncherPathValid(const char* path);
|
||||
void regSearchWow(const char* keyName, const int searchType);
|
||||
void regSearchJreSdk(const char* jreKeyName, const char* sdkKeyName,
|
||||
const int jdkPreference);
|
||||
BOOL findJavaHome(char* path, const int jdkPreference);
|
||||
void regSearchWow(const char* keyName);
|
||||
BOOL findRegistryJavaHome(char* path);
|
||||
int getExePath(char* exePath);
|
||||
void appendPath(char* basepath, const char* path);
|
||||
void appendLauncher(char* jrePath);
|
||||
@@ -127,8 +112,9 @@ void appendHeapSize(char *dst, const int megabytesID, const int percentID,
|
||||
void setJvmOptions(char *jvmOptions, const char *exePath);
|
||||
BOOL createMutex();
|
||||
void setWorkingDirectory(const char *exePath, const int pathLen);
|
||||
BOOL bundledJreSearch(const char *exePath, const int pathLen);
|
||||
BOOL installedJreSearch();
|
||||
void removeChar(char *src, const char toRemove);
|
||||
BOOL pathJreSearch(const char *exePath, const int pathLen);
|
||||
BOOL registryJreSearch();
|
||||
void createJreSearchError();
|
||||
BOOL jreSearch(const char *exePath, const int pathLen);
|
||||
BOOL appendToPathVar(const char* path);
|
||||
@@ -136,11 +122,15 @@ BOOL appendJreBinToPathVar();
|
||||
void setEnvironmentVariables(const char *exePath, const int pathLen);
|
||||
void setMainClassAndClassPath(const char *exePath, const int pathLen);
|
||||
void setCommandLineArgs(const char *lpCmdLine);
|
||||
int prepare(const char *lpCmdLine);
|
||||
int prepare(const char *lpCmdLine, BOOL jni);
|
||||
void closeProcessHandles();
|
||||
BOOL execute(const BOOL wait, DWORD *dwExitCode);
|
||||
const char* getJavaHome();
|
||||
const char* getMainClass();
|
||||
const char* getLauncherArgs();
|
||||
void getVersionFromOutput(HANDLE outputRd, char *version, int versionLen, BOOL *is64Bit);
|
||||
BOOL CreateChildProcess(char *cmdline, HANDLE outputWr);
|
||||
BOOL isJavaVersionGood(const char* version, BOOL is64Bit);
|
||||
BOOL isJavaPathVersionGood(const char *path, BOOL *is64Bit);
|
||||
|
||||
#endif // _LAUNCH4J_HEAD__INCLUDED_
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
/jniconsolehead.exe
|
||||
/jniconsolehead.layout
|
||||
@@ -6,9 +6,9 @@ CC = gcc.exe
|
||||
WINDRES = windres.exe
|
||||
OBJ = ../../head_jni_BETA/jniconsolehead.o ../../head_jni_BETA/head.o ../../head_jni_BETA/jnihead.o
|
||||
LINKOBJ = ../../head_jni_BETA/jniconsolehead.o ../../head_jni_BETA/head.o ../../head_jni_BETA/jnihead.o
|
||||
LIBS = -L"C:/Users/GMan/Dev-Cpp 5.7.1/MinGW32/lib" -L"C:/Users/GMan/Dev-Cpp 5.7.1/MinGW32/mingw32/lib" -static-libstdc++ -static-libgcc -n -s
|
||||
INCS = -I"C:/Users/GMan/Dev-Cpp 5.7.1/MinGW32/include" -I"C:/Users/GMan/Dev-Cpp 5.7.1/MinGW32/mingw32/include" -I"C:/Users/GMan/Dev-Cpp 5.7.1/MinGW32/lib/gcc/mingw32/4.8.1/include" -I"C:/Program Files (x86)/Java/jdk 1.4/include" -I"C:/Program Files (x86)/Java/jdk 1.4/include/win32"
|
||||
CXXINCS = -I"C:/Users/GMan/Dev-Cpp 5.7.1/MinGW32/include" -I"C:/Users/GMan/Dev-Cpp 5.7.1/MinGW32/mingw32/include" -I"C:/Users/GMan/Dev-Cpp 5.7.1/MinGW32/lib/gcc/mingw32/4.8.1/include" -I"C:/Users/GMan/Dev-Cpp 5.7.1/MinGW32/lib/gcc/mingw32/4.8.1/include/c++" -I"C:/Program Files (x86)/Java/jdk 1.4/include" -I"C:/Program Files (x86)/Java/jdk 1.4/include/win32"
|
||||
LIBS = -L"C:/Program Files (x86)/Dev-Cpp/MinGW32/lib" -L"C:/Program Files (x86)/Dev-Cpp/MinGW32/mingw32/lib" -static-libstdc++ -static-libgcc -n -s
|
||||
INCS = -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/mingw32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/lib/gcc/mingw32/4.8.1/include" -I"c:/Program Files/AdoptOpenJDK/jdk-8.0.282.8-hotspot/include" -I"c:/Program Files/AdoptOpenJDK/jdk-8.0.282.8-hotspot/include/win32"
|
||||
CXXINCS = -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/mingw32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/lib/gcc/mingw32/4.8.1/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/lib/gcc/mingw32/4.8.1/include/c++" -I"c:/Program Files/AdoptOpenJDK/jdk-8.0.282.8-hotspot/include" -I"c:/Program Files/AdoptOpenJDK/jdk-8.0.282.8-hotspot/include/win32"
|
||||
BIN = jniconsolehead.exe
|
||||
CXXFLAGS = $(CXXINCS) -Os
|
||||
CFLAGS = $(INCS) -Os
|
||||
|
||||
@@ -56,7 +56,7 @@ int main(int argc, char* argv[])
|
||||
cmdLine = "";
|
||||
}
|
||||
|
||||
int result = prepare(cmdLine);
|
||||
int result = prepare(cmdLine, TRUE);
|
||||
|
||||
if (result == ERROR_ALREADY_EXISTS)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ UnitCount=6
|
||||
Type=1
|
||||
Ver=2
|
||||
ObjFiles=
|
||||
Includes="C:\Program Files (x86)\Java\jdk 1.4\include";"C:\Program Files (x86)\Java\jdk 1.4\include\win32"
|
||||
Includes="c:\Program Files\AdoptOpenJDK\jdk-8.0.282.8-hotspot\include";"c:\Program Files\AdoptOpenJDK\jdk-8.0.282.8-hotspot\include\win32"
|
||||
Libs=
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
|
||||
2
launch4j/head_src/jniguihead_BETA/.gitignore
vendored
2
launch4j/head_src/jniguihead_BETA/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
/jniguihead.exe
|
||||
/jniguihead.layout
|
||||
@@ -6,9 +6,9 @@ CC = gcc.exe
|
||||
WINDRES = windres.exe
|
||||
OBJ = ../../head_jni_BETA/jniguihead.o ../../head_jni_BETA/head.o ../../head_jni_BETA/jnihead.o
|
||||
LINKOBJ = ../../head_jni_BETA/jniguihead.o ../../head_jni_BETA/head.o ../../head_jni_BETA/jnihead.o
|
||||
LIBS = -L"C:/Users/GMan/Dev-Cpp 5.7.1/MinGW32/lib" -L"C:/Users/GMan/Dev-Cpp 5.7.1/MinGW32/mingw32/lib" -static-libstdc++ -static-libgcc -mwindows -n -s
|
||||
INCS = -I"C:/Users/GMan/Dev-Cpp 5.7.1/MinGW32/include" -I"C:/Users/GMan/Dev-Cpp 5.7.1/MinGW32/mingw32/include" -I"C:/Users/GMan/Dev-Cpp 5.7.1/MinGW32/lib/gcc/mingw32/4.8.1/include" -I"C:/Program Files (x86)/Java/jdk 1.4/include" -I"C:/Program Files (x86)/Java/jdk 1.4/include/win32"
|
||||
CXXINCS = -I"C:/Users/GMan/Dev-Cpp 5.7.1/MinGW32/include" -I"C:/Users/GMan/Dev-Cpp 5.7.1/MinGW32/mingw32/include" -I"C:/Users/GMan/Dev-Cpp 5.7.1/MinGW32/lib/gcc/mingw32/4.8.1/include" -I"C:/Users/GMan/Dev-Cpp 5.7.1/MinGW32/lib/gcc/mingw32/4.8.1/include/c++" -I"C:/Program Files (x86)/Java/jdk 1.4/include" -I"C:/Program Files (x86)/Java/jdk 1.4/include/win32"
|
||||
LIBS = -L"C:/Program Files (x86)/Dev-Cpp/MinGW32/lib" -L"C:/Program Files (x86)/Dev-Cpp/MinGW32/mingw32/lib" -static-libstdc++ -static-libgcc -mwindows -n -s
|
||||
INCS = -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/mingw32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/lib/gcc/mingw32/4.8.1/include" -I"c:/Program Files/AdoptOpenJDK/jdk-8.0.282.8-hotspot/include" -I"c:/Program Files/AdoptOpenJDK/jdk-8.0.282.8-hotspot/include/win32"
|
||||
CXXINCS = -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/mingw32/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/lib/gcc/mingw32/4.8.1/include" -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/lib/gcc/mingw32/4.8.1/include/c++" -I"c:/Program Files/AdoptOpenJDK/jdk-8.0.282.8-hotspot/include" -I"c:/Program Files/AdoptOpenJDK/jdk-8.0.282.8-hotspot/include/win32"
|
||||
BIN = jniguihead.exe
|
||||
CXXFLAGS = $(CXXINCS) -Os
|
||||
CFLAGS = $(INCS) -Os
|
||||
|
||||
@@ -50,7 +50,7 @@ int APIENTRY WinMain(HINSTANCE hInstance,
|
||||
LPSTR lpCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
int result = prepare(lpCmdLine);
|
||||
int result = prepare(lpCmdLine, TRUE);
|
||||
|
||||
if (result == ERROR_ALREADY_EXISTS)
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ UnitCount=7
|
||||
Type=0
|
||||
Ver=2
|
||||
ObjFiles=
|
||||
Includes="C:\Program Files (x86)\Java\jdk 1.4\include";"C:\Program Files (x86)\Java\jdk 1.4\include\win32"
|
||||
Includes="c:\Program Files\AdoptOpenJDK\jdk-8.0.282.8-hotspot\include";"c:\Program Files\AdoptOpenJDK\jdk-8.0.282.8-hotspot\include\win32"
|
||||
Libs=
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
|
||||
13
launch4j/head_src/makefile
Normal file
13
launch4j/head_src/makefile
Normal file
@@ -0,0 +1,13 @@
|
||||
MAKE = mingw32-make.exe
|
||||
|
||||
all:
|
||||
$(MAKE) -C guihead -f Makefile.win all
|
||||
$(MAKE) -C consolehead -f Makefile.win all
|
||||
$(MAKE) -C jniguihead_BETA -f Makefile.win all
|
||||
$(MAKE) -C jniconsolehead_BETA -f Makefile.win all
|
||||
|
||||
clean:
|
||||
$(MAKE) -C guihead -f Makefile.win clean
|
||||
$(MAKE) -C consolehead -f Makefile.win clean
|
||||
$(MAKE) -C jniguihead_BETA -f Makefile.win clean
|
||||
$(MAKE) -C jniconsolehead_BETA -f Makefile.win clean
|
||||
@@ -43,7 +43,6 @@
|
||||
#define SPLASH_TIMEOUT 6
|
||||
#define SPLASH_TIMEOUT_ERR 7
|
||||
#define CHDIR 8
|
||||
#define SET_PROC_NAME 9
|
||||
#define ERR_TITLE 10
|
||||
#define GUI_HEADER_STAYS_ALIVE 11
|
||||
#define JVM_OPTIONS 12
|
||||
@@ -52,7 +51,7 @@
|
||||
#define MAIN_CLASS 15
|
||||
#define CLASSPATH 16
|
||||
#define WRAPPER 17
|
||||
#define JDK_PREFERENCE 18
|
||||
#define REQUIRES_JDK 18
|
||||
#define ENV_VARIABLES 19
|
||||
#define PRIORITY_CLASS 20
|
||||
#define DOWNLOAD_URL 21
|
||||
@@ -63,13 +62,11 @@
|
||||
#define INITIAL_HEAP_PERCENT 26
|
||||
#define MAX_HEAP_SIZE 27
|
||||
#define MAX_HEAP_PERCENT 28
|
||||
#define BUNDLED_JRE_64_BIT 29
|
||||
#define RUNTIME_BITS 30
|
||||
#define REQUIRES_64_BIT 29
|
||||
#define RESTART_ON_CRASH 31
|
||||
#define BUNDLED_JRE_AS_FALLBACK 32
|
||||
|
||||
#define STARTUP_ERR 101
|
||||
#define BUNDLED_JRE_ERR 102
|
||||
#define JRE_NOT_FOUND_ERR 102
|
||||
#define JRE_VERSION_ERR 103
|
||||
#define LAUNCHER_ERR 104
|
||||
#define INSTANCE_ALREADY_EXISTS_MSG 105
|
||||
|
||||
BIN
launch4j/launch4j.jar
LFS
BIN
launch4j/launch4j.jar
LFS
Binary file not shown.
8
launch4j/launch4jc
Executable file
8
launch4j/launch4jc
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
LAUNCH4J="$(dirname "$0")"/launch4j.jar
|
||||
if [ -n "$JAVA_HOME" ]; then
|
||||
$JAVA_HOME/bin/java -Djava.awt.headless=true -jar "$LAUNCH4J" "$@"
|
||||
else
|
||||
java -Djava.awt.headless=true -jar "$LAUNCH4J" "$@"
|
||||
fi
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
|
||||
The BSD License for the JGoodies Looks
|
||||
======================================
|
||||
|
||||
Copyright (c) 2001-2014 JGoodies Software GmbH. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
o Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
o 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.
|
||||
|
||||
o Neither the name of JGoodies Software GmbH 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 OWNER 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.
|
||||
@@ -1,6 +1,7 @@
|
||||
(BSD Style License)
|
||||
|
||||
Copyright (c) 2003-2004, Joe Walnes
|
||||
Copyright (c) 2003-2006, Joe Walnes
|
||||
Copyright (c) 2006-2019, XStream Committers
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
BIN
launch4j/lib/ant.jar
LFS
BIN
launch4j/lib/ant.jar
LFS
Binary file not shown.
Binary file not shown.
@@ -1,50 +1,202 @@
|
||||
/*
|
||||
|
||||
============================================================================
|
||||
The Apache Software License, Version 1.1
|
||||
============================================================================
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modifica-
|
||||
tion, are permitted provided that the following conditions are met:
|
||||
1. Definitions.
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
2. 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.
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
3. The end-user documentation included with the redistribution, if any, must
|
||||
include the following acknowledgment: "This product includes software
|
||||
developed by the Apache Software Foundation (http://www.apache.org/)."
|
||||
Alternately, this acknowledgment may appear in the software itself, if
|
||||
and wherever such third-party acknowledgments normally appear.
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
|
||||
used to endorse or promote products derived from this software without
|
||||
prior written permission. For written permission, please contact
|
||||
apache@apache.org.
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
5. Products derived from this software may not be called "Apache", nor may
|
||||
"Apache" appear in their name, without prior written permission of the
|
||||
Apache Software Foundation.
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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
|
||||
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
|
||||
DING, 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.
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
This software consists of voluntary contributions made by many individuals
|
||||
on behalf of the Apache Software Foundation and was originally created by
|
||||
Stefano Mazzocchi <stefano@apache.org>. For more information on the Apache
|
||||
Software Foundation, please see <http://www.apache.org/>.
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
*/
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
201
launch4j/lib/flatlaf.LICENSE.txt
Normal file
201
launch4j/lib/flatlaf.LICENSE.txt
Normal file
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
BIN
launch4j/lib/flatlaf.jar
LFS
Normal file
BIN
launch4j/lib/flatlaf.jar
LFS
Normal file
Binary file not shown.
@@ -1,25 +0,0 @@
|
||||
Copyright (c) 2002, Simone Bordet & Marco Cravero
|
||||
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 Foxtrot nor the names of the 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 REGENTS 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.
|
||||
BIN
launch4j/lib/foxtrot.jar
LFS
BIN
launch4j/lib/foxtrot.jar
LFS
Binary file not shown.
BIN
launch4j/lib/jgoodies-looks.jar
LFS
BIN
launch4j/lib/jgoodies-looks.jar
LFS
Binary file not shown.
BIN
launch4j/lib/xstream.jar
LFS
BIN
launch4j/lib/xstream.jar
LFS
Binary file not shown.
@@ -1,4 +1,5 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.sf.launch4j</groupId>
|
||||
@@ -115,11 +116,6 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>foxtrot</groupId>
|
||||
<artifactId>foxtrot</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jgoodies</groupId>
|
||||
<artifactId>jgoodies-common</artifactId>
|
||||
@@ -131,9 +127,9 @@
|
||||
<version>1.2.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jgoodies</groupId>
|
||||
<artifactId>looks</artifactId>
|
||||
<version>2.2.2</version>
|
||||
<groupId>com.formdev</groupId>
|
||||
<artifactId>flatlaf</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
@@ -143,7 +139,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<version>1.9.15</version>
|
||||
<version>1.10.9</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
@@ -161,10 +157,10 @@
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.1</version>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>1.6</source>
|
||||
<target>1.6</target>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -321,7 +317,10 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.9.1</version>
|
||||
<version>3.2.0</version>
|
||||
<configuration>
|
||||
<doclint>none</doclint>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
@@ -386,7 +385,7 @@
|
||||
<plugin>
|
||||
<groupId>com.akathist.maven.plugins.launch4j</groupId>
|
||||
<artifactId>launch4j-maven-plugin</artifactId>
|
||||
<version>1.6</version>
|
||||
<version>1.7.25</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>launch4j</id>
|
||||
@@ -404,7 +403,7 @@
|
||||
<stayAlive>false</stayAlive>
|
||||
|
||||
<jre>
|
||||
<minVersion>1.6.0</minVersion>
|
||||
<minVersion>1.8.0</minVersion>
|
||||
</jre>
|
||||
<versionInfo>
|
||||
<fileVersion>${versionNumber}</fileVersion>
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
sign4j version 3.0
|
||||
------------------
|
||||
|
||||
sign4j is a very simple utility to digitally sign executables containing an appended jar file, like those created by launch4j.
|
||||
|
||||
It works by first signing a temporary file to detect the size of the applied signature, and by then adding that size to a counter in the ZIP_END_HEADER of the embedded jar, so as to pretend that the signature is a comment belonging to it. That way the jar remains formally correct, and java accepts it.
|
||||
|
||||
This manipulation must be done atomically with the signing process, because doing it before would invalidate the jar file, while doing it later would break the signature. That's why the whole command line of your signing tool must be passed to sign4j, which will do the job.
|
||||
|
||||
Any signing tool can be used, as long as the name of the output file can be recognized among its parameters. This is currently done by either using an -out option if present, or taking the last filename with an exe suffix after all supplied options.
|
||||
|
||||
If the involved tool is able to remove a previous signature before adding the new one (as is normally the case) the initial test can be performed on the target executable itself, avoiding the creation of a temporary file. You can use the option --onthespot to signal that to sign4j.
|
||||
|
||||
The option --strict can be used to suppress the use of double quotes around parameters that strictly don't need them. The option --verbose shows diagnostics about intermediary steps of the process.
|
||||
|
||||
This utility can also be used to sign normal executables, but then it will remember you that the file can be signed directly.
|
||||
|
||||
Please send comments to bramfeld@diogen.de
|
||||
@@ -1,259 +0,0 @@
|
||||
/*
|
||||
sign4j.c: a simple utility to sign executables created by Launch4j
|
||||
|
||||
Copyright (c) 2012 Servoy
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. 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.
|
||||
|
||||
3. Neither the name of the copyright holder 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.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#else
|
||||
#include <sys/io.h>
|
||||
#include <sys/fcntl.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define ZIP_END_HEADER "\x50\x4B\x05\x06"
|
||||
#define END_HEADER_SIZE 22
|
||||
#define MAX_COMMENT_SIZE 0xFFFF
|
||||
#define SWAP_BLOCK_SIZE (4 * 1024 * 1024)
|
||||
#define TEST_FILE_NAME "sign4j_temporary.exe"
|
||||
#define SIGN4J_VERSION "3.0"
|
||||
|
||||
#ifndef _WIN32
|
||||
#define O_BINARY 0
|
||||
#define _O_SHORT_LIVED 0
|
||||
#define _S_IREAD S_IREAD
|
||||
#define _S_IWRITE S_IWRITE
|
||||
#define stricmp strcasecmp
|
||||
#endif
|
||||
|
||||
typedef unsigned char byte;
|
||||
|
||||
char command[4096];
|
||||
byte* image = 0;
|
||||
|
||||
void usage (void);
|
||||
void quit (int rsn);
|
||||
void clear (void);
|
||||
|
||||
int main (int argc, char* argv[])
|
||||
{
|
||||
char bfr[2];
|
||||
char* inf;
|
||||
char* outf;
|
||||
char* trg;
|
||||
byte* lmt;
|
||||
long lng, ext, off, blck, sgm;
|
||||
int fd, td;
|
||||
int fnd, spt, unq, vrb, qts, cmn;
|
||||
int i, j, n;
|
||||
byte* p;
|
||||
|
||||
inf = outf = 0, fnd = spt = unq = vrb = 0;
|
||||
for (i = 1; i < argc && argv[i][0] == '-'; i++)
|
||||
if (! strcmp (argv[i], "--onthespot"))
|
||||
spt = 1;
|
||||
else if (! strcmp (argv[i], "--strict"))
|
||||
unq = 1;
|
||||
else if (! strcmp (argv[i], "--verbose"))
|
||||
vrb = 1;
|
||||
j = i;
|
||||
for (i = j + 1; i < argc; i++)
|
||||
if (! strcmp (argv[i], "-in") && i < argc - 1)
|
||||
inf = argv[++i], fnd = 1;
|
||||
else if (! strcmp (argv[i], "-out") && i < argc - 1)
|
||||
outf = argv[++i], fnd = 1;
|
||||
else if (argv[i][0] == '-' || (argv[i][0] == '/' && strlen (argv[i]) < 5))
|
||||
(! fnd ? (inf = outf = 0) : 0);
|
||||
else if (! fnd && (n = strlen (argv[i])) > 4 && ! stricmp (argv[i] + n - 4, ".exe"))
|
||||
inf = outf = argv[i];
|
||||
if (! inf || ! outf)
|
||||
usage ();
|
||||
atexit (clear);
|
||||
|
||||
if ((fd = open (inf, O_RDONLY | O_BINARY)) < 0)
|
||||
quit (1);
|
||||
if ((lng = lseek (fd, 0, SEEK_END)) < 0)
|
||||
quit (2);
|
||||
blck = (lng > SWAP_BLOCK_SIZE ? SWAP_BLOCK_SIZE : lng);
|
||||
if (! (image = (byte*) malloc (blck)))
|
||||
quit (4);
|
||||
sgm = (blck > END_HEADER_SIZE + MAX_COMMENT_SIZE ? END_HEADER_SIZE + MAX_COMMENT_SIZE : blck);
|
||||
if (lseek (fd, -sgm, SEEK_END) < 0 || read (fd, image, sgm) != sgm)
|
||||
quit (2);
|
||||
for (p = image + sgm - END_HEADER_SIZE; p > image; p--)
|
||||
if (! memcmp (p, ZIP_END_HEADER, 4) && ((p[END_HEADER_SIZE - 1] << 8) | p[END_HEADER_SIZE - 2]) == (image + sgm) - (p + END_HEADER_SIZE))
|
||||
break;
|
||||
if (p > image)
|
||||
{
|
||||
off = lng - ((image + sgm) - (p + END_HEADER_SIZE - 2));
|
||||
cmn = (p[END_HEADER_SIZE - 1] << 8) | p[END_HEADER_SIZE - 2];
|
||||
|
||||
if (! spt && (inf == outf || ! strcmp (inf, outf)))
|
||||
{
|
||||
printf ("Making temporary file\n");
|
||||
if ((td = open (TEST_FILE_NAME, O_CREAT | _O_SHORT_LIVED | O_WRONLY | O_BINARY, _S_IREAD | _S_IWRITE)) < 0)
|
||||
quit (5);
|
||||
if (lseek (fd, 0, SEEK_SET) < 0)
|
||||
quit (2);
|
||||
for (ext = lng; ext > 0; ext -= blck)
|
||||
{
|
||||
sgm = (ext > blck ? blck : ext);
|
||||
if (read (fd, image, sgm) != sgm || write (td, image, sgm) != sgm)
|
||||
quit (6);
|
||||
}
|
||||
close (td);
|
||||
trg = TEST_FILE_NAME;
|
||||
}
|
||||
else
|
||||
trg = outf;
|
||||
close (fd);
|
||||
|
||||
#ifdef _WIN32
|
||||
strcpy (command, "\" ");
|
||||
#else
|
||||
strcpy (command, "");
|
||||
#endif
|
||||
|
||||
for (i = j; i < argc; i++)
|
||||
{
|
||||
p = (argv[i] == outf ? trg : argv[i]);
|
||||
qts = (! unq || strchr (p, 32));
|
||||
if (qts)
|
||||
strcat (command, "\"");
|
||||
strcat (command, p);
|
||||
if (qts)
|
||||
strcat (command, "\"");
|
||||
strcat (command, " ");
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
strcat (command, "\"");
|
||||
#endif
|
||||
|
||||
if (! vrb)
|
||||
#ifdef _WIN32
|
||||
strcat (command, " > NUL");
|
||||
#else
|
||||
strcat (command, " > /dev/null");
|
||||
#endif
|
||||
|
||||
system (command);
|
||||
|
||||
if ((td = open (trg, O_RDONLY | O_BINARY)) < 0)
|
||||
quit (7);
|
||||
if ((ext = lseek (td, 0, SEEK_END)) < 0)
|
||||
quit (7);
|
||||
close (td);
|
||||
if ((cmn += ext - lng) < 0 || cmn > MAX_COMMENT_SIZE)
|
||||
quit (8);
|
||||
|
||||
if ((fd = open (inf, O_WRONLY | O_BINARY)) < 0)
|
||||
quit (1);
|
||||
if (lseek (fd, off, SEEK_SET) < 0)
|
||||
quit (3);
|
||||
bfr[0] = cmn & 0xFF;
|
||||
bfr[1] = (cmn >> 8) & 0xFF;
|
||||
if (write (fd, bfr, 2) != 2)
|
||||
quit (3);
|
||||
close (fd);
|
||||
}
|
||||
else
|
||||
{
|
||||
close (fd);
|
||||
printf ("You don't need sign4j to sign this file\n");
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
strcpy (command, "\" ");
|
||||
#else
|
||||
strcpy (command, "");
|
||||
#endif
|
||||
|
||||
for (i = j; i < argc; i++)
|
||||
{
|
||||
p = argv[i];
|
||||
qts = (! unq || strchr (p, 32));
|
||||
if (qts)
|
||||
strcat (command, "\"");
|
||||
strcat (command, p);
|
||||
if (qts)
|
||||
strcat (command, "\"");
|
||||
strcat (command, " ");
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
strcat (command, "\"");
|
||||
#endif
|
||||
|
||||
return system (command);
|
||||
}
|
||||
|
||||
|
||||
void usage ()
|
||||
{
|
||||
printf ("\nThis is sign4j version " SIGN4J_VERSION "\n\n");
|
||||
printf ("Usage: sign4j [options] <arguments>\n\n");
|
||||
printf (" * options:\n");
|
||||
printf (" --onthespot avoid the creation of a temporary file (your tool must be able to sign twice)\n");
|
||||
printf (" --strict supress the use of double quotes around parameters that strictly don't need them\n");
|
||||
printf (" --verbose show diagnostics about intermediary steps of the process\n");
|
||||
printf (" * arguments must specify verbatim the command line for your signing tool\n");
|
||||
printf (" * only one file can be signed on each invocation\n");
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
void quit (int rsn)
|
||||
{
|
||||
switch (rsn)
|
||||
{
|
||||
case 1: puts ("Could not open file\n"); break;
|
||||
case 2: puts ("Could not read file\n"); break;
|
||||
case 3: puts ("Could not write file\n"); break;
|
||||
case 4: puts ("Not enough memory\n"); break;
|
||||
case 5: puts ("Could not open temporary\n"); break;
|
||||
case 6: puts ("Could not write temporary\n"); break;
|
||||
case 7: puts ("Could not read target\n"); break;
|
||||
case 8: puts ("Unsupported operation\n"); break;
|
||||
}
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
void clear ()
|
||||
{
|
||||
if (access (TEST_FILE_NAME, 0) == 0)
|
||||
remove (TEST_FILE_NAME);
|
||||
if (image)
|
||||
free (image);
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
Launch4j (http://launch4j.sourceforge.net/)
|
||||
Cross-platform Java application wrapper for creating Windows native executables.
|
||||
|
||||
Copyright (c) 2004, 2017 Grzegorz Kowal
|
||||
Copyright (c) 2004, 2019 Grzegorz Kowal
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
versionNumber=3.12.0.0
|
||||
version=3.12
|
||||
versionNumber=3.50.0.0
|
||||
version=3.50
|
||||
|
||||
@@ -86,7 +86,7 @@ public class Main {
|
||||
" (http://launch4j.sourceforge.net/)\n" +
|
||||
"Cross-platform Java application wrapper" +
|
||||
" for creating Windows native executables.\n\n" +
|
||||
"Copyright (C) 2004, 2018 Grzegorz Kowal\n\n" +
|
||||
"Copyright (C) 2004, 2022 Grzegorz Kowal\n\n" +
|
||||
"Launch4j comes with ABSOLUTELY NO WARRANTY.\n" +
|
||||
"This is free software, licensed under the BSD License.\n" +
|
||||
"This product includes software developed by the Apache Software Foundation" +
|
||||
|
||||
@@ -39,7 +39,6 @@ package net.sf.launch4j;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.util.List;
|
||||
@@ -53,7 +52,7 @@ import net.sf.launch4j.config.Splash;
|
||||
import net.sf.launch4j.config.VersionInfo;
|
||||
|
||||
/**
|
||||
* @author Copyright (C) 2005 Grzegorz Kowal
|
||||
* @author Copyright (C) 2022 Grzegorz Kowal
|
||||
*/
|
||||
public class RcBuilder {
|
||||
|
||||
@@ -89,7 +88,7 @@ public class RcBuilder {
|
||||
public static final int MAIN_CLASS = 15;
|
||||
public static final int CLASSPATH = 16;
|
||||
public static final int WRAPPER = 17;
|
||||
public static final int JDK_PREFERENCE = 18;
|
||||
public static final int REQUIRES_JDK = 18;
|
||||
public static final int ENV_VARIABLES = 19;
|
||||
public static final int PRIORITY_CLASS = 20;
|
||||
public static final int DOWNLOAD_URL = 21;
|
||||
@@ -100,13 +99,11 @@ public class RcBuilder {
|
||||
public static final int INITIAL_HEAP_PERCENT = 26;
|
||||
public static final int MAX_HEAP_SIZE = 27;
|
||||
public static final int MAX_HEAP_PERCENT = 28;
|
||||
public static final int BUNDLED_JRE_64_BIT = 29;
|
||||
public static final int RUNTIME_BITS = 30;
|
||||
public static final int REQUIRES_64_BIT = 29;
|
||||
public static final int RESTART_ON_CRASH = 31;
|
||||
public static final int BUNDLED_JRE_AS_FALLBACK = 32;
|
||||
|
||||
public static final int STARTUP_ERR = 101;
|
||||
public static final int BUNDLED_JRE_ERR = 102;
|
||||
public static final int JRE_NOT_FOUND_ERR = 102;
|
||||
public static final int JRE_VERSION_ERR = 103;
|
||||
public static final int LAUNCHER_ERR = 104;
|
||||
public static final int INSTANCE_ALREADY_EXISTS_MSG = 105;
|
||||
@@ -253,13 +250,11 @@ public class RcBuilder {
|
||||
|
||||
private void addJre(Jre jre) {
|
||||
addWindowsPath(JRE_PATH, jre.getPath());
|
||||
addTrue(BUNDLED_JRE_64_BIT, jre.getBundledJre64Bit());
|
||||
addTrue(BUNDLED_JRE_AS_FALLBACK, jre.getBundledJreAsFallback());
|
||||
addTrue(REQUIRES_JDK, jre.getRequiresJdk());
|
||||
addTrue(REQUIRES_64_BIT, jre.getRequires64Bit());
|
||||
addText(JAVA_MIN_VER, jre.getMinVersion());
|
||||
addText(JAVA_MAX_VER, jre.getMaxVersion());
|
||||
addText(JDK_PREFERENCE, String.valueOf(jre.getJdkPreferenceIndex()));
|
||||
|
||||
addInteger(RUNTIME_BITS, jre.getRuntimeBitsIndex() + 1);
|
||||
addInteger(INITIAL_HEAP_SIZE, jre.getInitialHeapSize());
|
||||
addInteger(INITIAL_HEAP_PERCENT, jre.getInitialHeapPercent());
|
||||
addInteger(MAX_HEAP_SIZE, jre.getMaxHeapSize());
|
||||
@@ -295,7 +290,7 @@ public class RcBuilder {
|
||||
}
|
||||
|
||||
addText(STARTUP_ERR, msg.getStartupErr());
|
||||
addText(BUNDLED_JRE_ERR, msg.getBundledJreErr());
|
||||
addText(JRE_NOT_FOUND_ERR, msg.getJreNotFoundErr());
|
||||
addText(JRE_VERSION_ERR, msg.getJreVersionErr());
|
||||
addText(LAUNCHER_ERR, msg.getLauncherErr());
|
||||
|
||||
|
||||
@@ -54,16 +54,4 @@ public class AntJre extends Jre {
|
||||
public void unwrap() {
|
||||
setOptions(StringWrapper.unwrap(wrappedOptions));
|
||||
}
|
||||
|
||||
/**
|
||||
* For backwards compatibility.
|
||||
*/
|
||||
public void setDontUsePrivateJres(boolean dontUse) {
|
||||
if (dontUse) {
|
||||
setJdkPreference(JDK_PREFERENCE_JRE_ONLY);
|
||||
}
|
||||
else {
|
||||
setJdkPreference(JDK_PREFERENCE_PREFER_JRE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
#
|
||||
# Launch4j (http://launch4j.sourceforge.net/)
|
||||
# Cross-platform Java application wrapper for creating Windows native executables.
|
||||
#
|
||||
# Copyright (c) 2004, 2007 Grzegorz Kowal, Patricio Martínez Ros
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification,
|
||||
# are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. 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.
|
||||
#
|
||||
# 3. Neither the name of the copyright holder 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.
|
||||
#
|
||||
|
||||
Launch4jTask.specify.config=Specify configFile or config
|
||||
AntConfig.duplicate.element=Duplicate element
|
||||
@@ -310,24 +310,24 @@ public class Bindings implements PropertyChangeListener, ActionListener {
|
||||
/**
|
||||
* Handles JList
|
||||
*/
|
||||
public Bindings add(String property, JList list) {
|
||||
public <T> Bindings add(String property, JList<T> list) {
|
||||
registerPropertyChangeListener(list);
|
||||
return add(new JListBinding(property, list));
|
||||
return add(new JListBinding<T>(property, list));
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles JComboBox
|
||||
*/
|
||||
public Bindings add(String property, JComboBox combo, int defaultValue) {
|
||||
public <T> Bindings add(String property, JComboBox<T> combo, int defaultValue) {
|
||||
combo.addActionListener(this);
|
||||
return add(new JComboBoxBinding(property, combo, defaultValue));
|
||||
return add(new JComboBoxBinding<T>(property, combo, defaultValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles JComboBox
|
||||
*/
|
||||
public Bindings add(String property, JComboBox combo) {
|
||||
public <T> Bindings add(String property, JComboBox<T> combo) {
|
||||
combo.addActionListener(this);
|
||||
return add(new JComboBoxBinding(property, combo, 0));
|
||||
return add(new JComboBoxBinding<T>(property, combo, 0));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,13 +45,13 @@ import org.apache.commons.beanutils.PropertyUtils;
|
||||
/**
|
||||
* @author Copyright (C) 2007 Ian Roberts
|
||||
*/
|
||||
public class JComboBoxBinding implements Binding {
|
||||
public class JComboBoxBinding<T> implements Binding {
|
||||
private final String _property;
|
||||
private final JComboBox _combo;
|
||||
private final JComboBox<T> _combo;
|
||||
private final int _defaultValue;
|
||||
private final Color _validColor;
|
||||
|
||||
public JComboBoxBinding(String property, JComboBox combo, int defaultValue) {
|
||||
public JComboBoxBinding(String property, JComboBox<T> combo, int defaultValue) {
|
||||
if (property == null || combo == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
@@ -48,12 +48,12 @@ import org.apache.commons.beanutils.PropertyUtils;
|
||||
/**
|
||||
* @author Copyright (C) 2006 Grzegorz Kowal
|
||||
*/
|
||||
public class JListBinding implements Binding {
|
||||
public class JListBinding<T> implements Binding {
|
||||
private final String _property;
|
||||
private final JList _list;
|
||||
private final JList<T> _list;
|
||||
private final Color _validColor;
|
||||
|
||||
public JListBinding(String property, JList list) {
|
||||
public JListBinding(String property, JList<T> list) {
|
||||
if (property == null || list == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
@@ -70,17 +70,18 @@ public class JListBinding implements Binding {
|
||||
}
|
||||
|
||||
public void clear(IValidatable bean) {
|
||||
_list.setModel(new DefaultListModel());
|
||||
_list.setModel(new DefaultListModel<T>());
|
||||
}
|
||||
|
||||
public void put(IValidatable bean) {
|
||||
try {
|
||||
DefaultListModel model = new DefaultListModel();
|
||||
List<?> list = (List<?>) PropertyUtils.getProperty(bean, _property);
|
||||
DefaultListModel<T> model = new DefaultListModel<T>();
|
||||
@SuppressWarnings("unchecked")
|
||||
List<T> list = (List<T>) PropertyUtils.getProperty(bean, _property);
|
||||
|
||||
if (list != null) {
|
||||
for (Object o : list) {
|
||||
model.addElement(o);
|
||||
for (T item : list) {
|
||||
model.addElement(item);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +93,7 @@ public class JListBinding implements Binding {
|
||||
|
||||
public void get(IValidatable bean) {
|
||||
try {
|
||||
DefaultListModel model = (DefaultListModel) _list.getModel();
|
||||
DefaultListModel<T> model = (DefaultListModel<T>) _list.getModel();
|
||||
final int size = model.getSize();
|
||||
List<Object> list = new ArrayList<Object>(size);
|
||||
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
#
|
||||
# Launch4j (http://launch4j.sourceforge.net/)
|
||||
# Cross-platform Java application wrapper for creating Windows native executables.
|
||||
#
|
||||
# Copyright (c) 2004, 2007 Grzegorz Kowal, Patricio Martínez Ros
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification,
|
||||
# are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. 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.
|
||||
#
|
||||
# 3. Neither the name of the copyright holder 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.
|
||||
#
|
||||
|
||||
OptComponentBinding.must.implement=El componente opcional debe ser implementado
|
||||
|
||||
Validator.empty.field=Introduzca: {0}
|
||||
Validator.invalid.data=Dato no válido: {0}
|
||||
Validator.must.be.in.range={0} debe estar en el rango [{1}-{2}]
|
||||
Validator.must.be.at.least={0} deb ser al menos
|
||||
Validator.already.exists={0} ya existe.
|
||||
Validator.doesnt.exist={0} no existe.
|
||||
Validator.exceeds.max.length={0} excede la longitud máxima de {1} caracteres.
|
||||
Validator.invalid.option={0} must be one of [{1}]
|
||||
|
||||
Bindings.duplicate.binding=Binding duplicado
|
||||
|
||||
JRadioButtonBinding.property.null=La propiedad es nula
|
||||
JRadioButtonBinding.nothing.selected=Nada seleccionado
|
||||
JRadioButtonBinding.index.out.of.bounds=Índice de botón fuera de límite
|
||||
JComboBoxBinding.property.null=Property is null
|
||||
JComboBoxBinding.index.out.of.bounds=Combo box index out of bounds
|
||||
@@ -59,8 +59,6 @@ public class Config implements IValidatable {
|
||||
public static final String ICON = "icon";
|
||||
|
||||
// __________________________________________________________________________________
|
||||
public static final String DOWNLOAD_URL = "http://java.com/download";
|
||||
|
||||
public static final String GUI_HEADER = "gui";
|
||||
public static final String CONSOLE_HEADER = "console";
|
||||
public static final String JNI_GUI_HEADER_32 = "jniGui32";
|
||||
@@ -145,7 +143,7 @@ public class Config implements IValidatable {
|
||||
Validator.checkOptStrings(variables,
|
||||
Validator.MAX_ARGS,
|
||||
Validator.MAX_ARGS,
|
||||
"[^=%\t]+=[^=\t]+",
|
||||
"[^=%\t]+=[^\t]+",
|
||||
"variables",
|
||||
Messages.getString("Config.variables"),
|
||||
Messages.getString("Config.variables.err"));
|
||||
@@ -169,9 +167,7 @@ public class Config implements IValidatable {
|
||||
Validator.checkIn(getPriority(), new String[] { "normal" }, "priority",
|
||||
"Process priority is not supported,");
|
||||
Validator.checkNotNull(classPath, "classpath", "classpath");
|
||||
Validator.checkFalse(jre.getBundledJre64Bit(), "jre.bundledJre64Bit",
|
||||
"64-bit bundled JRE not supported.");
|
||||
Validator.checkTrue(Jre.RUNTIME_BITS_32.equals(jre.getRuntimeBits()), "jre.runtimeBits",
|
||||
Validator.checkFalse(jre.getRequires64Bit(), "jre.requires64Bit",
|
||||
"64-bit JRE not supported.");
|
||||
}
|
||||
}
|
||||
@@ -395,7 +391,7 @@ public class Config implements IValidatable {
|
||||
}
|
||||
|
||||
public String getDownloadUrl() {
|
||||
return downloadUrl == null ? DOWNLOAD_URL : downloadUrl;
|
||||
return downloadUrl;
|
||||
}
|
||||
|
||||
public void setDownloadUrl(String downloadUrl) {
|
||||
|
||||
@@ -38,13 +38,10 @@ package net.sf.launch4j.config;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.Collection;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
@@ -53,10 +50,11 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.ls.DOMImplementationLS;
|
||||
import org.w3c.dom.ls.LSSerializer;
|
||||
|
||||
import net.sf.launch4j.Util;
|
||||
|
||||
import com.thoughtworks.xstream.XStream;
|
||||
import com.thoughtworks.xstream.io.xml.DomDriver;
|
||||
import com.thoughtworks.xstream.security.*;
|
||||
|
||||
import net.sf.launch4j.binding.Validator;
|
||||
|
||||
/**
|
||||
* @author Copyright (C) 2014 Grzegorz Kowal
|
||||
@@ -71,6 +69,13 @@ public class ConfigPersister {
|
||||
|
||||
private ConfigPersister() {
|
||||
_xstream = new XStream(new DomDriver());
|
||||
|
||||
_xstream.addPermission(NoTypePermission.NONE);
|
||||
_xstream.addPermission(NullPermission.NULL);
|
||||
_xstream.addPermission(PrimitiveTypePermission.PRIMITIVES);
|
||||
_xstream.allowTypeHierarchy(Collection.class);
|
||||
_xstream.allowTypesByWildcard(new String[] { "net.sf.launch4j.config.*" });
|
||||
|
||||
_xstream.alias("launch4jConfig", Config.class);
|
||||
_xstream.alias("classPath", ClassPath.class);
|
||||
_xstream.alias("jre", Jre.class);
|
||||
@@ -132,68 +137,13 @@ public class ConfigPersister {
|
||||
LSSerializer lsSerializer = domImplementation.createLSSerializer();
|
||||
String configString = lsSerializer.writeToString(doc);
|
||||
|
||||
_config = (Config) _xstream.fromXML(convertToCurrent(configString));
|
||||
_config = convertToCurrent(configString);
|
||||
setConfigPath(f);
|
||||
} catch (Exception e) {
|
||||
throw new ConfigPersisterException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Imports launch4j 1.x.x config file.
|
||||
*/
|
||||
public void loadVersion1(File f) throws ConfigPersisterException {
|
||||
try {
|
||||
Props props = new Props(f);
|
||||
_config = new Config();
|
||||
String header = props.getProperty(Config.HEADER);
|
||||
_config.setHeaderType(header == null
|
||||
|| header.toLowerCase().equals("guihead.bin") ? Config.GUI_HEADER
|
||||
: Config.CONSOLE_HEADER);
|
||||
_config.setJar(props.getFile(Config.JAR));
|
||||
_config.setOutfile(props.getFile(Config.OUTFILE));
|
||||
_config.setJre(new Jre());
|
||||
_config.getJre().setPath(props.getProperty(Jre.PATH));
|
||||
_config.getJre().setMinVersion(props.getProperty(Jre.MIN_VERSION));
|
||||
_config.getJre().setMaxVersion(props.getProperty(Jre.MAX_VERSION));
|
||||
|
||||
String args = props.getProperty(Jre.ARGS);
|
||||
|
||||
if (args != null) {
|
||||
List<String> jreOptions = new ArrayList<String>();
|
||||
jreOptions.add(args);
|
||||
_config.getJre().setOptions(jreOptions);
|
||||
}
|
||||
|
||||
_config.setCmdLine(props.getProperty(Config.JAR_ARGS));
|
||||
_config.setChdir("true".equals(props.getProperty(Config.CHDIR))
|
||||
? "." : null);
|
||||
_config.setStayAlive("true".equals(props.getProperty(Config.STAY_ALIVE)));
|
||||
_config.setErrTitle(props.getProperty(Config.ERR_TITLE));
|
||||
_config.setIcon(props.getFile(Config.ICON));
|
||||
|
||||
File splashFile = props.getFile(Splash.SPLASH_FILE);
|
||||
|
||||
if (splashFile != null) {
|
||||
_config.setSplash(new Splash());
|
||||
_config.getSplash().setFile(splashFile);
|
||||
String waitfor = props.getProperty("waitfor"); // 1.x
|
||||
_config.getSplash().setWaitForWindow(waitfor != null
|
||||
&& !waitfor.equals(""));
|
||||
String splashTimeout = props.getProperty(Splash.TIMEOUT);
|
||||
if (splashTimeout != null) {
|
||||
_config.getSplash().setTimeout(Integer.parseInt(splashTimeout));
|
||||
}
|
||||
_config.getSplash().setTimeoutErr("true".equals(
|
||||
props.getProperty(Splash.TIMEOUT_ERR)));
|
||||
} else {
|
||||
_config.setSplash(null);
|
||||
}
|
||||
setConfigPath(f);
|
||||
} catch (IOException e) {
|
||||
throw new ConfigPersisterException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void save(File f) throws ConfigPersisterException {
|
||||
try {
|
||||
@@ -211,66 +161,40 @@ public class ConfigPersister {
|
||||
/**
|
||||
* Converts 2.x config to current format.
|
||||
*/
|
||||
private String convertToCurrent(String configString) {
|
||||
return configString
|
||||
private Config convertToCurrent(String configString) {
|
||||
boolean requires64Bit = configString.contains("<bundledJre64Bit>true</bundledJre64Bit>")
|
||||
|| configString.contains("<runtimeBits>64</runtimeBits>");
|
||||
|
||||
String updatedConfigString = configString
|
||||
.replaceAll("<headerType>0<", "<headerType>gui<")
|
||||
.replaceAll("<headerType>1<", "<headerType>console<")
|
||||
.replaceAll("jarArgs>", "cmdLine>")
|
||||
.replaceAll("<jarArgs[ ]*/>", "<cmdLine/>")
|
||||
.replaceAll("args>", "opt>")
|
||||
.replaceAll("<args[ ]*/>", "<opt/>")
|
||||
.replaceAll("<dontUsePrivateJres>false</dontUsePrivateJres>",
|
||||
"<jdkPreference>" + Jre.JDK_PREFERENCE_PREFER_JRE + "</jdkPreference>")
|
||||
.replaceAll("<dontUsePrivateJres>true</dontUsePrivateJres>",
|
||||
"<jdkPreference>" + Jre.JDK_PREFERENCE_JRE_ONLY + "</jdkPreference>")
|
||||
.replaceAll("<jdkPreference>jdkOnly</jdkPreference>", "<requiresJdk>true</requiresJdk>")
|
||||
.replaceAll("<initialHeapSize>0</initialHeapSize>", "")
|
||||
.replaceAll("<maxHeapSize>0</maxHeapSize>", "")
|
||||
.replaceAll("<customProcName>.*</customProcName>", "");
|
||||
.replaceAll("<customProcName>.*</customProcName>", "")
|
||||
.replaceAll("<bundledJre64Bit>.*</bundledJre64Bit>", "")
|
||||
.replaceAll("<bundledJreAsFallback>.*</bundledJreAsFallback>", "")
|
||||
.replaceAll("<jdkPreference>.*</jdkPreference>", "")
|
||||
.replaceAll("<runtimeBits>.*</runtimeBits>", "");
|
||||
|
||||
Config config = (Config) _xstream.fromXML(updatedConfigString);
|
||||
|
||||
if (Validator.isEmpty(config.getJre().getPath())) {
|
||||
config.getJre().setPath(Jre.DEFAULT_PATH);
|
||||
}
|
||||
|
||||
if (requires64Bit) {
|
||||
config.getJre().setRequires64Bit(true);
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
private void setConfigPath(File configFile) {
|
||||
_configPath = configFile.getAbsoluteFile().getParentFile();
|
||||
}
|
||||
|
||||
private class Props {
|
||||
final Properties _properties = new Properties();
|
||||
|
||||
public Props(File f) throws IOException {
|
||||
FileInputStream is = null;
|
||||
try {
|
||||
is = new FileInputStream(f);
|
||||
_properties.load(is);
|
||||
} finally {
|
||||
Util.close(is);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get property and remove trailing # comments.
|
||||
*/
|
||||
public String getProperty(String key) {
|
||||
String p = _properties.getProperty(key);
|
||||
|
||||
if (p == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
int x = p.indexOf('#');
|
||||
|
||||
if (x == -1) {
|
||||
return p;
|
||||
}
|
||||
|
||||
do {
|
||||
x--;
|
||||
} while (x > 0 && (p.charAt(x) == ' ' || p.charAt(x) == '\t'));
|
||||
|
||||
return (x == 0) ? "" : p.substring(0, x + 1);
|
||||
}
|
||||
|
||||
public File getFile(String key) {
|
||||
String value = getProperty(key);
|
||||
return value != null ? new File(value) : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
*/
|
||||
package net.sf.launch4j.config;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.sf.launch4j.binding.IValidatable;
|
||||
@@ -47,50 +46,14 @@ import net.sf.launch4j.binding.Validator;
|
||||
*/
|
||||
public class Jre implements IValidatable {
|
||||
|
||||
// 1.x config properties_____________________________________________________________
|
||||
public static final String PATH = "jrepath";
|
||||
public static final String MIN_VERSION = "javamin";
|
||||
public static final String MAX_VERSION = "javamax";
|
||||
public static final String ARGS = "jvmArgs";
|
||||
|
||||
// __________________________________________________________________________________
|
||||
public static final String VERSION_PATTERN = "(1\\.\\d\\.\\d(_\\d{1,3})?)|[1-9][0-9]{0,2}(\\.\\d{1,3}){0,2}";
|
||||
|
||||
public static final String JDK_PREFERENCE_JRE_ONLY = "jreOnly";
|
||||
public static final String JDK_PREFERENCE_PREFER_JRE = "preferJre";
|
||||
public static final String JDK_PREFERENCE_PREFER_JDK = "preferJdk";
|
||||
public static final String JDK_PREFERENCE_JDK_ONLY = "jdkOnly";
|
||||
|
||||
public static final String RUNTIME_BITS_64 = "64";
|
||||
public static final String RUNTIME_BITS_64_AND_32 = "64/32";
|
||||
public static final String RUNTIME_BITS_32_AND_64 = "32/64";
|
||||
public static final String RUNTIME_BITS_32 = "32";
|
||||
|
||||
private static final String[] JDK_PREFERENCE_NAMES = new String[] {
|
||||
JDK_PREFERENCE_JRE_ONLY,
|
||||
JDK_PREFERENCE_PREFER_JRE,
|
||||
JDK_PREFERENCE_PREFER_JDK,
|
||||
JDK_PREFERENCE_JDK_ONLY };
|
||||
|
||||
private static final String[] RUNTIME_BITS_OPTIONS = new String[] {
|
||||
RUNTIME_BITS_64,
|
||||
RUNTIME_BITS_64_AND_32,
|
||||
RUNTIME_BITS_32_AND_64,
|
||||
RUNTIME_BITS_32 };
|
||||
|
||||
public static final int DEFAULT_JDK_PREFERENCE_INDEX
|
||||
= Arrays.asList(JDK_PREFERENCE_NAMES).indexOf(JDK_PREFERENCE_PREFER_JRE);
|
||||
|
||||
public static final int DEFAULT_RUNTIME_BITS_INDEX
|
||||
= Arrays.asList(RUNTIME_BITS_OPTIONS).indexOf(RUNTIME_BITS_64_AND_32);
|
||||
public static final String DEFAULT_PATH = "%JAVA_HOME%;%PATH%";
|
||||
|
||||
private String path;
|
||||
private boolean bundledJre64Bit;
|
||||
private boolean bundledJreAsFallback;
|
||||
private boolean requiresJdk;
|
||||
private boolean requires64Bit;
|
||||
private String minVersion;
|
||||
private String maxVersion;
|
||||
private String jdkPreference;
|
||||
private String runtimeBits;
|
||||
private Integer initialHeapSize;
|
||||
private Integer initialHeapPercent;
|
||||
private Integer maxHeapSize;
|
||||
@@ -98,66 +61,43 @@ public class Jre implements IValidatable {
|
||||
private List<String> options;
|
||||
|
||||
public void checkInvariants() {
|
||||
Validator.checkOptString(minVersion, 20, VERSION_PATTERN,
|
||||
"jre.minVersion", Messages.getString("Jre.min.version"));
|
||||
Validator.checkOptString(maxVersion, 20, VERSION_PATTERN,
|
||||
"jre.maxVersion", Messages.getString("Jre.max.version"));
|
||||
if (Validator.isEmpty(path)) {
|
||||
Validator.checkFalse(bundledJre64Bit, "jre.bundledJre64Bit",
|
||||
Messages.getString("Jre.bundled.64bit.invalid"));
|
||||
Validator.checkFalse(bundledJreAsFallback, "jre.bundledJreAsFallback",
|
||||
Messages.getString("Jre.bundled.fallback.invalid"));
|
||||
Validator.checkFalse(Validator.isEmpty(minVersion),
|
||||
"jre.minVersion", Messages.getString("Jre.specify.jre.min.version.or.path"));
|
||||
} else {
|
||||
Validator.checkString(path, Validator.MAX_PATH,
|
||||
"jre.path", Messages.getString("Jre.bundled.path"));
|
||||
}
|
||||
Validator.checkOptString(minVersion, 20, VERSION_PATTERN, "jre.minVersion",
|
||||
Messages.getString("Jre.min.version"));
|
||||
Validator.checkOptString(maxVersion, 20, VERSION_PATTERN, "jre.maxVersion",
|
||||
Messages.getString("Jre.max.version"));
|
||||
Validator.checkString(path, Validator.MAX_PATH, "jre.path", Messages.getString("Jre.path"));
|
||||
if (!Validator.isEmpty(maxVersion)) {
|
||||
Validator.checkFalse(Validator.isEmpty(minVersion),
|
||||
"jre.minVersion", Messages.getString("Jre.specify.min.version"));
|
||||
Validator.checkFalse(Validator.isEmpty(minVersion), "jre.minVersion",
|
||||
Messages.getString("Jre.specify.min.version"));
|
||||
Validator.checkTrue(JreVersion.parseString(minVersion).compareTo(JreVersion.parseString(maxVersion)) < 0,
|
||||
"jre.maxVersion", Messages.getString("Jre.max.greater.than.min"));
|
||||
}
|
||||
Validator.checkTrue(initialHeapSize == null || maxHeapSize != null,
|
||||
"jre.maxHeapSize", Messages.getString("Jre.initial.and.max.heap"));
|
||||
Validator.checkTrue(initialHeapSize == null || initialHeapSize.intValue() > 0,
|
||||
"jre.initialHeapSize", Messages.getString("Jre.initial.heap"));
|
||||
Validator.checkTrue(maxHeapSize == null || (maxHeapSize.intValue()
|
||||
>= ((initialHeapSize != null) ? initialHeapSize.intValue() : 1)),
|
||||
Validator.checkTrue(initialHeapSize == null || maxHeapSize != null, "jre.maxHeapSize",
|
||||
Messages.getString("Jre.initial.and.max.heap"));
|
||||
Validator.checkTrue(initialHeapSize == null || initialHeapSize.intValue() > 0, "jre.initialHeapSize",
|
||||
Messages.getString("Jre.initial.heap"));
|
||||
Validator.checkTrue(
|
||||
maxHeapSize == null
|
||||
|| (maxHeapSize.intValue() >= ((initialHeapSize != null) ? initialHeapSize.intValue() : 1)),
|
||||
"jre.maxHeapSize", Messages.getString("Jre.max.heap"));
|
||||
Validator.checkTrue(initialHeapPercent == null || maxHeapPercent != null,
|
||||
"jre.maxHeapPercent", Messages.getString("Jre.initial.and.max.heap"));
|
||||
Validator.checkTrue(initialHeapPercent == null || maxHeapPercent != null, "jre.maxHeapPercent",
|
||||
Messages.getString("Jre.initial.and.max.heap"));
|
||||
if (initialHeapPercent != null) {
|
||||
Validator.checkRange(initialHeapPercent.intValue(), 1, 100,
|
||||
"jre.initialHeapPercent",
|
||||
Validator.checkRange(initialHeapPercent.intValue(), 1, 100, "jre.initialHeapPercent",
|
||||
Messages.getString("Jre.initial.heap.percent"));
|
||||
}
|
||||
if (maxHeapPercent != null) {
|
||||
Validator.checkRange(maxHeapPercent.intValue(),
|
||||
initialHeapPercent != null ? initialHeapPercent.intValue() : 1, 100,
|
||||
"jre.maxHeapPercent",
|
||||
initialHeapPercent != null ? initialHeapPercent.intValue() : 1, 100, "jre.maxHeapPercent",
|
||||
Messages.getString("Jre.max.heap.percent"));
|
||||
}
|
||||
Validator.checkIn(getJdkPreference(), JDK_PREFERENCE_NAMES,
|
||||
"jre.jdkPreference", Messages.getString("Jre.jdkPreference"));
|
||||
Validator.checkIn(getRuntimeBits(), RUNTIME_BITS_OPTIONS,
|
||||
"jre.runtimeBits", Messages.getString("Jre.runtimeBits"));
|
||||
Validator.checkOptStrings(options,
|
||||
Validator.MAX_ARGS,
|
||||
Validator.MAX_ARGS,
|
||||
"[^\"]*|([^\"]*\"[^\"]*\"[^\"]*)*",
|
||||
"jre.options",
|
||||
Messages.getString("Jre.jvm.options"),
|
||||
Validator.checkOptStrings(options, Validator.MAX_ARGS, Validator.MAX_ARGS, "[^\"]*|([^\"]*\"[^\"]*\"[^\"]*)*",
|
||||
"jre.options", Messages.getString("Jre.jvm.options"),
|
||||
Messages.getString("Jre.jvm.options.unclosed.quotation"));
|
||||
|
||||
// Quoted variable references: "[^%]*|([^%]*\"([^%]*%[^%]+%[^%]*)+\"[^%]*)*"
|
||||
Validator.checkOptStrings(options,
|
||||
Validator.MAX_ARGS,
|
||||
Validator.MAX_ARGS,
|
||||
"[^%]*|([^%]*([^%]*%[^%]*%[^%]*)+[^%]*)*",
|
||||
"jre.options",
|
||||
Messages.getString("Jre.jvm.options"),
|
||||
Validator.checkOptStrings(options, Validator.MAX_ARGS, Validator.MAX_ARGS,
|
||||
"[^%]*|([^%]*([^%]*%[^%]*%[^%]*)+[^%]*)*", "jre.options", Messages.getString("Jre.jvm.options"),
|
||||
Messages.getString("Jre.jvm.options.variable"));
|
||||
}
|
||||
|
||||
@@ -188,67 +128,29 @@ public class Jre implements IValidatable {
|
||||
this.minVersion = minVersion;
|
||||
}
|
||||
|
||||
/** Preference for standalone JRE or JDK-private JRE */
|
||||
public String getJdkPreference() {
|
||||
return Validator.isEmpty(jdkPreference) ? JDK_PREFERENCE_PREFER_JRE
|
||||
: jdkPreference;
|
||||
public boolean getRequiresJdk() {
|
||||
return this.requiresJdk;
|
||||
}
|
||||
|
||||
public void setJdkPreference(String jdkPreference) {
|
||||
this.jdkPreference = jdkPreference;
|
||||
}
|
||||
|
||||
/** Preference for standalone JRE or JDK-private JRE */
|
||||
public int getJdkPreferenceIndex() {
|
||||
int x = Arrays.asList(JDK_PREFERENCE_NAMES).indexOf(getJdkPreference());
|
||||
return x != -1 ? x : DEFAULT_JDK_PREFERENCE_INDEX;
|
||||
}
|
||||
|
||||
public void setJdkPreferenceIndex(int x) {
|
||||
this.jdkPreference = JDK_PREFERENCE_NAMES[x];
|
||||
}
|
||||
|
||||
public String getRuntimeBits() {
|
||||
return Validator.isEmpty(runtimeBits) ? RUNTIME_BITS_64_AND_32
|
||||
: runtimeBits;
|
||||
}
|
||||
|
||||
public void setRuntimeBits(String runtimeBits) {
|
||||
this.runtimeBits = runtimeBits;
|
||||
}
|
||||
|
||||
public int getRuntimeBitsIndex() {
|
||||
int x = Arrays.asList(RUNTIME_BITS_OPTIONS).indexOf(getRuntimeBits());
|
||||
return x != -1 ? x : DEFAULT_RUNTIME_BITS_INDEX;
|
||||
}
|
||||
|
||||
public void setRuntimeBitsIndex(int x) {
|
||||
this.runtimeBits = RUNTIME_BITS_OPTIONS[x];
|
||||
public void setRequiresJdk(boolean requiresJdk) {
|
||||
this.requiresJdk = requiresJdk;
|
||||
}
|
||||
|
||||
/** JRE path */
|
||||
public String getPath() {
|
||||
return path;
|
||||
return this.path;
|
||||
}
|
||||
|
||||
public void setPath(String path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public boolean getBundledJre64Bit() {
|
||||
return bundledJre64Bit;
|
||||
public boolean getRequires64Bit() {
|
||||
return requires64Bit;
|
||||
}
|
||||
|
||||
public void setBundledJre64Bit(boolean bundledJre64Bit) {
|
||||
this.bundledJre64Bit = bundledJre64Bit;
|
||||
}
|
||||
|
||||
public boolean getBundledJreAsFallback() {
|
||||
return bundledJreAsFallback;
|
||||
}
|
||||
|
||||
public void setBundledJreAsFallback(boolean bundledJreAsFallback) {
|
||||
this.bundledJreAsFallback = bundledJreAsFallback;
|
||||
public void setRequires64Bit(boolean requires64Bit) {
|
||||
this.requires64Bit= requires64Bit;
|
||||
}
|
||||
|
||||
/** Initial heap size in MB */
|
||||
|
||||
@@ -52,13 +52,13 @@ public class LdDefaults {
|
||||
"head/head.o" });
|
||||
|
||||
private static final List<String> JNI_GUI_32_OBJECTS = Arrays.asList(new String[] {
|
||||
"w32api_jni/crt2.o",
|
||||
"w32api/crt2.o",
|
||||
"head_jni_BETA/jniguihead.o",
|
||||
"head_jni_BETA/head.o",
|
||||
"head_jni_BETA/jnihead.o" });
|
||||
|
||||
private static final List<String> JNI_CONSOLE_32_OBJECTS = Arrays.asList(new String[] {
|
||||
"w32api_jni/crt2.o",
|
||||
"w32api/crt2.o",
|
||||
"head_jni_BETA/jniconsolehead.o",
|
||||
"head_jni_BETA/head.o",
|
||||
"head_jni_BETA/jnihead.o" });
|
||||
@@ -67,24 +67,15 @@ public class LdDefaults {
|
||||
|
||||
private static final List<String> LIBS = Arrays.asList(new String[] {
|
||||
"w32api/libmingw32.a",
|
||||
"w32api/libmingwex.a",
|
||||
"w32api/libgcc.a",
|
||||
"w32api/libmsvcrt.a",
|
||||
"w32api/libmoldname.a",
|
||||
"w32api/libkernel32.a",
|
||||
"w32api/libuser32.a",
|
||||
"w32api/libadvapi32.a",
|
||||
"w32api/libshell32.a" });
|
||||
|
||||
private static final List<String> JNI_LIBS = Arrays.asList(new String[] {
|
||||
"w32api_jni/libmingw32.a",
|
||||
"w32api_jni/libmingwex.a",
|
||||
"w32api_jni/libgcc.a",
|
||||
"w32api_jni/libmsvcrt.a",
|
||||
"w32api_jni/libmoldname.a",
|
||||
"w32api_jni/libkernel32.a",
|
||||
"w32api_jni/libuser32.a",
|
||||
"w32api_jni/libadvapi32.a",
|
||||
"w32api_jni/libshell32.a" });
|
||||
|
||||
static {
|
||||
HEADER_OBJECTS = new ArrayList<List<String>>();
|
||||
HEADER_OBJECTS.add(GUI_OBJECTS);
|
||||
@@ -109,7 +100,7 @@ public class LdDefaults {
|
||||
|
||||
if (Config.JNI_GUI_HEADER_32.equals(headerType)
|
||||
|| Config.JNI_CONSOLE_HEADER_32.equals(headerType)) {
|
||||
return JNI_LIBS;
|
||||
return LIBS;
|
||||
}
|
||||
|
||||
throw new IllegalArgumentException("Unknown headerType: " + headerType);
|
||||
|
||||
@@ -44,7 +44,7 @@ import net.sf.launch4j.binding.Validator;
|
||||
*/
|
||||
public class Msg implements IValidatable {
|
||||
private String startupErr;
|
||||
private String bundledJreErr;
|
||||
private String jreNotFoundErr;
|
||||
private String jreVersionErr;
|
||||
private String launcherErr;
|
||||
private String instanceAlreadyExistsMsg;
|
||||
@@ -52,8 +52,8 @@ public class Msg implements IValidatable {
|
||||
public void checkInvariants() {
|
||||
Validator.checkOptString(startupErr, 1024, "startupErr",
|
||||
Messages.getString("Msg.startupErr"));
|
||||
Validator.checkOptString(bundledJreErr, 1024, "bundledJreErr",
|
||||
Messages.getString("Msg.bundledJreErr"));
|
||||
Validator.checkOptString(jreNotFoundErr, 1024, "jreNotFoundErr",
|
||||
Messages.getString("Msg.jreNotFoundErr"));
|
||||
Validator.checkOptString(jreVersionErr, 1024, "jreVersionErr",
|
||||
Messages.getString("Msg.jreVersionErr"));
|
||||
Validator.checkOptString(launcherErr, 1024, "launcherErr",
|
||||
@@ -71,14 +71,13 @@ public class Msg implements IValidatable {
|
||||
this.startupErr = startupErr;
|
||||
}
|
||||
|
||||
public String getBundledJreErr() {
|
||||
return !Validator.isEmpty(bundledJreErr) ? bundledJreErr
|
||||
: "This application was configured to use a bundled Java Runtime" +
|
||||
" Environment but the runtime is missing or corrupted.";
|
||||
public String getJreNotFoundErr() {
|
||||
return !Validator.isEmpty(jreNotFoundErr) ? jreNotFoundErr
|
||||
: "This application requires a Java Runtime Environment.";
|
||||
}
|
||||
|
||||
public void setBundledJreErr(String bundledJreErr) {
|
||||
this.bundledJreErr = bundledJreErr;
|
||||
public void setJreNotFoundErr(String jreNotFoundErr) {
|
||||
this.jreNotFoundErr = jreNotFoundErr;
|
||||
}
|
||||
|
||||
public String getJreVersionErr() {
|
||||
|
||||
@@ -71,10 +71,7 @@ VersionInfo.original.filename.exe=Original filename should end with the .exe ext
|
||||
|
||||
Jre.min.version=Minimum JRE version should be 1.x.x[_xxx] or the Java 9 new version scheme xxx[.xxx[.xxx]], e.g., 1.5, 1.8.0_121, 10.0.1
|
||||
Jre.max.version=Maximum JRE version should be 1.x.x[_xxx] or the Java 9 new version scheme xxx[.xxx[.xxx]], e.g., 1.5, 1.8.0_121, 10.0.1
|
||||
Jre.specify.jre.min.version.or.path=Specify minimum JRE version and/or bundled JRE path.
|
||||
Jre.bundled.path=Bundled JRE path
|
||||
Jre.bundled.64bit.invalid=The bundled JRE 64-bit option can only be used if the JRE path is specified.
|
||||
Jre.bundled.fallback.invalid=The bundled JRE as fallback option can only be used if the JRE path is specified.
|
||||
Jre.path=JRE path
|
||||
Jre.specify.min.version=Specify minimum JRE version.
|
||||
Jre.max.greater.than.min=Maximum JRE version must be greater than the minimum.\nTo use a certain JRE version, you may set the min/max range to [1.4.2 - 1.4.2_10] for example.
|
||||
Jre.initial.and.max.heap=If you change the initial heap size please also specify the maximum size.
|
||||
@@ -82,14 +79,13 @@ Jre.initial.heap=Initial heap size must be greater than 0, leave the field blank
|
||||
Jre.max.heap=Maximum heap size cannot be less than the initial size, leave the field blank to use the JVM default.
|
||||
Jre.initial.heap.percent=Initial heap %
|
||||
Jre.max.heap.percent=Maximum heap %
|
||||
Jre.jdkPreference=JDK preference
|
||||
Jre.runtimeBits=Runtime bits
|
||||
Jre.requiresJdk=Requires JDK
|
||||
Jre.jvm.options=JVM arguments
|
||||
Jre.jvm.options.unclosed.quotation=JVM arguments contain an unclosed quotation.
|
||||
Jre.jvm.options.variable=Invalid environment variable reference.
|
||||
|
||||
Msg.startupErr=Startup error message
|
||||
Msg.bundledJreErr=Bundled JRE error message
|
||||
Msg.jreNotFoundErr=JRE not found error message
|
||||
Msg.jreVersionErr=JRE version error message
|
||||
Msg.launcherErr=Launcher error message
|
||||
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
#
|
||||
# Launch4j (http://launch4j.sourceforge.net/)
|
||||
# Cross-platform Java application wrapper for creating Windows native executables.
|
||||
#
|
||||
# Copyright (c) 2004, 2007 Grzegorz Kowal, Patricio Martínez Ros
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification,
|
||||
# are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. 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.
|
||||
#
|
||||
# 3. Neither the name of the copyright holder 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.
|
||||
#
|
||||
|
||||
Splash.splash.file = Fichero de la pantalla de bienvenida
|
||||
Splash.splash.timeout = Tiempo de espera de la pantalla de bienvenida
|
||||
|
||||
Config.specify.output.exe = Especifique el fichero de salida con extensi\u00F3n .exe.
|
||||
Config.application.jar = Aplicaci\u00F3n jar
|
||||
Config.application.jar.path = Especifique la ruta del jar relativa al ejecutable.
|
||||
Config.chdir.relative = 'Cambiar al directorio' debe ser una ruta relativa al ejecutable.
|
||||
Config.chdir.path = 'Cambiar al directorio' ahora es una ruta en lugar de un booleano, por favor consulte la documentaci\u00F3n.
|
||||
Config.icon = Icono
|
||||
Config.jar.arguments = Argumentos del jar
|
||||
Config.error.title = T\u00EDtulo de error
|
||||
Config.header.type = Tipo de cabecera
|
||||
Config.splash.not.impl.by.console.hdr = La pantalla de bienvenida no est\u00E1 implementada para la cabecera de tipo consola.
|
||||
|
||||
VersionInfo.file.version = La versi\u00F3n del fichero, deber\u00EDa ser 'x.x.x.x'
|
||||
VersionInfo.txt.file.version = Forma libre de versi\u00F3n del fichero
|
||||
VersionInfo.file.description = Descripci\u00F3n del fichero
|
||||
VersionInfo.copyright = Copyright
|
||||
VersionInfo.product.version = Versi\u00F3n del producto, deber\u00EDa ser 'x.x.x.x'
|
||||
VersionInfo.txt.product.version = Forma libre de versi\u00F3n del producto
|
||||
VersionInfo.product.name = Nombre del producto
|
||||
VersionInfo.company.name = Nombre de la organizaci\u00F3n
|
||||
VersionInfo.internal.name = Nombre interno
|
||||
VersionInfo.internal.name.not.exe = El nombre interno no deber\u00EDa tener extensi\u00F3n .exe.
|
||||
VersionInfo.original.filename = Nombre original del fichero
|
||||
VersionInfo.original.filename.exe = El nombre original del fichero debe acabar con extensi\u00F3n .exe.
|
||||
Jre.min.version = La versi\u00F3n m\u00EDnima del JRE deber\u00EDa ser x.x.x[_xx]
|
||||
Jre.max.version = La versi\u00F3n m\u00E1xima del JRE deber\u00EDa ser x.x.x[_xx]
|
||||
Jre.specify.jre.min.version.or.path=Specify minimum JRE version and/or bundled JRE path.
|
||||
Jre.bundled.path.rel = La ruta del JRE debe ser relativa al ejecutable.
|
||||
Jre.specify.min.version = Especifique la versi\u00F3n m\u00EDnima del JRE.
|
||||
Jre.max.greater.than.min = La versi\u00F3n m\u00E1xima del JRE debe ser mayor que la m\u00EDnima.\nPara usar cierta versi\u00F3n del JRE, puede esyablecer el rango m\u00EDnimo/m\u00E1ximo a [1.4.2 - 1.4.2_10], por ejemplo.
|
||||
Jre.jvm.options = Argumentos de la JVM
|
||||
|
||||
Msg.startupErr=Startup error message
|
||||
Msg.bundledJreErr=Bundled JRE error message
|
||||
Msg.jreVersionErr=JRE version error message
|
||||
Msg.launcherErr=Launcher error message
|
||||
|
||||
SingleInstance.mutexName=Mutex name
|
||||
SingleInstance.windowTitle=Window title
|
||||
|
||||
@@ -15,6 +15,7 @@ import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JRadioButton;
|
||||
import javax.swing.JTextField;
|
||||
import javax.swing.UIManager;
|
||||
|
||||
public abstract class BasicForm extends JPanel
|
||||
{
|
||||
@@ -131,7 +132,7 @@ public abstract class BasicForm extends JPanel
|
||||
CellConstraints cc = new CellConstraints();
|
||||
jpanel1.setLayout(formlayout1);
|
||||
|
||||
_outfileButton.setIcon(loadImage("images/open16.png"));
|
||||
_outfileButton.setIcon(UIManager.getIcon("Tree.closedIcon"));
|
||||
_outfileButton.setName("outfileButton");
|
||||
jpanel1.add(_outfileButton,cc.xy(12,2));
|
||||
|
||||
@@ -149,11 +150,11 @@ public abstract class BasicForm extends JPanel
|
||||
_jarLabel.setText(Messages.getString("jar"));
|
||||
jpanel1.add(_jarLabel,cc.xy(2,4));
|
||||
|
||||
_jarButton.setIcon(loadImage("images/open16.png"));
|
||||
_jarButton.setIcon(UIManager.getIcon("Tree.closedIcon"));
|
||||
_jarButton.setName("jarButton");
|
||||
jpanel1.add(_jarButton,cc.xy(12,4));
|
||||
|
||||
_iconButton.setIcon(loadImage("images/open16.png"));
|
||||
_iconButton.setIcon(UIManager.getIcon("Tree.closedIcon"));
|
||||
_iconButton.setName("iconButton");
|
||||
jpanel1.add(_iconButton,cc.xy(12,10));
|
||||
|
||||
@@ -251,7 +252,7 @@ public abstract class BasicForm extends JPanel
|
||||
_manifestField.setToolTipText(Messages.getString("manifestTip"));
|
||||
jpanel1.add(_manifestField,cc.xywh(4,8,7,1));
|
||||
|
||||
_manifestButton.setIcon(loadImage("images/open16.png"));
|
||||
_manifestButton.setIcon(UIManager.getIcon("Tree.closedIcon"));
|
||||
_manifestButton.setName("manifestButton");
|
||||
jpanel1.add(_manifestButton,cc.xy(12,8));
|
||||
|
||||
|
||||
@@ -14,13 +14,14 @@ import javax.swing.JList;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.JTextField;
|
||||
import javax.swing.UIManager;
|
||||
|
||||
public abstract class ClassPathForm extends JPanel
|
||||
{
|
||||
protected final JTextField _classpathField = new JTextField();
|
||||
protected final JLabel _classpathFieldLabel = new JLabel();
|
||||
protected final JLabel _classpathListLabel = new JLabel();
|
||||
protected final JList _classpathList = new JList();
|
||||
protected final JList<String> _classpathList = new JList<String>();
|
||||
protected final JLabel _mainclassLabel = new JLabel();
|
||||
protected final JTextField _mainclassField = new JTextField();
|
||||
protected final JButton _acceptClasspathButton = new JButton();
|
||||
@@ -152,7 +153,7 @@ public abstract class ClassPathForm extends JPanel
|
||||
_removeClasspathButton.setText(Messages.getString("remove"));
|
||||
jpanel1.add(_removeClasspathButton,cc.xy(10,13));
|
||||
|
||||
_importClasspathButton.setIcon(loadImage("images/open16.png"));
|
||||
_importClasspathButton.setIcon(UIManager.getIcon("Tree.closedIcon"));
|
||||
_importClasspathButton.setName("importClasspathButton");
|
||||
_importClasspathButton.setToolTipText(Messages.getString("importClassPath"));
|
||||
jpanel1.add(_importClasspathButton,cc.xy(12,4));
|
||||
|
||||
@@ -32,17 +32,15 @@ public abstract class JreForm extends JPanel
|
||||
protected final JTextField _maxHeapSizeField = new JTextField();
|
||||
protected final JTextField _maxHeapPercentField = new JTextField();
|
||||
protected final JTextField _initialHeapPercentField = new JTextField();
|
||||
protected final JComboBox _jdkPreferenceCombo = new JComboBox();
|
||||
protected final JComboBox _runtimeBitsCombo = new JComboBox();
|
||||
protected final JComboBox _varCombo = new JComboBox();
|
||||
protected final JComboBox<String> _varCombo = new JComboBox<String>();
|
||||
protected final JButton _propertyButton = new JButton();
|
||||
protected final JButton _optionButton = new JButton();
|
||||
protected final JButton _envPropertyButton = new JButton();
|
||||
protected final JButton _envOptionButton = new JButton();
|
||||
protected final JTextField _envVarField = new JTextField();
|
||||
protected final JTextField _jrePathField = new JTextField();
|
||||
protected final JCheckBox _bundledJre64BitCheck = new JCheckBox();
|
||||
protected final JCheckBox _bundledJreAsFallbackCheck = new JCheckBox();
|
||||
protected final JCheckBox _requires64BitCheck = new JCheckBox();
|
||||
protected final JCheckBox _requiresJdkCheck = new JCheckBox();
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
@@ -184,9 +182,6 @@ public abstract class JreForm extends JPanel
|
||||
_initialHeapPercentField.setName("initialHeapPercentField");
|
||||
jpanel1.add(_initialHeapPercentField,cc.xy(8,12));
|
||||
|
||||
_jdkPreferenceCombo.setName("jdkPreferenceCombo");
|
||||
jpanel1.add(_jdkPreferenceCombo,cc.xywh(8,6,3,1));
|
||||
|
||||
JLabel jlabel3 = new JLabel();
|
||||
jlabel3.setText(Messages.getString("availableMemory"));
|
||||
jpanel1.add(jlabel3,cc.xy(10,12));
|
||||
@@ -195,10 +190,6 @@ public abstract class JreForm extends JPanel
|
||||
jlabel4.setText(Messages.getString("availableMemory"));
|
||||
jpanel1.add(jlabel4,cc.xy(10,14));
|
||||
|
||||
_runtimeBitsCombo.setName("runtimeBitsCombo");
|
||||
_runtimeBitsCombo.setToolTipText("");
|
||||
jpanel1.add(_runtimeBitsCombo,cc.xywh(8,8,3,1));
|
||||
|
||||
jpanel1.add(createPanel1(),cc.xywh(2,18,9,1));
|
||||
TitledSeparator titledseparator1 = new TitledSeparator();
|
||||
titledseparator1.setText(Messages.getString("searchOptions"));
|
||||
@@ -209,6 +200,17 @@ public abstract class JreForm extends JPanel
|
||||
jpanel1.add(titledseparator2,cc.xywh(2,10,9,1));
|
||||
|
||||
jpanel1.add(createPanel2(),cc.xywh(4,2,7,1));
|
||||
_requires64BitCheck.setActionCommand(Messages.getString("requires64Bit"));
|
||||
_requires64BitCheck.setName("requires64BitCheck");
|
||||
_requires64BitCheck.setText(Messages.getString("requires64Bit"));
|
||||
_requires64BitCheck.setToolTipText(Messages.getString("requires64BitTip"));
|
||||
jpanel1.add(_requires64BitCheck,cc.xywh(8,8,3,1));
|
||||
|
||||
_requiresJdkCheck.setActionCommand(Messages.getString("requiresJdk"));
|
||||
_requiresJdkCheck.setName("requiresJdkCheck");
|
||||
_requiresJdkCheck.setText(Messages.getString("requiresJdk"));
|
||||
jpanel1.add(_requiresJdkCheck,cc.xywh(8,6,3,1));
|
||||
|
||||
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8,9,10,11 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 });
|
||||
return jpanel1;
|
||||
}
|
||||
@@ -276,21 +278,9 @@ public abstract class JreForm extends JPanel
|
||||
|
||||
_jrePathField.setName("jrePathField");
|
||||
_jrePathField.setToolTipText(Messages.getString("jrePathTip"));
|
||||
jpanel1.add(_jrePathField,cc.xy(1,1));
|
||||
jpanel1.add(_jrePathField,cc.xywh(1,1,5,1));
|
||||
|
||||
_bundledJre64BitCheck.setActionCommand(Messages.getString("bundledJre64Bit"));
|
||||
_bundledJre64BitCheck.setName("bundledJre64BitCheck");
|
||||
_bundledJre64BitCheck.setText(Messages.getString("bundledJre64Bit"));
|
||||
_bundledJre64BitCheck.setToolTipText(Messages.getString("bundledJre64BitTip"));
|
||||
jpanel1.add(_bundledJre64BitCheck,cc.xy(3,1));
|
||||
|
||||
_bundledJreAsFallbackCheck.setActionCommand(Messages.getString("bundledJreAsFallback"));
|
||||
_bundledJreAsFallbackCheck.setName("bundledJreAsFallbackCheck");
|
||||
_bundledJreAsFallbackCheck.setText(Messages.getString("bundledJreAsFallback"));
|
||||
_bundledJreAsFallbackCheck.setToolTipText(Messages.getString("bundledJreAsFallbackTip"));
|
||||
jpanel1.add(_bundledJreAsFallbackCheck,cc.xy(5,1));
|
||||
|
||||
addFillComponents(jpanel1,new int[]{ 2,4 },new int[0]);
|
||||
addFillComponents(jpanel1,new int[]{ 2,3,4,5 },new int[0]);
|
||||
return jpanel1;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
@@ -16,7 +16,7 @@ import javax.swing.JTextArea;
|
||||
public abstract class MessagesForm extends JPanel
|
||||
{
|
||||
protected final JTextArea _startupErrTextArea = new JTextArea();
|
||||
protected final JTextArea _bundledJreErrTextArea = new JTextArea();
|
||||
protected final JTextArea _jreNotFoundErrTextArea = new JTextArea();
|
||||
protected final JTextArea _jreVersionErrTextArea = new JTextArea();
|
||||
protected final JTextArea _launcherErrTextArea = new JTextArea();
|
||||
protected final JCheckBox _messagesCheck = new JCheckBox();
|
||||
@@ -111,9 +111,9 @@ public abstract class MessagesForm extends JPanel
|
||||
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
||||
jpanel1.add(jscrollpane1,cc.xy(4,4));
|
||||
|
||||
_bundledJreErrTextArea.setName("bundledJreErrTextArea");
|
||||
_jreNotFoundErrTextArea.setName("jreNotFoundErrTextArea");
|
||||
JScrollPane jscrollpane2 = new JScrollPane();
|
||||
jscrollpane2.setViewportView(_bundledJreErrTextArea);
|
||||
jscrollpane2.setViewportView(_jreNotFoundErrTextArea);
|
||||
jscrollpane2.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
||||
jscrollpane2.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
||||
jpanel1.add(jscrollpane2,cc.xy(4,6));
|
||||
@@ -138,7 +138,7 @@ public abstract class MessagesForm extends JPanel
|
||||
jpanel1.add(jlabel1,new CellConstraints(2,4,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
|
||||
|
||||
JLabel jlabel2 = new JLabel();
|
||||
jlabel2.setText(Messages.getString("bundledJreErr"));
|
||||
jlabel2.setText(Messages.getString("jreNotFoundErr"));
|
||||
jpanel1.add(jlabel2,new CellConstraints(2,6,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
|
||||
|
||||
JLabel jlabel3 = new JLabel();
|
||||
|
||||
Binary file not shown.
@@ -12,6 +12,7 @@ import javax.swing.JCheckBox;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTextField;
|
||||
import javax.swing.UIManager;
|
||||
|
||||
public abstract class SplashForm extends JPanel
|
||||
{
|
||||
@@ -135,7 +136,7 @@ public abstract class SplashForm extends JPanel
|
||||
_timeoutField.setToolTipText(Messages.getString("timeoutTip"));
|
||||
jpanel1.add(_timeoutField,cc.xy(4,8));
|
||||
|
||||
_splashFileButton.setIcon(loadImage("images/open16.png"));
|
||||
_splashFileButton.setIcon(UIManager.getIcon("Tree.closedIcon"));
|
||||
_splashFileButton.setName("splashFileButton");
|
||||
jpanel1.add(_splashFileButton,cc.xy(7,4));
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@ package net.sf.launch4j.form;
|
||||
import com.jeta.forms.components.separator.TitledSeparator;
|
||||
import com.jgoodies.forms.layout.CellConstraints;
|
||||
import com.jgoodies.forms.layout.FormLayout;
|
||||
|
||||
import net.sf.launch4j.config.LanguageID;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Container;
|
||||
import java.awt.Dimension;
|
||||
@@ -14,6 +17,7 @@ import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JTextField;
|
||||
|
||||
|
||||
public abstract class VersionInfoForm extends JPanel
|
||||
{
|
||||
protected final JCheckBox _versionInfoCheck = new JCheckBox();
|
||||
@@ -39,7 +43,7 @@ public abstract class VersionInfoForm extends JPanel
|
||||
protected final JLabel _companyNameLabel = new JLabel();
|
||||
protected final JTextField _companyNameField = new JTextField();
|
||||
protected final JLabel _languageLabel = new JLabel();
|
||||
protected final JComboBox _languageCombo = new JComboBox();
|
||||
protected final JComboBox<LanguageID> _languageCombo = new JComboBox<LanguageID>();
|
||||
protected final JLabel _trademarksLabel = new JLabel();
|
||||
protected final JTextField _trademarksField = new JTextField();
|
||||
|
||||
|
||||
@@ -88,17 +88,15 @@ mutexNameTip=Mutex name that will uniquely identify your application.
|
||||
windowTitle=Window title
|
||||
windowTitleTip=Title of the GUI application window to bring up on attempt to start a next instance.
|
||||
|
||||
jrePath=Bundled JRE path:
|
||||
jrePathTip=Bundled JRE path relative to the executable or absolute.
|
||||
bundledJre64Bit=64-bit
|
||||
bundledJre64BitTip=The bundled JRE is 64-bit, heap size will not be limited to the 32-bit maximum.
|
||||
bundledJreAsFallback=Fallback option
|
||||
bundledJreAsFallbackTip=When the fallback option is checked, the bundled JRE will be used only if the min/max search fails. By default the bundled JRE, if specified, is used as first.
|
||||
jrePath=JRE paths:
|
||||
jrePathTip=JRE path(s) relative to the executable or absolute, for example 'myAppJre' or 'c:\\GlobalJre;%JAVA_HOME%'.
|
||||
requiresJdk=JDK required
|
||||
requires64Bit=64-Bit required
|
||||
requires64BitTip=64-bit runtime is required so that the heap size will not be limited to the 32-bit maximum.
|
||||
searchOptions=Search options
|
||||
options=Options
|
||||
jreMin=Min JRE version:
|
||||
jreMax=Max JRE version:
|
||||
dontUsePrivateJres=Don't use private JREs
|
||||
jvmOptions=JVM options:
|
||||
jvmOptionsTip=Accepts everything you would normally pass to java/javaw launcher: assertion options, system properties and X options.
|
||||
initialHeapSize=Initial heap size:
|
||||
@@ -153,7 +151,7 @@ charset=Charset:
|
||||
|
||||
addMessages=Add custom messages
|
||||
startupErr=Startup error:
|
||||
bundledJreErr=Bundled JRE error:
|
||||
jreNotFoundErr=JRE error:
|
||||
jreVersionErr=JRE version error:
|
||||
jreVersionErrTip=Launch4j will append the required version number at the end of this message.
|
||||
launcherErr=Launcher error:
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
#
|
||||
# Launch4j (http://launch4j.sourceforge.net/)
|
||||
# Cross-platform Java application wrapper for creating Windows native executables.
|
||||
#
|
||||
# Copyright (c) 2004, 2007 Grzegorz Kowal, Patricio Martínez Ros
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification,
|
||||
# are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. 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.
|
||||
#
|
||||
# 3. Neither the name of the copyright holder 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.
|
||||
#
|
||||
|
||||
log = Registro
|
||||
|
||||
outfile = Fichero de salida
|
||||
outfileTip = Fichero ejecutable de salida.
|
||||
errorTitle = T\u00EDtulo de error
|
||||
errorTitleTip = Launch4j indica los errores usando una ventana de mensaje, usted puede ponerle el nombre de la aplicaci\u00F3n a esta ventana.
|
||||
stayAlive = Mantener abierto despu\u00E9s de lanzar una aplicaci\u00F3n GUI
|
||||
icon = Icono
|
||||
iconTip = Icono de la aplicaci\u00F3n.
|
||||
jar = Jar
|
||||
jarTip = Jar de la aplicaci\u00F3n.
|
||||
dontWrapJar = No empaquetar el jar, s\u00F3lo lanzar
|
||||
cmdLine = Argumentos del jar
|
||||
cmdLine = Argumentos de l\u00EDnea de \u00F3rdenes pasados a la aplicaci\u00F3n.
|
||||
options = Opciones
|
||||
chdir = Cambiar al directorio
|
||||
chdirTip = Cambia el directorio actual a la localizaci\u00F3n relativa al ejecutable. Si el campo se deja vac\u00EDo, no tiene efecto, . - cambia el directorio a la localizaci\u00F3n del exe.
|
||||
headerType = Tipo de cabecera
|
||||
gui = GUI
|
||||
console = Consola
|
||||
objectFiles = Ficheros objeto
|
||||
libs = w32api
|
||||
linkerOptions = Cabecera personalizada - opciones del enlazador
|
||||
jrePath = Ruta del JRE
|
||||
jrePathTip = Ruta relativa al ejecutable del JRE.
|
||||
jreMin = Versi\u00F3n m\u00EDnima del JRE
|
||||
jreMax = Versi\u00F3n m\u00E1xima del JRE
|
||||
jvmOptions = Argumentos de la JVM
|
||||
jvmOptionsTip = Acepta cualquier argumento que normalmente se le pasar\u00EDa al lanzador java/javaw\: opciones assertion, propiedades de sistema y opciones X.
|
||||
initialHeapSize = Tama\u00F1o inicial de la pila
|
||||
maxHeapSize = Tama\u00F1o m\u00E1ximo de la pila
|
||||
freeMemory=% of free memory
|
||||
addVariables = A\u00F1adir variables
|
||||
addVariablesTip = A\u00F1adir una variable especial o mapear variables de entorno a las propiedades del sistema.
|
||||
exeDirVarTip = Ruta del directorio del ejecutable.
|
||||
exeFileVarTip = Ruta del fichero ejecutable (directorio y nombre del fichero).
|
||||
other = Otra
|
||||
otherTip = Mapear una variable de entorno a una propiedad del sistema.
|
||||
otherVarTip = Variable de entorno que mapear.
|
||||
add = A\u00F1adir
|
||||
specifyVar = Especificar variable de entorno que a\u00F1adir.
|
||||
enableSplash = Activar pantalla de bienvenida
|
||||
splashFile = Imagen
|
||||
splashFileTip = Imagen en formato BMP para la pantalla de bienvenida.
|
||||
waitForWindow = Esperar la ventana
|
||||
waitForWindowText = Cerrar la pantalla de bienvenida cuando aparezca una ventana de la aplicaci\u00F3n
|
||||
timeout = Tiempo de espera [s]
|
||||
timeoutTip = Numero de segundos despu\u00E9s de los que la pantalla de bienvenida se debe cerrar. Esta propiedad puede causar provocar un error dependiendo de la propiedad splashTimeoutErr.
|
||||
timeoutErr = Se\u00F1al de error asociada al tiempo de espera
|
||||
timeoutErrTip = Marcado (true) se\u00F1ala un error despu\u00E9s del tiempo de espera de la pantalla de bienvenida, no marcado (false) cierra la pantalla de bienvenida silenciosamente
|
||||
addVersionInfo = A\u00F1ade informaci\u00F3n sobre la versi\u00F3n
|
||||
fileVersion = Versi\u00F3n del fichero
|
||||
fileVersionTip = N\u00FAmero de versi\u00F3n 'x.x.x.x'
|
||||
additionalInfo = Informaci\u00F3n adicional
|
||||
productVersion = Versi\u00F3n del producto
|
||||
productVersionTip = N\u00FAmero de versi\u00F3n 'x.x.x.x'
|
||||
fileDescription = Descripci\u00F3n del fichero
|
||||
fileDescriptionTip = Descripci\u00F3n del fichero que se le muestra al usuario.
|
||||
copyright = Copyright
|
||||
txtFileVersion = Forma libre
|
||||
txtFileVersionTip = Forma libre de versi\u00F3n, por ejemplo '1.20.RC1'.
|
||||
txtProductVersion = Forma libre
|
||||
txtProductVersionTip = Forma libre del producto, por ejemplo '1.20.RC1'.
|
||||
productName = Nombre del producto
|
||||
originalFilename = Nombre original del fichero
|
||||
originalFilenameTip = Nombre original del fichero sin la ruta. Permite determinar si un fichero ha sido renombrado por un usuario.
|
||||
internalName = Nombre interno
|
||||
internalNameTip = Nombre interno sin extensi\u00F3n, el nombre original del fichero o el m\u00F3dulo, por ejemplo.
|
||||
companyName = Nombre de la organizaci\u00F3n
|
||||
|
||||
addMessages=Add custom messages
|
||||
startupErr=Startup error:
|
||||
bundledJreErr=Bundled JRE error:
|
||||
jreVersionErr=JRE version error:
|
||||
jreVersionErrTip=Launch4j will append the required version number at the end of this message.
|
||||
launcherErr=Launcher error:
|
||||
instanceAlreadyExistsMsg=Inst. already exists:
|
||||
instanceAlreadyExistsMsgTip=Message displayed by single instance console applications if an instance already exists.
|
||||
|
||||
enableSingleInstance=Allow only a single instance of the application
|
||||
mutexName=Mutex name
|
||||
mutexNameTip=Mutex name that will uniquely identify your application.
|
||||
windowTitle=Window title
|
||||
windowTitleTip=Title of the application window to bring up on attempt to start a next instance.
|
||||
@@ -43,7 +43,6 @@ import javax.swing.event.ChangeListener;
|
||||
|
||||
import net.sf.launch4j.FileChooserFilter;
|
||||
import net.sf.launch4j.binding.Bindings;
|
||||
import net.sf.launch4j.config.Config;
|
||||
import net.sf.launch4j.form.BasicForm;
|
||||
|
||||
/**
|
||||
@@ -59,7 +58,7 @@ public class BasicFormImpl extends BasicForm {
|
||||
.add("icon", _iconField)
|
||||
.add("cmdLine", _cmdLineField)
|
||||
.add("errTitle", _errorTitleField)
|
||||
.add("downloadUrl", _downloadUrlField, Config.DOWNLOAD_URL)
|
||||
.add("downloadUrl", _downloadUrlField)
|
||||
.add("supportUrl", _supportUrlField)
|
||||
.add("chdir", _chdirField, ".")
|
||||
.add("priorityIndex", new JRadioButton[] { _normalPriorityRadio,
|
||||
|
||||
@@ -76,7 +76,7 @@ public class ClassPathFormImpl extends ClassPathForm {
|
||||
_classpathCheck.addChangeListener(cpl);
|
||||
cpl.stateChanged(null);
|
||||
|
||||
_classpathList.setModel(new DefaultListModel());
|
||||
_classpathList.setModel(new DefaultListModel<String>());
|
||||
_classpathList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
|
||||
_classpathList.addListSelectionListener(new ClasspathSelectionListener());
|
||||
|
||||
@@ -121,7 +121,7 @@ public class ClassPathFormImpl extends ClassPathForm {
|
||||
signalViolation(Messages.getString("specifyClassPath"));
|
||||
return;
|
||||
}
|
||||
DefaultListModel model = (DefaultListModel) _classpathList.getModel();
|
||||
DefaultListModel<String> model = (DefaultListModel<String>) _classpathList.getModel();
|
||||
if (_classpathList.isSelectionEmpty()) {
|
||||
model.addElement(cp);
|
||||
clear();
|
||||
@@ -152,7 +152,7 @@ public class ClassPathFormImpl extends ClassPathForm {
|
||||
Messages.getString("confirmClassPathRemoval"))) {
|
||||
return;
|
||||
}
|
||||
DefaultListModel model = (DefaultListModel) _classpathList.getModel();
|
||||
DefaultListModel<String> model = (DefaultListModel<String>) _classpathList.getModel();
|
||||
while (!_classpathList.isSelectionEmpty()) {
|
||||
model.remove(_classpathList.getSelectedIndex());
|
||||
}
|
||||
@@ -165,24 +165,24 @@ public class ClassPathFormImpl extends ClassPathForm {
|
||||
if (x < 1) {
|
||||
return;
|
||||
}
|
||||
DefaultListModel model = (DefaultListModel) _classpathList.getModel();
|
||||
Object o = model.get(x - 1);
|
||||
DefaultListModel<String> model = (DefaultListModel<String>) _classpathList.getModel();
|
||||
String s = model.get(x - 1);
|
||||
model.set(x - 1, model.get(x));
|
||||
model.set(x, o);
|
||||
model.set(x, s);
|
||||
_classpathList.setSelectedIndex(x - 1);
|
||||
}
|
||||
}
|
||||
|
||||
private class MoveDownListener implements ActionListener {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
DefaultListModel model = (DefaultListModel) _classpathList.getModel();
|
||||
DefaultListModel<String> model = (DefaultListModel<String>) _classpathList.getModel();
|
||||
int x = _classpathList.getSelectedIndex();
|
||||
if (x == -1 || x >= model.getSize() - 1) {
|
||||
return;
|
||||
}
|
||||
Object o = model.get(x + 1);
|
||||
String s = model.get(x + 1);
|
||||
model.set(x + 1, model.get(x));
|
||||
model.set(x, o);
|
||||
model.set(x, s);
|
||||
_classpathList.setSelectedIndex(x + 1);
|
||||
}
|
||||
}
|
||||
@@ -205,7 +205,7 @@ public class ClassPathFormImpl extends ClassPathForm {
|
||||
String classPath = (String) attr.getValue("Class-Path");
|
||||
jar.close();
|
||||
_mainclassField.setText(mainClass != null ? mainClass : "");
|
||||
DefaultListModel model = new DefaultListModel();
|
||||
DefaultListModel<String> model = new DefaultListModel<String>();
|
||||
if (classPath != null) {
|
||||
String[] paths = classPath.split(" ");
|
||||
for (int i = 0; i < paths.length; i++) {
|
||||
|
||||
@@ -45,8 +45,8 @@ import javax.swing.JTextField;
|
||||
|
||||
import net.sf.launch4j.binding.Bindings;
|
||||
import net.sf.launch4j.binding.Validator;
|
||||
import net.sf.launch4j.form.JreForm;
|
||||
import net.sf.launch4j.config.Jre;
|
||||
import net.sf.launch4j.form.JreForm;
|
||||
|
||||
/**
|
||||
* @author Copyright (C) 2006 Grzegorz Kowal
|
||||
@@ -54,32 +54,18 @@ import net.sf.launch4j.config.Jre;
|
||||
public class JreFormImpl extends JreForm {
|
||||
|
||||
public JreFormImpl(Bindings bindings, JFileChooser fc) {
|
||||
_jdkPreferenceCombo.setModel(new DefaultComboBoxModel(new String[] {
|
||||
Messages.getString("jdkPreference.jre.only"),
|
||||
Messages.getString("jdkPreference.prefer.jre"),
|
||||
Messages.getString("jdkPreference.prefer.jdk"),
|
||||
Messages.getString("jdkPreference.jdk.only")}));
|
||||
|
||||
_runtimeBitsCombo.setModel(new DefaultComboBoxModel(new String[] {
|
||||
Messages.getString("runtimeBits.64"),
|
||||
Messages.getString("runtimeBits.64And32"),
|
||||
Messages.getString("runtimeBits.32And64"),
|
||||
Messages.getString("runtimeBits.32")}));
|
||||
|
||||
bindings.add("jre.path", _jrePathField)
|
||||
.add("jre.bundledJre64Bit", _bundledJre64BitCheck)
|
||||
.add("jre.bundledJreAsFallback", _bundledJreAsFallbackCheck)
|
||||
bindings.add("jre.path", _jrePathField, Jre.DEFAULT_PATH)
|
||||
.add("jre.requiresJdk", _requiresJdkCheck)
|
||||
.add("jre.requires64Bit", _requires64BitCheck)
|
||||
.add("jre.minVersion", _jreMinField)
|
||||
.add("jre.maxVersion", _jreMaxField)
|
||||
.add("jre.jdkPreferenceIndex", _jdkPreferenceCombo, Jre.DEFAULT_JDK_PREFERENCE_INDEX)
|
||||
.add("jre.runtimeBitsIndex", _runtimeBitsCombo, Jre.DEFAULT_JDK_PREFERENCE_INDEX)
|
||||
.add("jre.initialHeapSize", _initialHeapSizeField)
|
||||
.add("jre.initialHeapPercent", _initialHeapPercentField)
|
||||
.add("jre.maxHeapSize", _maxHeapSizeField)
|
||||
.add("jre.maxHeapPercent", _maxHeapPercentField)
|
||||
.add("jre.options", _jvmOptionsTextArea);
|
||||
|
||||
_varCombo.setModel(new DefaultComboBoxModel(new String[] {
|
||||
_varCombo.setModel(new DefaultComboBoxModel<String>(new String[] {
|
||||
"EXEDIR", "EXEFILE", "PWD", "OLDPWD", "JREHOMEDIR",
|
||||
"HKEY_CLASSES_ROOT", "HKEY_CURRENT_USER", "HKEY_LOCAL_MACHINE",
|
||||
"HKEY_USERS", "HKEY_CURRENT_CONFIG" }));
|
||||
|
||||
@@ -45,20 +45,18 @@ import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.io.File;
|
||||
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JToolBar;
|
||||
import javax.swing.SwingWorker;
|
||||
import javax.swing.UIManager;
|
||||
|
||||
import com.jgoodies.looks.Options;
|
||||
import com.jgoodies.looks.plastic.PlasticXPLookAndFeel;
|
||||
import com.jgoodies.looks.windows.WindowsLookAndFeel;
|
||||
import com.formdev.flatlaf.FlatLightLaf;
|
||||
|
||||
import foxtrot.Task;
|
||||
import foxtrot.Worker;
|
||||
import net.sf.launch4j.Builder;
|
||||
import net.sf.launch4j.BuilderException;
|
||||
import net.sf.launch4j.ExecException;
|
||||
@@ -73,7 +71,7 @@ import net.sf.launch4j.config.ConfigPersister;
|
||||
import net.sf.launch4j.config.ConfigPersisterException;
|
||||
|
||||
/**
|
||||
* @author Copyright (C) 2005 Grzegorz Kowal
|
||||
* @author Copyright (C) 2022 Grzegorz Kowal
|
||||
*/
|
||||
public class MainFrame extends JFrame {
|
||||
private static MainFrame _instance;
|
||||
@@ -87,17 +85,7 @@ public class MainFrame extends JFrame {
|
||||
|
||||
public static void createInstance() {
|
||||
try {
|
||||
Toolkit.getDefaultToolkit().setDynamicLayout(true);
|
||||
System.setProperty("sun.awt.noerasebackground","true");
|
||||
|
||||
// JGoodies
|
||||
Options.setDefaultIconSize(new Dimension(16, 16)); // menu icons
|
||||
Options.setUseNarrowButtons(false);
|
||||
Options.setPopupDropShadowEnabled(true);
|
||||
|
||||
UIManager.setLookAndFeel(System.getProperty("os.name").toLowerCase().startsWith("windows")
|
||||
? new WindowsLookAndFeel() : new PlasticXPLookAndFeel());
|
||||
|
||||
FlatLightLaf.install();
|
||||
_instance = new MainFrame();
|
||||
} catch (Exception e) {
|
||||
System.err.println(e);
|
||||
@@ -115,26 +103,26 @@ public class MainFrame extends JFrame {
|
||||
setGlassPane(new GlassPane(this));
|
||||
_fileChooser.setFileFilter(new FileChooserFilter(
|
||||
Messages.getString("MainFrame.config.files"),
|
||||
new String[] {".xml", ".cfg"}));
|
||||
new String[] { ".xml" }));
|
||||
|
||||
_toolBar = new JToolBar();
|
||||
_toolBar.setFloatable(false);
|
||||
_toolBar.setRollover(true);
|
||||
addButton("images/new.png", Messages.getString("MainFrame.new.config"),
|
||||
addButton(UIManager.getIcon("Tree.leafIcon"), Messages.getString("MainFrame.new.config"),
|
||||
new NewActionListener());
|
||||
addButton("images/open.png", Messages.getString("MainFrame.open.config"),
|
||||
addButton(UIManager.getIcon("Tree.openIcon"), Messages.getString("MainFrame.open.config"),
|
||||
new OpenActionListener());
|
||||
addButton("images/save.png", Messages.getString("MainFrame.save.config"),
|
||||
addButton(UIManager.getIcon("FileView.floppyDriveIcon"), Messages.getString("MainFrame.save.config"),
|
||||
new SaveActionListener());
|
||||
_toolBar.addSeparator();
|
||||
addButton("images/build.png", Messages.getString("MainFrame.build.wrapper"),
|
||||
addButton(getLocalIcon("images/build.png"), Messages.getString("MainFrame.build.wrapper"),
|
||||
new BuildActionListener());
|
||||
_runButton = addButton("images/run.png",
|
||||
_runButton = addButton(getLocalIcon("images/run.png"),
|
||||
Messages.getString("MainFrame.test.wrapper"),
|
||||
new RunActionListener());
|
||||
setRunEnabled(false);
|
||||
_toolBar.addSeparator();
|
||||
addButton("images/info.png", Messages.getString("MainFrame.about.launch4j"),
|
||||
addButton(UIManager.getIcon("HelpButton.icon"), Messages.getString("MainFrame.about.launch4j"),
|
||||
new AboutActionListener());
|
||||
|
||||
_configForm = new ConfigFormImpl();
|
||||
@@ -144,16 +132,18 @@ public class MainFrame extends JFrame {
|
||||
pack();
|
||||
Dimension scr = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
Dimension fr = getSize();
|
||||
fr.width += 25;
|
||||
fr.width = 900;
|
||||
fr.height += 100;
|
||||
setBounds((scr.width - fr.width) / 2, (scr.height - fr.height) / 2,
|
||||
fr.width, fr.height);
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
private JButton addButton(String iconPath, String tooltip, ActionListener l) {
|
||||
ImageIcon icon = new ImageIcon(MainFrame.class.getClassLoader()
|
||||
.getResource(iconPath));
|
||||
private ImageIcon getLocalIcon(String iconPath) {
|
||||
return new ImageIcon(MainFrame.class.getClassLoader().getResource(iconPath));
|
||||
}
|
||||
|
||||
private JButton addButton(Icon icon, String tooltip, ActionListener l) {
|
||||
JButton b = new JButton(icon);
|
||||
b.setToolTipText(tooltip);
|
||||
b.addActionListener(l);
|
||||
@@ -271,13 +261,8 @@ public class MainFrame extends JFrame {
|
||||
if (canDiscardChanges() && _fileChooser.showOpenDialog(MainFrame.this)
|
||||
== JOptionPane.YES_OPTION) {
|
||||
final File f = _fileChooser.getSelectedFile();
|
||||
if (f.getPath().endsWith(".xml")) {
|
||||
ConfigPersister.getInstance().load(f);
|
||||
_saved = true;
|
||||
} else {
|
||||
ConfigPersister.getInstance().loadVersion1(f);
|
||||
_saved = false;
|
||||
}
|
||||
ConfigPersister.getInstance().load(f);
|
||||
_saved = true;
|
||||
_configForm.put(ConfigPersister.getInstance().getConfig());
|
||||
showConfigName(f);
|
||||
setRunEnabled(false);
|
||||
@@ -327,9 +312,11 @@ public class MainFrame extends JFrame {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
try {
|
||||
getGlassPane().setVisible(true);
|
||||
Worker.post(new Task() {
|
||||
public Object run() throws ExecException {
|
||||
Log log = Log.getSwingLog(_configForm.getLogTextArea());
|
||||
new SwingWorker<Boolean, Boolean>() {
|
||||
@Override
|
||||
protected Boolean doInBackground() throws ExecException
|
||||
{
|
||||
Log log = Log.getSwingLog(_configForm.getLogTextArea());
|
||||
log.clear();
|
||||
String path = _outfile.getPath();
|
||||
if (Util.WINDOWS_OS) {
|
||||
@@ -340,9 +327,9 @@ public class MainFrame extends JFrame {
|
||||
+ path);
|
||||
Util.exec(new String[] { "java", "-jar", path }, log);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
}.execute();
|
||||
} catch (Exception ex) {
|
||||
// XXX errors logged by exec
|
||||
} finally {
|
||||
|
||||
@@ -49,7 +49,7 @@ public class MessagesFormImpl extends MessagesForm {
|
||||
Msg m = new Msg();
|
||||
bindings.addOptComponent("messages", Msg.class, _messagesCheck)
|
||||
.add("messages.startupErr", _startupErrTextArea, m.getStartupErr())
|
||||
.add("messages.bundledJreErr", _bundledJreErrTextArea, m.getBundledJreErr())
|
||||
.add("messages.jreNotFoundErr", _jreNotFoundErrTextArea, m.getJreNotFoundErr())
|
||||
.add("messages.jreVersionErr", _jreVersionErrTextArea, m.getJreVersionErr())
|
||||
.add("messages.launcherErr", _launcherErrTextArea, m.getLauncherErr())
|
||||
.add("messages.instanceAlreadyExistsMsg", _instanceAlreadyExistsMsgTextArea,
|
||||
|
||||
@@ -50,7 +50,7 @@ import net.sf.launch4j.form.VersionInfoForm;
|
||||
public class VersionInfoFormImpl extends VersionInfoForm {
|
||||
|
||||
public VersionInfoFormImpl(Bindings bindings, JFileChooser fc) {
|
||||
_languageCombo.setModel(new DefaultComboBoxModel(LanguageID.sortedValues()));
|
||||
_languageCombo.setModel(new DefaultComboBoxModel<LanguageID>(LanguageID.sortedValues()));
|
||||
bindings.addOptComponent("versionInfo", VersionInfo.class, _versionInfoCheck)
|
||||
.add("versionInfo.fileVersion", _fileVersionField)
|
||||
.add("versionInfo.productVersion", _productVersionField)
|
||||
|
||||
@@ -56,17 +56,9 @@ noManifest=The selected jar does not have a manifest.
|
||||
specifyVar=Specify environment variable to add.
|
||||
otherVar=Other var
|
||||
|
||||
jdkPreference.jre.only=Only use public JREs
|
||||
jdkPreference.prefer.jre=Prefer public JRE, but use JDK runtime if newer
|
||||
jdkPreference.prefer.jdk=Prefer JDK runtime, but use public JRE if newer
|
||||
jdkPreference.jdk.only=Only use private JDK runtimes
|
||||
requiresJdk=Requires JDK
|
||||
|
||||
runtimeBits.64=64-bit only
|
||||
runtimeBits.64And32=First 64-bit, then 32-bit
|
||||
runtimeBits.32And64=First 32-bit, then 64-bit
|
||||
runtimeBits.32=32-bit only
|
||||
|
||||
MainFrame.config.files=launch4j config files (.xml, .cfg)
|
||||
MainFrame.config.files=launch4j config files (.xml)
|
||||
MainFrame.new.config=New configuration
|
||||
MainFrame.open.config=Open configuration or import 1.x
|
||||
MainFrame.save.config=Save configuration
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
#
|
||||
# Launch4j (http://launch4j.sourceforge.net/)
|
||||
# Cross-platform Java application wrapper for creating Windows native executables.
|
||||
#
|
||||
# Copyright (c) 2004, 2007 Grzegorz Kowal, Patricio Martínez Ros
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification,
|
||||
# are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. 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.
|
||||
#
|
||||
# 3. Neither the name of the copyright holder 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.
|
||||
#
|
||||
|
||||
tab.basic = B\u00E1sico
|
||||
tab.header = Cabecera
|
||||
tab.jre = JRE
|
||||
tab.splash = Pantalla de bienvenida
|
||||
tab.version = Informaci\u00F3n de la versi\u00F3n
|
||||
|
||||
jar = Jar
|
||||
jarPath = Ruta del jar
|
||||
jarTip = Jar de la aplicaci\u00F3n.
|
||||
jarPathTip = Ruta del jar relativa al ejecutable. Por ejemplo, si el lanzador ejecutable y el jar de la aplicaci\u00F3n, llamados calc.exe y calc.jar respectivamente, est\u00E1n en el mismo directorio, ser\u00EDa\: calc.jar.
|
||||
|
||||
MainFrame.config.files = Ficheros de configuraci\u00F3n de launch4j (.xml, .cfg)
|
||||
MainFrame.new.config = Nueva configuraci\u00F3n
|
||||
MainFrame.open.config = Abrir configuraci\u00F3n o importar 1.x
|
||||
MainFrame.save.config = Guardar configuraci\u00F3n
|
||||
MainFrame.build.wrapper = Construir el empaquetador
|
||||
MainFrame.test.wrapper = Comprobar el empaquetador
|
||||
MainFrame.about.launch4j = Acerca de launch4j
|
||||
MainFrame.discard.changes = \u00BFDescartar cambios?
|
||||
MainFrame.confirm = Confirmar
|
||||
MainFrame.untitled = Sin nombre
|
||||
MainFrame.executing = Ejecutando\:
|
||||
MainFrame.jar.integrity.test = Prueba de integridad jar, ejecutando\:
|
||||
@@ -1,44 +0,0 @@
|
||||
#
|
||||
# Launch4j (http://launch4j.sourceforge.net/)
|
||||
# Cross-platform Java application wrapper for creating Windows native executables.
|
||||
#
|
||||
# Copyright (c) 2004, 2007 Grzegorz Kowal, Patricio Martínez Ros
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification,
|
||||
# are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. 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.
|
||||
#
|
||||
# 3. Neither the name of the copyright holder 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.
|
||||
#
|
||||
|
||||
Main.usage=Uso
|
||||
|
||||
Builder.compiling.resources=Compilando recursos
|
||||
Builder.linking=Enlazando
|
||||
Builder.wrapping=Empaquetando
|
||||
Builder.success=Creado con \ufffdxito
|
||||
Builder.generated.resource.file=Fichero de recursos generado...\n
|
||||
Builder.line.has.errors=Line {0} has errors...
|
||||
|
||||
Util.exec.failed=Fallo en la ejecuci\ufffd
|
||||
Util.tmpdir=Temporary file directory path (launch4j.tmpdir) cannot contain spaces.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user