Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 87832c4469 | |||
| 64059731cd | |||
| bce4f70fd2 | |||
| 5eaf884b88 | |||
| 19c17ae81d | |||
| a61a13397a | |||
| 89e83f978b | |||
| 09436a17d8 | |||
| 3e84798d88 | |||
| c64b17467d | |||
| c12187cae9 | |||
| 81d436dcf5 | |||
| 091a62be2f | |||
| da197c64c7 | |||
| 6b4ddbe5b4 | |||
| 0c357fe959 | |||
| 2064184093 | |||
| 2e6ea5eecc | |||
| 0dde64e5fc | |||
| 28a3326a35 | |||
| df6b893171 | |||
| ead577521d | |||
|
|
cc1c76bd47 | ||
| b74f1aedb4 | |||
| 67d1e787ee | |||
| 11ca88ee38 | |||
|
|
ae4e3db0d7 | ||
|
|
4314790271 | ||
| 9c58276119 | |||
| 16380a9752 | |||
| b523d80c25 |
21
ExampleExportProfiles/librivox-noinit.abprof
Normal file
21
ExampleExportProfiles/librivox-noinit.abprof
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<profile>
|
||||||
|
<code>librivox-noinit</code>
|
||||||
|
<name>LibriVox.org (Without initials)</name>
|
||||||
|
<export>
|
||||||
|
<bitrate>128000</bitrate>
|
||||||
|
<channels>1</channels>
|
||||||
|
<samples>44100</samples>
|
||||||
|
<format>{chapter.name:lower}_{book.author.short:lower}_{file.bitrate.kb}kb</format>
|
||||||
|
</export>
|
||||||
|
<gaps>
|
||||||
|
<pre-chapter>500</pre-chapter>
|
||||||
|
<post-chapter>5000</post-chapter>
|
||||||
|
<post-sentence>400</post-sentence>
|
||||||
|
<followon>100</followon>
|
||||||
|
<post-paragraph>1000</post-paragraph>
|
||||||
|
<post-section>1200</post-section>
|
||||||
|
</gaps>
|
||||||
|
<audio>
|
||||||
|
<rms>-19</rms>
|
||||||
|
</audio>
|
||||||
|
</profile>
|
||||||
21
ExampleExportProfiles/librivox-spc.abprof
Normal file
21
ExampleExportProfiles/librivox-spc.abprof
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<profile>
|
||||||
|
<code>librivox-spc</code>
|
||||||
|
<name>LibriVox.org Short Poetry Collection</name>
|
||||||
|
<export>
|
||||||
|
<bitrate>128000</bitrate>
|
||||||
|
<channels>1</channels>
|
||||||
|
<samples>44100</samples>
|
||||||
|
<format>{book.title:lower}_{chapter.name:lower}_{narrator.initials:lower}_{file.bitrate.kb}kb</format>
|
||||||
|
</export>
|
||||||
|
<gaps>
|
||||||
|
<pre-chapter>500</pre-chapter>
|
||||||
|
<post-chapter>5000</post-chapter>
|
||||||
|
<post-sentence>400</post-sentence>
|
||||||
|
<followon>100</followon>
|
||||||
|
<post-paragraph>1000</post-paragraph>
|
||||||
|
<post-section>1200</post-section>
|
||||||
|
</gaps>
|
||||||
|
<audio>
|
||||||
|
<rms>-19</rms>
|
||||||
|
</audio>
|
||||||
|
</profile>
|
||||||
21
ExampleExportProfiles/librivox.abprof
Normal file
21
ExampleExportProfiles/librivox.abprof
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<profile>
|
||||||
|
<code>librivox</code>
|
||||||
|
<name>LibriVox.org</name>
|
||||||
|
<export>
|
||||||
|
<bitrate>128000</bitrate>
|
||||||
|
<channels>1</channels>
|
||||||
|
<samples>44100</samples>
|
||||||
|
<format>{chapter.name:lower}_{book.author.short:lower}_{narrator.initials:lower}_{file.bitrate.kb}kb</format>
|
||||||
|
</export>
|
||||||
|
<gaps>
|
||||||
|
<pre-chapter>500</pre-chapter>
|
||||||
|
<post-chapter>5000</post-chapter>
|
||||||
|
<post-sentence>400</post-sentence>
|
||||||
|
<followon>100</followon>
|
||||||
|
<post-paragraph>1000</post-paragraph>
|
||||||
|
<post-section>1200</post-section>
|
||||||
|
</gaps>
|
||||||
|
<audio>
|
||||||
|
<rms>-19</rms>
|
||||||
|
</audio>
|
||||||
|
</profile>
|
||||||
17
README.md
17
README.md
@@ -103,3 +103,20 @@ sox "$FILE" -r 16000 -c 1 -b 16 "/tmp/ds-${ID}.wav"
|
|||||||
${BINPATH}/deepspeech --model ${MODELS}/output_graph.pbmm --lm ${MODELS}/lm.binary --trie ${MODELS}/trie --audio "/tmp/ds-${ID}.wav" 2>/dev/null
|
${BINPATH}/deepspeech --model ${MODELS}/output_graph.pbmm --lm ${MODELS}/lm.binary --trie ${MODELS}/trie --audio "/tmp/ds-${ID}.wav" 2>/dev/null
|
||||||
rm /tmp/ds-${ID}.wav
|
rm /tmp/ds-${ID}.wav
|
||||||
```
|
```
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
* Whisper wrapper script
|
||||||
|
|
||||||
|
This small script will use Whisper to do the same job as DeepSpeech but considerably faster and better.
|
||||||
|
|
||||||
|
```
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
whisper --output_format txt --model small --fp16 False --output_dir /tmp --device cuda --language English "$1" > /dev/null
|
||||||
|
BASE=$(basename "$1" .wav)
|
||||||
|
TXT=${BASE}.txt
|
||||||
|
cat "/tmp/${TXT}" | tr '
|
||||||
|
' ' '
|
||||||
|
echo ""
|
||||||
|
```
|
||||||
|
|||||||
3
dist/linux/stub
vendored
3
dist/linux/stub
vendored
@@ -5,6 +5,7 @@ java=java
|
|||||||
if test -n "$JAVA_HOME"; then
|
if test -n "$JAVA_HOME"; then
|
||||||
java="$JAVA_HOME/bin/java"
|
java="$JAVA_HOME/bin/java"
|
||||||
fi
|
fi
|
||||||
java_args=-Xmx1g
|
MEM=`grep MemTotal: /proc/meminfo | awk '{printf "%.0f", ($2 / 1024 / 1024 /2)}'`
|
||||||
|
java_args=-Xmx${MEM}g
|
||||||
exec "$java" $java_args -jar $MYSELF "$@"
|
exec "$java" $java_args -jar $MYSELF "$@"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="src" output="demo/ExitCodeApp/build" path="demo/ExitCodeApp/src"/>
|
<classpathentry kind="src" output="demo/ExitCodeApp/build" path="demo/ExitCodeApp/src"/>
|
||||||
<classpathentry kind="src" output="demo/SimpleApp/build" path="demo/SimpleApp/src"/>
|
<classpathentry kind="src" output="demo/SimpleApp/build" path="demo/SimpleApp/src"/>
|
||||||
<classpathentry kind="src" output="demo/ConsoleApp/build" path="demo/ConsoleApp/src"/>
|
<classpathentry kind="src" output="demo/ConsoleApp/build" path="demo/ConsoleApp/src"/>
|
||||||
<classpathentry kind="lib" path="lib/formsrt.jar"/>
|
<classpathentry kind="lib" path="lib/formsrt.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/xstream.jar"/>
|
<classpathentry kind="lib" path="lib/xstream.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/commons-beanutils.jar"/>
|
<classpathentry kind="lib" path="lib/commons-beanutils.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/commons-logging.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="lib" path="lib/ant.jar"/>
|
<classpathentry kind="lib" path="lib/jgoodies-common.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-forms.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/jgoodies-common.jar"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||||
<classpathentry kind="lib" path="lib/jgoodies-forms.jar"/>
|
<classpathentry kind="lib" path="lib/flatlaf.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/jgoodies-looks.jar"/>
|
<classpathentry kind="output" path="build"/>
|
||||||
<classpathentry kind="output" path="build"/>
|
</classpath>
|
||||||
</classpath>
|
|
||||||
|
|||||||
2
launch4j/.gitignore
vendored
2
launch4j/.gitignore
vendored
@@ -1,2 +0,0 @@
|
|||||||
/build
|
|
||||||
/target
|
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<projectDescription>
|
<projectDescription>
|
||||||
<name>launch4j</name>
|
<name>launch4j</name>
|
||||||
<comment></comment>
|
<comment></comment>
|
||||||
<projects>
|
<projects>
|
||||||
</projects>
|
</projects>
|
||||||
<buildSpec>
|
<buildSpec>
|
||||||
<buildCommand>
|
<buildCommand>
|
||||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
<arguments>
|
<arguments>
|
||||||
</arguments>
|
</arguments>
|
||||||
</buildCommand>
|
</buildCommand>
|
||||||
</buildSpec>
|
</buildSpec>
|
||||||
<natures>
|
<natures>
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
</natures>
|
</natures>
|
||||||
</projectDescription>
|
</projectDescription>
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
encoding/<project>=UTF-8
|
encoding/<project>=UTF-8
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
line.separator=\n
|
line.separator=\n
|
||||||
|
|||||||
@@ -1,81 +1,117 @@
|
|||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
|
||||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
|
||||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
|
||||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
|
||||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
|
||||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
||||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||||
org.eclipse.jdt.core.compiler.problem.deadCode=warning
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.problem.deprecation=warning
|
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||||
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||||
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||||
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
|
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.APILeak=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
|
org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info
|
||||||
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
|
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
|
org.eclipse.jdt.core.compiler.problem.deadCode=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
org.eclipse.jdt.core.compiler.problem.deprecation=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
|
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||||
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||||
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
|
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
|
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
|
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||||
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
|
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
|
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
|
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
|
||||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
|
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
|
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
|
||||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
|
||||||
org.eclipse.jdt.core.compiler.problem.nullReference=warning
|
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
|
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
|
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
|
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
|
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
|
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
|
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
|
||||||
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
|
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
|
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
|
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||||
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
|
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
|
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
|
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
|
||||||
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
org.eclipse.jdt.core.compiler.problem.nullReference=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
|
||||||
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
|
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
|
org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
|
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
|
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
|
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
|
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
|
||||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
|
||||||
org.eclipse.jdt.core.compiler.source=1.6
|
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
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
|
||||||
|
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.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,30 +1,30 @@
|
|||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
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.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
@@ -1,77 +1,77 @@
|
|||||||
<project name="launch4j" default="compile" basedir=".">
|
<project name="launch4j" default="compile" basedir=".">
|
||||||
<property name="src" location="src" />
|
<property name="src" location="src" />
|
||||||
<property name="lib" location="lib" />
|
<property name="lib" location="lib" />
|
||||||
<property name="build" location="build" />
|
<property name="build" location="build" />
|
||||||
<property name="jar" location="./${ant.project.name}.jar" />
|
<property name="jar" location="./${ant.project.name}.jar" />
|
||||||
<property name="launch4j.dir" location="." />
|
<property name="launch4j.dir" location="." />
|
||||||
<property name="maven" location="maven" />
|
<property name="maven" location="maven" />
|
||||||
<property file="${src}/launch4j.properties"/>
|
<property file="${src}/launch4j.properties"/>
|
||||||
|
|
||||||
<path id="dist.classpath">
|
<path id="dist.classpath">
|
||||||
<pathelement path="${build}" />
|
<pathelement path="${build}" />
|
||||||
<fileset dir="${lib}">
|
<fileset dir="${lib}">
|
||||||
<include name="**/*.jar" />
|
<include name="**/*.jar" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
<target name="init">
|
<target name="init">
|
||||||
<tstamp />
|
<tstamp />
|
||||||
<mkdir dir="${build}" />
|
<mkdir dir="${build}" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="compile" depends="init" description="compile the source">
|
<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">
|
<copy todir="${build}/images">
|
||||||
<fileset dir="${src}/images">
|
<fileset dir="${src}/images">
|
||||||
<include name="**/*" />
|
<include name="**/*" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<copy todir="${build}">
|
<copy todir="${build}">
|
||||||
<fileset dir="${src}">
|
<fileset dir="${src}">
|
||||||
<include name="**/*.properties" />
|
<include name="**/*.properties" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="jar" depends="compile" description="create jar">
|
<target name="jar" depends="compile" description="create jar">
|
||||||
<fileset dir="${lib}" id="lib.dist.fileset">
|
<fileset dir="${lib}" id="lib.dist.fileset">
|
||||||
<include name="**/*.jar" />
|
<include name="**/*.jar" />
|
||||||
</fileset>
|
</fileset>
|
||||||
<pathconvert pathsep=" " property="dist.classpath" refid="lib.dist.fileset">
|
<pathconvert pathsep=" " property="dist.classpath" refid="lib.dist.fileset">
|
||||||
<map from="${lib}" to="./lib" />
|
<map from="${lib}" to="./lib" />
|
||||||
</pathconvert>
|
</pathconvert>
|
||||||
<!-- Put everything in ${build} into a jar file -->
|
<!-- Put everything in ${build} into a jar file -->
|
||||||
<jar jarfile="${jar}">
|
<jar jarfile="${jar}">
|
||||||
<fileset dir="${build}" excludes="**/messages_es.properties" />
|
<fileset dir="${build}" excludes="**/messages_es.properties" />
|
||||||
<manifest>
|
<manifest>
|
||||||
<attribute name="Main-Class" value="net.sf.launch4j.Main" />
|
<attribute name="Main-Class" value="net.sf.launch4j.Main" />
|
||||||
<attribute name="Class-Path" value=". ${dist.classpath}" />
|
<attribute name="Class-Path" value=". ${dist.classpath}" />
|
||||||
</manifest>
|
</manifest>
|
||||||
</jar>
|
</jar>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="demo" depends="jar" description="build the demos">
|
<target name="demo" depends="jar" description="build the demos">
|
||||||
<ant dir="./demo/ConsoleApp" inheritAll="false" />
|
<ant dir="./demo/ConsoleApp" inheritAll="false" />
|
||||||
<ant dir="./demo/SimpleApp" inheritAll="false" />
|
<ant dir="./demo/SimpleApp" inheritAll="false" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="clean" description="clean up">
|
<target name="clean" description="clean up">
|
||||||
<delete dir="${build}" />
|
<delete dir="${build}" />
|
||||||
<delete file="${jar}" />
|
<delete file="${jar}" />
|
||||||
<ant dir="./demo/ConsoleApp" target="clean" inheritAll="false" />
|
<ant dir="./demo/ConsoleApp" target="clean" inheritAll="false" />
|
||||||
<ant dir="./demo/SimpleApp" target="clean" inheritAll="false" />
|
<ant dir="./demo/SimpleApp" target="clean" inheritAll="false" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="switch-to-maven" description="switch project to maven">
|
<target name="switch-to-maven" description="switch project to maven">
|
||||||
<copy todir="." overwrite="true">
|
<copy todir="." overwrite="true">
|
||||||
<fileset dir="${maven}">
|
<fileset dir="${maven}">
|
||||||
<include name="**/*" />
|
<include name="**/*" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<replace file="./pom.xml">
|
<replace file="./pom.xml">
|
||||||
<replacefilter token="$${launch4j.version}" value="${version}"/>
|
<replacefilter token="$${launch4j.version}" value="${version}"/>
|
||||||
</replace>
|
</replace>
|
||||||
<delete dir="${lib}" />
|
<delete dir="${lib}" />
|
||||||
<mkdir dir="./target" />
|
<mkdir dir="./target" />
|
||||||
</target>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
1
launch4j/demo/ConsoleApp/.gitignore
vendored
1
launch4j/demo/ConsoleApp/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
/build
|
|
||||||
Binary file not shown.
@@ -1,57 +1,57 @@
|
|||||||
<project name="ConsoleApp" default="exe" basedir=".">
|
<project name="ConsoleApp" default="exe" basedir=".">
|
||||||
<property name="src" location="src" />
|
<property name="src" location="src" />
|
||||||
<property name="lib" location="lib" />
|
<property name="lib" location="lib" />
|
||||||
<property name="build" location="build" />
|
<property name="build" location="build" />
|
||||||
<property name="launch4j.dir" location="../.." />
|
<property name="launch4j.dir" location="../.." />
|
||||||
|
|
||||||
<path id="dist.classpath">
|
<path id="dist.classpath">
|
||||||
<pathelement path="${build}" />
|
<pathelement path="${build}" />
|
||||||
<fileset dir="${lib}">
|
<fileset dir="${lib}">
|
||||||
<include name="**/*.jar" />
|
<include name="**/*.jar" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
<target name="init">
|
<target name="init">
|
||||||
<tstamp />
|
<tstamp />
|
||||||
<mkdir dir="${build}" />
|
<mkdir dir="${build}" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="compile" depends="init" description="compile the source">
|
<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>
|
||||||
|
|
||||||
<target name="jar" depends="compile" description="create the jar">
|
<target name="jar" depends="compile" description="create the jar">
|
||||||
<fileset dir="${lib}" id="lib.dist.fileset">
|
<fileset dir="${lib}" id="lib.dist.fileset">
|
||||||
<include name="**/*.jar" />
|
<include name="**/*.jar" />
|
||||||
</fileset>
|
</fileset>
|
||||||
<pathconvert pathsep=" " property="dist.classpath" refid="lib.dist.fileset">
|
<pathconvert pathsep=" " property="dist.classpath" refid="lib.dist.fileset">
|
||||||
<map from="${lib}" to=".\lib" />
|
<map from="${lib}" to=".\lib" />
|
||||||
</pathconvert>
|
</pathconvert>
|
||||||
<!-- Put everything in ${build} into a jar file -->
|
<!-- Put everything in ${build} into a jar file -->
|
||||||
<jar jarfile="${ant.project.name}.jar">
|
<jar jarfile="${ant.project.name}.jar">
|
||||||
<fileset dir="${build}" includes="**/*" />
|
<fileset dir="${build}" includes="**/*" />
|
||||||
<manifest>
|
<manifest>
|
||||||
<!-- SET YOUR MAIN CLASS HERE -->
|
<!-- SET YOUR MAIN CLASS HERE -->
|
||||||
<attribute name="Main-Class" value="net.sf.launch4j.example.ConsoleApp" />
|
<attribute name="Main-Class" value="net.sf.launch4j.example.ConsoleApp" />
|
||||||
<attribute name="Class-Path" value=". ${dist.classpath}" />
|
<attribute name="Class-Path" value=". ${dist.classpath}" />
|
||||||
</manifest>
|
</manifest>
|
||||||
</jar>
|
</jar>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="exe" depends="jar">
|
<target name="exe" depends="jar">
|
||||||
<taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask" classpath="${launch4j.dir}/launch4j.jar
|
<taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask" classpath="${launch4j.dir}/launch4j.jar
|
||||||
:${launch4j.dir}/lib/xstream.jar" />
|
:${launch4j.dir}/lib/xstream.jar" />
|
||||||
<launch4j>
|
<launch4j>
|
||||||
<config headerType="console" jarPath="ConsoleApp.jar" dontWrapJar="true" outfile="ConsoleApp.exe" errTitle="ConsoleApp" chdir="." icon="l4j/ConsoleApp.ico">
|
<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" />
|
<singleInstance mutexName="net.sf.launch4j.example.ConsoleApp" />
|
||||||
<jre minVersion="1.6.0" />
|
<jre path="%JAVA_HOME%;%PATH%" minVersion="1.8.0" />
|
||||||
</config>
|
</config>
|
||||||
</launch4j>
|
</launch4j>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="clean" description="clean up">
|
<target name="clean" description="clean up">
|
||||||
<delete dir="${build}" />
|
<delete dir="${build}" />
|
||||||
<delete file="${ant.project.name}.jar" />
|
<delete file="${ant.project.name}.jar" />
|
||||||
<delete file="${ant.project.name}.exe" />
|
<delete file="${ant.project.name}.exe" />
|
||||||
</target>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -1,72 +1,72 @@
|
|||||||
/*
|
/*
|
||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.sf.launch4j.example;
|
package net.sf.launch4j.example;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Copyright (C) 2005 Grzegorz Kowal
|
* @author Copyright (C) 2005 Grzegorz Kowal
|
||||||
*/
|
*/
|
||||||
public class ConsoleApp {
|
public class ConsoleApp {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
StringBuffer sb = new StringBuffer("Hello World!\n\nJava version: ");
|
StringBuffer sb = new StringBuffer("Hello World!\n\nJava version: ");
|
||||||
sb.append(System.getProperty("java.version"));
|
sb.append(System.getProperty("java.version"));
|
||||||
sb.append("\nJava home: ");
|
sb.append("\nJava home: ");
|
||||||
sb.append(System.getProperty("java.home"));
|
sb.append(System.getProperty("java.home"));
|
||||||
sb.append("\nCurrent dir: ");
|
sb.append("\nCurrent dir: ");
|
||||||
sb.append(System.getProperty("user.dir"));
|
sb.append(System.getProperty("user.dir"));
|
||||||
if (args.length > 0) {
|
if (args.length > 0) {
|
||||||
sb.append("\nArgs: ");
|
sb.append("\nArgs: ");
|
||||||
for (int i = 0; i < args.length; i++) {
|
for (int i = 0; i < args.length; i++) {
|
||||||
sb.append(args[i]);
|
sb.append(args[i]);
|
||||||
sb.append(' ');
|
sb.append(' ');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sb.append("\n\nEnter a line of text, 'quit' or Ctrl-C to stop.\n\n>");
|
sb.append("\n\nEnter a line of text, 'quit' or Ctrl-C to stop.\n\n>");
|
||||||
System.out.print(sb.toString());
|
System.out.print(sb.toString());
|
||||||
try {
|
try {
|
||||||
BufferedReader is = new BufferedReader(new InputStreamReader(System.in));
|
BufferedReader is = new BufferedReader(new InputStreamReader(System.in));
|
||||||
String line;
|
String line;
|
||||||
while ((line = is.readLine()) != null && !line.equalsIgnoreCase("quit")) {
|
while ((line = is.readLine()) != null && !line.equalsIgnoreCase("quit")) {
|
||||||
System.out.print("You wrote: " + line + "\n\n>");
|
System.out.print("You wrote: " + line + "\n\n>");
|
||||||
}
|
}
|
||||||
is.close();
|
is.close();
|
||||||
System.exit(123);
|
System.exit(123);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
System.err.print(e);
|
System.err.print(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
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"
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>net.sf.launch4j.example</groupId>
|
<groupId>net.sf.launch4j.example</groupId>
|
||||||
<artifactId>ExitCodeApp</artifactId>
|
<artifactId>ExitCodeApp</artifactId>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
<name>ExitCodeApp</name>
|
<name>ExitCodeApp</name>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<sourceDirectory>src</sourceDirectory>
|
<sourceDirectory>src</sourceDirectory>
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>src</directory>
|
<directory>src</directory>
|
||||||
<excludes>
|
<excludes>
|
||||||
<exclude>**/*.java</exclude>
|
<exclude>**/*.java</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.1</version>
|
<version>3.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.6</source>
|
<source>1.8</source>
|
||||||
<target>1.6</target>
|
<target>1.8</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>com.akathist.maven.plugins.launch4j</groupId>
|
<groupId>com.akathist.maven.plugins.launch4j</groupId>
|
||||||
<artifactId>launch4j-maven-plugin</artifactId>
|
<artifactId>launch4j-maven-plugin</artifactId>
|
||||||
<version>1.7.6</version>
|
<version>1.7.22</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>l4j</id>
|
<id>l4j</id>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
<goals><goal>launch4j</goal></goals>
|
<goals>
|
||||||
<configuration>
|
<goal>launch4j</goal>
|
||||||
<headerType>console</headerType>
|
</goals>
|
||||||
<outfile>target/ExitCodeApp.exe</outfile>
|
<configuration>
|
||||||
<jar>target/ExitCodeApp-1.0.jar</jar>
|
<headerType>console</headerType>
|
||||||
<errTitle>ExitCodeApp</errTitle>
|
<outfile>target/ExitCodeApp.exe</outfile>
|
||||||
<classPath>
|
<jar>target/ExitCodeApp-1.0.jar</jar>
|
||||||
<mainClass>net.sf.launch4j.example.ExitCodeApp</mainClass>
|
<errTitle>ExitCodeApp</errTitle>
|
||||||
<addDependencies>false</addDependencies>
|
<classPath>
|
||||||
<preCp>anything</preCp>
|
<mainClass>net.sf.launch4j.example.ExitCodeApp</mainClass>
|
||||||
</classPath>
|
<addDependencies>false</addDependencies>
|
||||||
<jre>
|
<preCp>anything</preCp>
|
||||||
<minVersion>1.5.0</minVersion>
|
</classPath>
|
||||||
</jre>
|
<jre>
|
||||||
<versionInfo>
|
<path>%JAVA_HOME%;%PATH%</path>
|
||||||
<fileVersion>1.0.0.0</fileVersion>
|
<minVersion>1.8.0</minVersion>
|
||||||
<txtFileVersion>1.0</txtFileVersion>
|
</jre>
|
||||||
<fileDescription>Simple app for testing exit code.</fileDescription>
|
<versionInfo>
|
||||||
<copyright>Copyright (C) 2015 GK</copyright>
|
<fileVersion>1.0.0.0</fileVersion>
|
||||||
<productVersion>3.9.0.0</productVersion>
|
<txtFileVersion>1.0</txtFileVersion>
|
||||||
<txtProductVersion>3.9</txtProductVersion>
|
<fileDescription>Simple app for testing exit code.</fileDescription>
|
||||||
<productName>ExitCodeApp</productName>
|
<copyright>Copyright (C) 2022 GK</copyright>
|
||||||
<internalName>ExitCodeApp</internalName>
|
<productVersion>3.9.0.0</productVersion>
|
||||||
<originalFilename>ExitCodeApp.exe</originalFilename>
|
<txtProductVersion>3.9</txtProductVersion>
|
||||||
</versionInfo>
|
<productName>ExitCodeApp</productName>
|
||||||
</configuration>
|
<internalName>ExitCodeApp</internalName>
|
||||||
</execution>
|
<originalFilename>ExitCodeApp.exe</originalFilename>
|
||||||
</executions>
|
</versionInfo>
|
||||||
</plugin>
|
</configuration>
|
||||||
</plugins>
|
</execution>
|
||||||
</build>
|
</executions>
|
||||||
</project>
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -1,30 +1,30 @@
|
|||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|||||||
1
launch4j/demo/SimpleApp/.gitignore
vendored
1
launch4j/demo/SimpleApp/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
/build
|
|
||||||
Binary file not shown.
@@ -1,52 +1,52 @@
|
|||||||
<project name="SimpleApp" default="exe" basedir=".">
|
<project name="SimpleApp" default="exe" basedir=".">
|
||||||
<property name="src" location="src" />
|
<property name="src" location="src" />
|
||||||
<property name="lib" location="lib" />
|
<property name="lib" location="lib" />
|
||||||
<property name="build" location="build" />
|
<property name="build" location="build" />
|
||||||
<property name="launch4j.dir" location="../.." />
|
<property name="launch4j.dir" location="../.." />
|
||||||
|
|
||||||
<path id="dist.classpath">
|
<path id="dist.classpath">
|
||||||
<pathelement path="${build}" />
|
<pathelement path="${build}" />
|
||||||
<fileset dir="${lib}">
|
<fileset dir="${lib}">
|
||||||
<include name="**/*.jar" />
|
<include name="**/*.jar" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
<target name="init">
|
<target name="init">
|
||||||
<tstamp />
|
<tstamp />
|
||||||
<mkdir dir="${build}" />
|
<mkdir dir="${build}" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="compile" depends="init" description="compile the source">
|
<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>
|
||||||
|
|
||||||
<target name="jar" depends="compile" description="create the jar">
|
<target name="jar" depends="compile" description="create the jar">
|
||||||
<fileset dir="${lib}" id="lib.dist.fileset">
|
<fileset dir="${lib}" id="lib.dist.fileset">
|
||||||
<include name="**/*.jar" />
|
<include name="**/*.jar" />
|
||||||
</fileset>
|
</fileset>
|
||||||
<pathconvert pathsep=" " property="dist.classpath" refid="lib.dist.fileset">
|
<pathconvert pathsep=" " property="dist.classpath" refid="lib.dist.fileset">
|
||||||
<map from="${lib}" to=".\lib" />
|
<map from="${lib}" to=".\lib" />
|
||||||
</pathconvert>
|
</pathconvert>
|
||||||
<!-- Put everything in ${build} into a jar file -->
|
<!-- Put everything in ${build} into a jar file -->
|
||||||
<jar jarfile="${ant.project.name}.jar">
|
<jar jarfile="${ant.project.name}.jar">
|
||||||
<fileset dir="${build}" includes="**/*" />
|
<fileset dir="${build}" includes="**/*" />
|
||||||
<manifest>
|
<manifest>
|
||||||
<!-- SET YOUR MAIN CLASS HERE -->
|
<!-- SET YOUR MAIN CLASS HERE -->
|
||||||
<attribute name="Main-Class" value="net.sf.launch4j.example.SimpleApp" />
|
<attribute name="Main-Class" value="net.sf.launch4j.example.SimpleApp" />
|
||||||
<attribute name="Class-Path" value=". ${dist.classpath}" />
|
<attribute name="Class-Path" value=". ${dist.classpath}" />
|
||||||
</manifest>
|
</manifest>
|
||||||
</jar>
|
</jar>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="exe" depends="jar">
|
<target name="exe" depends="jar">
|
||||||
<taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask" classpath="${launch4j.dir}/launch4j.jar
|
<taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask" classpath="${launch4j.dir}/launch4j.jar
|
||||||
:${launch4j.dir}/lib/xstream.jar" />
|
:${launch4j.dir}/lib/xstream.jar" />
|
||||||
<launch4j configFile="./l4j/SimpleApp.xml" />
|
<launch4j configFile="./l4j/SimpleApp.xml" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="clean" description="clean up">
|
<target name="clean" description="clean up">
|
||||||
<delete dir="${build}" />
|
<delete dir="${build}" />
|
||||||
<delete file="${ant.project.name}.jar" />
|
<delete file="${ant.project.name}.jar" />
|
||||||
<delete file="${ant.project.name}.exe" />
|
<delete file="${ant.project.name}.exe" />
|
||||||
</target>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -1,19 +1,20 @@
|
|||||||
<launch4jConfig>
|
<launch4jConfig>
|
||||||
<headerType>gui</headerType>
|
<headerType>gui</headerType>
|
||||||
<jar>SimpleApp.jar</jar>
|
<jar>SimpleApp.jar</jar>
|
||||||
<dontWrapJar>true</dontWrapJar>
|
<dontWrapJar>true</dontWrapJar>
|
||||||
<outfile>../SimpleApp.exe</outfile>
|
<outfile>../SimpleApp.exe</outfile>
|
||||||
<errTitle>SimpleApp</errTitle>
|
<errTitle>SimpleApp</errTitle>
|
||||||
<chdir>.</chdir>
|
<chdir>.</chdir>
|
||||||
<icon>SimpleApp.ico</icon>
|
<icon>SimpleApp.ico</icon>
|
||||||
<restartOnCrash>true</restartOnCrash>
|
<restartOnCrash>true</restartOnCrash>
|
||||||
<jre>
|
<jre>
|
||||||
<minVersion>1.6.0</minVersion>
|
<path>%JAVA_HOME%;%PATH%</path>
|
||||||
</jre>
|
<minVersion>1.8.0</minVersion>
|
||||||
<splash>
|
</jre>
|
||||||
<file>splash.bmp</file>
|
<splash>
|
||||||
<waitForWindow>true</waitForWindow>
|
<file>splash.bmp</file>
|
||||||
<timeout>60</timeout>
|
<waitForWindow>true</waitForWindow>
|
||||||
<timeoutErr>true</timeoutErr>
|
<timeout>60</timeout>
|
||||||
</splash>
|
<timeoutErr>true</timeoutErr>
|
||||||
|
</splash>
|
||||||
</launch4jConfig>
|
</launch4jConfig>
|
||||||
@@ -1,195 +1,195 @@
|
|||||||
/*
|
/*
|
||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.sf.launch4j.example;
|
package net.sf.launch4j.example;
|
||||||
|
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
import java.awt.Toolkit;
|
import java.awt.Toolkit;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.WindowAdapter;
|
import java.awt.event.WindowAdapter;
|
||||||
import java.awt.event.WindowEvent;
|
import java.awt.event.WindowEvent;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.swing.AbstractAction;
|
import javax.swing.AbstractAction;
|
||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import javax.swing.JMenu;
|
import javax.swing.JMenu;
|
||||||
import javax.swing.JMenuBar;
|
import javax.swing.JMenuBar;
|
||||||
import javax.swing.JMenuItem;
|
import javax.swing.JMenuItem;
|
||||||
import javax.swing.JScrollPane;
|
import javax.swing.JScrollPane;
|
||||||
import javax.swing.JTextArea;
|
import javax.swing.JTextArea;
|
||||||
import javax.swing.UIManager;
|
import javax.swing.UIManager;
|
||||||
|
|
||||||
public class SimpleApp extends JFrame {
|
public class SimpleApp extends JFrame {
|
||||||
public SimpleApp(String[] args) {
|
public SimpleApp(String[] args) {
|
||||||
super("Java Application");
|
super("Java Application");
|
||||||
|
|
||||||
if (args.length == 1 && "throw".equals(args[0])) {
|
if (args.length == 1 && "throw".equals(args[0])) {
|
||||||
throw new IllegalStateException("Exception thrown from SimpleApp.");
|
throw new IllegalStateException("Exception thrown from SimpleApp.");
|
||||||
}
|
}
|
||||||
|
|
||||||
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
|
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
|
||||||
setBounds (screenSize.width / 4, screenSize.height / 4, screenSize.width / 2, screenSize.height / 2);
|
setBounds (screenSize.width / 4, screenSize.height / 4, screenSize.width / 2, screenSize.height / 2);
|
||||||
|
|
||||||
addWindowListener(new WindowAdapter() {
|
addWindowListener(new WindowAdapter() {
|
||||||
public void windowClosing(WindowEvent e) {
|
public void windowClosing(WindowEvent e) {
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}});
|
}});
|
||||||
|
|
||||||
initializeMenu();
|
initializeMenu();
|
||||||
initializeTextArea(args);
|
initializeTextArea(args);
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setLAF() {
|
public static void setLAF() {
|
||||||
JFrame.setDefaultLookAndFeelDecorated(true);
|
JFrame.setDefaultLookAndFeelDecorated(true);
|
||||||
Toolkit.getDefaultToolkit().setDynamicLayout(true);
|
Toolkit.getDefaultToolkit().setDynamicLayout(true);
|
||||||
System.setProperty("sun.awt.noerasebackground","true");
|
System.setProperty("sun.awt.noerasebackground","true");
|
||||||
try {
|
try {
|
||||||
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
|
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.err.println("Failed to set LookAndFeel");
|
System.err.println("Failed to set LookAndFeel");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
setLAF();
|
setLAF();
|
||||||
new SimpleApp(args);
|
new SimpleApp(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final void initializeMenu() {
|
private final void initializeMenu() {
|
||||||
JMenu menu = new JMenu("Exit with code");
|
JMenu menu = new JMenu("Exit with code");
|
||||||
|
|
||||||
menu.add(new JMenuItem(new AbstractAction("Exit with code 0") {
|
menu.add(new JMenuItem(new AbstractAction("Exit with code 0") {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
menu.add(new JMenuItem(new AbstractAction("Exit with code 100 and restart the application") {
|
menu.add(new JMenuItem(new AbstractAction("Exit with code 100 and restart the application") {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
System.exit(100);
|
System.exit(100);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
JMenuBar mb = new JMenuBar();
|
JMenuBar mb = new JMenuBar();
|
||||||
mb.setOpaque(true);
|
mb.setOpaque(true);
|
||||||
mb.add(menu);
|
mb.add(menu);
|
||||||
setJMenuBar(mb);
|
setJMenuBar(mb);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final void initializeTextArea(String[] args) {
|
private final void initializeTextArea(String[] args) {
|
||||||
JTextArea textArea = new JTextArea();
|
JTextArea textArea = new JTextArea();
|
||||||
textArea.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 12));
|
textArea.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 12));
|
||||||
textArea.setEditable(false);
|
textArea.setEditable(false);
|
||||||
|
|
||||||
JScrollPane scrollPane = new JScrollPane();
|
JScrollPane scrollPane = new JScrollPane();
|
||||||
scrollPane.setViewportView(textArea);
|
scrollPane.setViewportView(textArea);
|
||||||
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
||||||
scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
||||||
getContentPane().add(scrollPane);
|
getContentPane().add(scrollPane);
|
||||||
|
|
||||||
textArea.setText(getMainProperties(args));
|
textArea.setText(getMainProperties(args));
|
||||||
textArea.append(getAllProperties());
|
textArea.append(getAllProperties());
|
||||||
textArea.append(getEnvironmentVariables());
|
textArea.append(getEnvironmentVariables());
|
||||||
}
|
}
|
||||||
|
|
||||||
private final String getMainProperties(String[] args) {
|
private final String getMainProperties(String[] args) {
|
||||||
StringBuffer sb = new StringBuffer("Java version: ");
|
StringBuffer sb = new StringBuffer("Java version: ");
|
||||||
sb.append(System.getProperty("java.version"));
|
sb.append(System.getProperty("java.version"));
|
||||||
sb.append("\nJava home: ");
|
sb.append("\nJava home: ");
|
||||||
sb.append(System.getProperty("java.home"));
|
sb.append(System.getProperty("java.home"));
|
||||||
sb.append("\nCurrent dir: ");
|
sb.append("\nCurrent dir: ");
|
||||||
sb.append(System.getProperty("user.dir"));
|
sb.append(System.getProperty("user.dir"));
|
||||||
sb.append("\nCommand line args: {");
|
sb.append("\nCommand line args: {");
|
||||||
|
|
||||||
for (int i = 0; i < args.length; i++) {
|
for (int i = 0; i < args.length; i++) {
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
{
|
{
|
||||||
sb.append(' ');
|
sb.append(' ');
|
||||||
}
|
}
|
||||||
sb.append(args[i]);
|
sb.append(args[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append("}\n");
|
sb.append("}\n");
|
||||||
|
|
||||||
final int mb = 1024 * 1024;
|
final int mb = 1024 * 1024;
|
||||||
sb.append("Free memory (MB): ");
|
sb.append("Free memory (MB): ");
|
||||||
sb.append(Runtime.getRuntime().freeMemory() / mb);
|
sb.append(Runtime.getRuntime().freeMemory() / mb);
|
||||||
sb.append("\nTotal memory (MB): ");
|
sb.append("\nTotal memory (MB): ");
|
||||||
sb.append(Runtime.getRuntime().totalMemory() / mb);
|
sb.append(Runtime.getRuntime().totalMemory() / mb);
|
||||||
sb.append("\nMax memory (MB): ");
|
sb.append("\nMax memory (MB): ");
|
||||||
sb.append(Runtime.getRuntime().maxMemory() / mb);
|
sb.append(Runtime.getRuntime().maxMemory() / mb);
|
||||||
sb.append("\n");
|
sb.append("\n");
|
||||||
|
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private final String getAllProperties() {
|
private final String getAllProperties() {
|
||||||
StringBuffer sb = new StringBuffer("\n========== All properties ==========\n");
|
StringBuffer sb = new StringBuffer("\n========== All properties ==========\n");
|
||||||
|
|
||||||
List<String> keys = new ArrayList<String>();
|
List<String> keys = new ArrayList<String>();
|
||||||
keys.addAll(System.getProperties().stringPropertyNames());
|
keys.addAll(System.getProperties().stringPropertyNames());
|
||||||
Collections.sort(keys);
|
Collections.sort(keys);
|
||||||
|
|
||||||
for (String key : keys) {
|
for (String key : keys) {
|
||||||
sb.append(key);
|
sb.append(key);
|
||||||
sb.append(": ");
|
sb.append(": ");
|
||||||
sb.append(System.getProperty(key));
|
sb.append(System.getProperty(key));
|
||||||
sb.append("\n");
|
sb.append("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private final String getEnvironmentVariables() {
|
private final String getEnvironmentVariables() {
|
||||||
StringBuffer sb = new StringBuffer("\n========== Environment variables ==========\n");
|
StringBuffer sb = new StringBuffer("\n========== Environment variables ==========\n");
|
||||||
|
|
||||||
List<String> keys = new ArrayList<String>();
|
List<String> keys = new ArrayList<String>();
|
||||||
keys.addAll(System.getenv().keySet());
|
keys.addAll(System.getenv().keySet());
|
||||||
Collections.sort(keys);
|
Collections.sort(keys);
|
||||||
|
|
||||||
for (String key : keys) {
|
for (String key : keys) {
|
||||||
sb.append(key);
|
sb.append(key);
|
||||||
sb.append(": ");
|
sb.append(": ");
|
||||||
sb.append(System.getenv(key));
|
sb.append(System.getenv(key));
|
||||||
sb.append("\n");
|
sb.append("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
in the Software without restriction, including without limitation the rights
|
in the Software without restriction, including without limitation the rights
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
furnished to do so, subject to the following conditions:
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
The above copyright notice and this permission notice shall be included in
|
||||||
all copies or substantial portions of the Software.
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
Except as contained in this notice, the name(s) of the above copyright holders
|
Except as contained in this notice, the name(s) of the above copyright holders
|
||||||
shall not be used in advertising or otherwise to promote the sale, use or other
|
shall not be used in advertising or otherwise to promote the sale, use or other
|
||||||
dealings in this Software without prior written authorization.
|
dealings in this Software without prior written authorization.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,26 +1,26 @@
|
|||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
in the Software without restriction, including without limitation the rights
|
in the Software without restriction, including without limitation the rights
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
furnished to do so, subject to the following conditions:
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
The above copyright notice and this permission notice shall be included in
|
||||||
all copies or substantial portions of the Software.
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
Except as contained in this notice, the name(s) of the above copyright holders
|
Except as contained in this notice, the name(s) of the above copyright holders
|
||||||
shall not be used in advertising or otherwise to promote the sale, use or other
|
shall not be used in advertising or otherwise to promote the sale, use or other
|
||||||
dealings in this Software without prior written authorization.
|
dealings in this Software without prior written authorization.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,26 +1,26 @@
|
|||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
in the Software without restriction, including without limitation the rights
|
in the Software without restriction, including without limitation the rights
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
furnished to do so, subject to the following conditions:
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
The above copyright notice and this permission notice shall be included in
|
||||||
all copies or substantial portions of the Software.
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
Except as contained in this notice, the name(s) of the above copyright holders
|
Except as contained in this notice, the name(s) of the above copyright holders
|
||||||
shall not be used in advertising or otherwise to promote the sale, use or other
|
shall not be used in advertising or otherwise to promote the sale, use or other
|
||||||
dealings in this Software without prior written authorization.
|
dealings in this Software without prior written authorization.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|||||||
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
|
# Project: consolehead
|
||||||
# Makefile created by Dev-C++ 4.9.9.2
|
# Makefile created by Dev-C++ 5.7.1
|
||||||
|
|
||||||
CPP = g++.exe
|
CPP = g++.exe
|
||||||
CC = gcc.exe
|
CC = gcc.exe
|
||||||
WINDRES = windres.exe
|
WINDRES = windres.exe
|
||||||
RES =
|
OBJ = ../../head/consolehead.o ../../head/head.o
|
||||||
OBJ = ../../head/consolehead.o ../../head/head.o $(RES)
|
LINKOBJ = ../../head/consolehead.o ../../head/head.o
|
||||||
LINKOBJ = ../../head/consolehead.o ../../head/head.o $(RES)
|
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
|
||||||
LIBS = -L"C:/Dev-Cpp/lib" -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"
|
||||||
INCS = -I"C:/Dev-Cpp/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++"
|
||||||
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
|
||||||
BIN = consolehead.exe
|
CXXFLAGS = $(CXXINCS) -Os
|
||||||
CXXFLAGS = $(CXXINCS) -fexpensive-optimizations -O3
|
CFLAGS = $(INCS) -Os
|
||||||
CFLAGS = $(INCS) -fexpensive-optimizations -O3
|
RM = rm.exe -f
|
||||||
RM = rm -f
|
|
||||||
|
|
||||||
.PHONY: all all-before all-after clean clean-custom
|
.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
|
clean: clean-custom
|
||||||
${RM} $(OBJ) $(BIN)
|
${RM} $(OBJ) $(BIN)
|
||||||
|
|
||||||
$(BIN): $(OBJ)
|
$(BIN): $(OBJ)
|
||||||
# $(CC) $(LINKOBJ) -o "consolehead.exe" $(LIBS)
|
$(CC) $(LINKOBJ) -o $(BIN) $(LIBS)
|
||||||
|
|
||||||
../../head/consolehead.o: consolehead.c
|
../../head/consolehead.o: consolehead.c
|
||||||
$(CC) -c consolehead.c -o ../../head/consolehead.o $(CFLAGS)
|
$(CC) -c consolehead.c -o ../../head/consolehead.o $(CFLAGS)
|
||||||
|
|||||||
@@ -1,97 +1,97 @@
|
|||||||
/*
|
/*
|
||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2007 Grzegorz Kowal
|
Copyright (c) 2004, 2007 Grzegorz Kowal
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
in the Software without restriction, including without limitation the rights
|
in the Software without restriction, including without limitation the rights
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
furnished to do so, subject to the following conditions:
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
The above copyright notice and this permission notice shall be included in
|
||||||
all copies or substantial portions of the Software.
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
Except as contained in this notice, the name(s) of the above copyright holders
|
Except as contained in this notice, the name(s) of the above copyright holders
|
||||||
shall not be used in advertising or otherwise to promote the sale, use or other
|
shall not be used in advertising or otherwise to promote the sale, use or other
|
||||||
dealings in this Software without prior written authorization.
|
dealings in this Software without prior written authorization.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../resource.h"
|
#include "../resource.h"
|
||||||
#include "../head.h"
|
#include "../head.h"
|
||||||
|
|
||||||
extern FILE* hLog;
|
extern FILE* hLog;
|
||||||
|
|
||||||
BOOL restartOnCrash = FALSE;
|
BOOL restartOnCrash = FALSE;
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
setConsoleFlag();
|
setConsoleFlag();
|
||||||
LPTSTR cmdLine = GetCommandLine();
|
LPTSTR cmdLine = GetCommandLine();
|
||||||
|
|
||||||
if (*cmdLine == '"')
|
if (*cmdLine == '"')
|
||||||
{
|
{
|
||||||
if (*(cmdLine = strchr(cmdLine + 1, '"') + 1))
|
if (*(cmdLine = strchr(cmdLine + 1, '"') + 1))
|
||||||
{
|
{
|
||||||
cmdLine++;
|
cmdLine++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ((cmdLine = strchr(cmdLine, ' ')) != NULL)
|
else if ((cmdLine = strchr(cmdLine, ' ')) != NULL)
|
||||||
{
|
{
|
||||||
cmdLine++;
|
cmdLine++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmdLine = "";
|
cmdLine = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
int result = prepare(cmdLine);
|
int result = prepare(cmdLine, FALSE);
|
||||||
|
|
||||||
if (result == ERROR_ALREADY_EXISTS)
|
if (result == ERROR_ALREADY_EXISTS)
|
||||||
{
|
{
|
||||||
char errMsg[BIG_STR] = {0};
|
char errMsg[BIG_STR] = {0};
|
||||||
loadString(INSTANCE_ALREADY_EXISTS_MSG, errMsg);
|
loadString(INSTANCE_ALREADY_EXISTS_MSG, errMsg);
|
||||||
msgBox(errMsg);
|
msgBox(errMsg);
|
||||||
closeLogFile();
|
closeLogFile();
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result != TRUE)
|
if (result != TRUE)
|
||||||
{
|
{
|
||||||
signalError();
|
signalError();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
restartOnCrash = loadBool(RESTART_ON_CRASH);
|
restartOnCrash = loadBool(RESTART_ON_CRASH);
|
||||||
DWORD dwExitCode;
|
DWORD dwExitCode;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
dwExitCode = 0;
|
dwExitCode = 0;
|
||||||
|
|
||||||
if (!execute(TRUE, &dwExitCode))
|
if (!execute(TRUE, &dwExitCode))
|
||||||
{
|
{
|
||||||
signalError();
|
signalError();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (restartOnCrash && dwExitCode != 0)
|
if (restartOnCrash && dwExitCode != 0)
|
||||||
{
|
{
|
||||||
debug("Exit code:\t%d, restarting the application!\n", dwExitCode);
|
debug("Exit code:\t%d, restarting the application!\n", dwExitCode);
|
||||||
}
|
}
|
||||||
} while (restartOnCrash && dwExitCode != 0);
|
} while (restartOnCrash && dwExitCode != 0);
|
||||||
|
|
||||||
debug("Exit code:\t%d\n", dwExitCode);
|
debug("Exit code:\t%d\n", dwExitCode);
|
||||||
closeLogFile();
|
closeLogFile();
|
||||||
return (int) dwExitCode;
|
return (int) dwExitCode;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ FileName=consolehead.dev
|
|||||||
Name=consolehead
|
Name=consolehead
|
||||||
UnitCount=4
|
UnitCount=4
|
||||||
Type=1
|
Type=1
|
||||||
Ver=1
|
Ver=2
|
||||||
ObjFiles=
|
ObjFiles=
|
||||||
Includes=
|
Includes=
|
||||||
Libs=
|
Libs=
|
||||||
@@ -22,12 +22,14 @@ OverrideOutputName=consolehead.exe
|
|||||||
HostApplication=
|
HostApplication=
|
||||||
Folders=
|
Folders=
|
||||||
CommandLine=
|
CommandLine=
|
||||||
UseCustomMakefile=1
|
UseCustomMakefile=0
|
||||||
CustomMakefile=Makefile.win
|
CustomMakefile=Makefile.win
|
||||||
IncludeVersionInfo=0
|
IncludeVersionInfo=0
|
||||||
SupportXPThemes=0
|
SupportXPThemes=0
|
||||||
CompilerSet=0
|
CompilerSet=0
|
||||||
CompilerSettings=0000000001001000000100
|
CompilerSettings=000000d000000000000001000
|
||||||
|
LogOutput=
|
||||||
|
LogOutputEnabled=0
|
||||||
|
|
||||||
[Unit1]
|
[Unit1]
|
||||||
FileName=consolehead.c
|
FileName=consolehead.c
|
||||||
@@ -47,7 +49,7 @@ Build=1
|
|||||||
LanguageID=1033
|
LanguageID=1033
|
||||||
CharsetID=1252
|
CharsetID=1252
|
||||||
CompanyName=
|
CompanyName=
|
||||||
FileVersion=
|
FileVersion=0.1.1.1
|
||||||
FileDescription=Developed using the Dev-C++ IDE
|
FileDescription=Developed using the Dev-C++ IDE
|
||||||
InternalName=
|
InternalName=
|
||||||
LegalCopyright=
|
LegalCopyright=
|
||||||
@@ -56,6 +58,7 @@ OriginalFilename=
|
|||||||
ProductName=
|
ProductName=
|
||||||
ProductVersion=
|
ProductVersion=
|
||||||
AutoIncBuildNr=0
|
AutoIncBuildNr=0
|
||||||
|
SyncProduct=0
|
||||||
|
|
||||||
[Unit2]
|
[Unit2]
|
||||||
FileName=..\resource.h
|
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
|
# Project: guihead
|
||||||
# Makefile created by Dev-C++ 4.9.9.2
|
# Makefile created by Dev-C++ 5.7.1
|
||||||
|
|
||||||
CPP = g++.exe
|
CPP = g++.exe
|
||||||
CC = gcc.exe
|
CC = gcc.exe
|
||||||
WINDRES = windres.exe
|
WINDRES = windres.exe
|
||||||
RES =
|
OBJ = ../../head/guihead.o ../../head/head.o
|
||||||
OBJ = ../../head/guihead.o ../../head/head.o $(RES)
|
LINKOBJ = ../../head/guihead.o ../../head/head.o
|
||||||
LINKOBJ = ../../head/guihead.o ../../head/head.o $(RES)
|
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
|
||||||
LIBS = -L"C:/Dev-Cpp/lib" -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"
|
||||||
INCS = -I"C:/Dev-Cpp/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++"
|
||||||
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
|
||||||
BIN = guihead.exe
|
CXXFLAGS = $(CXXINCS) -Os
|
||||||
CXXFLAGS = $(CXXINCS) -fexpensive-optimizations -O3
|
CFLAGS = $(INCS) -Os
|
||||||
CFLAGS = $(INCS) -fexpensive-optimizations -O3
|
RM = rm.exe -f
|
||||||
RM = rm -f
|
|
||||||
|
|
||||||
.PHONY: all all-before all-after clean clean-custom
|
.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
|
clean: clean-custom
|
||||||
${RM} $(OBJ) $(BIN)
|
${RM} $(OBJ) $(BIN)
|
||||||
|
|
||||||
$(BIN): $(OBJ)
|
$(BIN): $(OBJ)
|
||||||
# $(CC) $(LINKOBJ) -o "guihead.exe" $(LIBS)
|
$(CC) $(LINKOBJ) -o $(BIN) $(LIBS)
|
||||||
|
|
||||||
../../head/guihead.o: guihead.c
|
../../head/guihead.o: guihead.c
|
||||||
$(CC) -c guihead.c -o ../../head/guihead.o $(CFLAGS)
|
$(CC) -c guihead.c -o ../../head/guihead.o $(CFLAGS)
|
||||||
|
|||||||
@@ -1,241 +1,241 @@
|
|||||||
/*
|
/*
|
||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||||
Sylvain Mina (single instance patch)
|
Sylvain Mina (single instance patch)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
in the Software without restriction, including without limitation the rights
|
in the Software without restriction, including without limitation the rights
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
furnished to do so, subject to the following conditions:
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
The above copyright notice and this permission notice shall be included in
|
||||||
all copies or substantial portions of the Software.
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
Except as contained in this notice, the name(s) of the above copyright holders
|
Except as contained in this notice, the name(s) of the above copyright holders
|
||||||
shall not be used in advertising or otherwise to promote the sale, use or other
|
shall not be used in advertising or otherwise to promote the sale, use or other
|
||||||
dealings in this Software without prior written authorization.
|
dealings in this Software without prior written authorization.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../resource.h"
|
#include "../resource.h"
|
||||||
#include "../head.h"
|
#include "../head.h"
|
||||||
#include "guihead.h"
|
#include "guihead.h"
|
||||||
|
|
||||||
extern FILE* hLog;
|
extern FILE* hLog;
|
||||||
extern PROCESS_INFORMATION processInformation;
|
extern PROCESS_INFORMATION processInformation;
|
||||||
|
|
||||||
HWND hWnd;
|
HWND hWnd;
|
||||||
DWORD dwExitCode = 0;
|
DWORD dwExitCode = 0;
|
||||||
BOOL stayAlive = FALSE;
|
BOOL stayAlive = FALSE;
|
||||||
BOOL splash = FALSE;
|
BOOL splash = FALSE;
|
||||||
BOOL splashTimeoutErr;
|
BOOL splashTimeoutErr;
|
||||||
BOOL waitForWindow;
|
BOOL waitForWindow;
|
||||||
BOOL restartOnCrash = FALSE;
|
BOOL restartOnCrash = FALSE;
|
||||||
int splashTimeout = DEFAULT_SPLASH_TIMEOUT;
|
int splashTimeout = DEFAULT_SPLASH_TIMEOUT;
|
||||||
|
|
||||||
int APIENTRY WinMain(HINSTANCE hInstance,
|
int APIENTRY WinMain(HINSTANCE hInstance,
|
||||||
HINSTANCE hPrevInstance,
|
HINSTANCE hPrevInstance,
|
||||||
LPSTR lpCmdLine,
|
LPSTR lpCmdLine,
|
||||||
int nCmdShow)
|
int nCmdShow)
|
||||||
{
|
{
|
||||||
int result = prepare(lpCmdLine);
|
int result = prepare(lpCmdLine, FALSE);
|
||||||
|
|
||||||
if (result == ERROR_ALREADY_EXISTS)
|
if (result == ERROR_ALREADY_EXISTS)
|
||||||
{
|
{
|
||||||
HWND handle = getInstanceWindow();
|
HWND handle = getInstanceWindow();
|
||||||
ShowWindow(handle, SW_SHOW);
|
ShowWindow(handle, SW_SHOW);
|
||||||
SetForegroundWindow(handle);
|
SetForegroundWindow(handle);
|
||||||
closeLogFile();
|
closeLogFile();
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result != TRUE)
|
if (result != TRUE)
|
||||||
{
|
{
|
||||||
signalError();
|
signalError();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
splash = loadBool(SHOW_SPLASH)
|
splash = loadBool(SHOW_SPLASH)
|
||||||
&& strstr(lpCmdLine, "--l4j-no-splash") == NULL;
|
&& strstr(lpCmdLine, "--l4j-no-splash") == NULL;
|
||||||
restartOnCrash = loadBool(RESTART_ON_CRASH);
|
restartOnCrash = loadBool(RESTART_ON_CRASH);
|
||||||
|
|
||||||
// if we should restart on crash, we must also stay alive to check for crashes
|
// if we should restart on crash, we must also stay alive to check for crashes
|
||||||
stayAlive = restartOnCrash ||
|
stayAlive = restartOnCrash ||
|
||||||
(loadBool(GUI_HEADER_STAYS_ALIVE)
|
(loadBool(GUI_HEADER_STAYS_ALIVE)
|
||||||
&& strstr(lpCmdLine, "--l4j-dont-wait") == NULL);
|
&& strstr(lpCmdLine, "--l4j-dont-wait") == NULL);
|
||||||
|
|
||||||
if (splash || stayAlive)
|
if (splash || stayAlive)
|
||||||
{
|
{
|
||||||
hWnd = CreateWindowEx(WS_EX_TOOLWINDOW, "STATIC", "",
|
hWnd = CreateWindowEx(WS_EX_TOOLWINDOW, "STATIC", "",
|
||||||
WS_POPUP | SS_BITMAP,
|
WS_POPUP | SS_BITMAP,
|
||||||
0, 0, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL);
|
0, 0, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL);
|
||||||
if (splash)
|
if (splash)
|
||||||
{
|
{
|
||||||
char timeout[10] = {0};
|
char timeout[10] = {0};
|
||||||
if (loadString(SPLASH_TIMEOUT, timeout))
|
if (loadString(SPLASH_TIMEOUT, timeout))
|
||||||
{
|
{
|
||||||
splashTimeout = atoi(timeout);
|
splashTimeout = atoi(timeout);
|
||||||
if (splashTimeout <= 0 || splashTimeout > MAX_SPLASH_TIMEOUT)
|
if (splashTimeout <= 0 || splashTimeout > MAX_SPLASH_TIMEOUT)
|
||||||
{
|
{
|
||||||
splashTimeout = DEFAULT_SPLASH_TIMEOUT;
|
splashTimeout = DEFAULT_SPLASH_TIMEOUT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
splashTimeout = splashTimeout * 1000; // to millis
|
splashTimeout = splashTimeout * 1000; // to millis
|
||||||
splashTimeoutErr = loadBool(SPLASH_TIMEOUT_ERR)
|
splashTimeoutErr = loadBool(SPLASH_TIMEOUT_ERR)
|
||||||
&& strstr(lpCmdLine, "--l4j-no-splash-err") == NULL;
|
&& strstr(lpCmdLine, "--l4j-no-splash-err") == NULL;
|
||||||
waitForWindow = loadBool(SPLASH_WAITS_FOR_WINDOW);
|
waitForWindow = loadBool(SPLASH_WAITS_FOR_WINDOW);
|
||||||
HANDLE hImage = LoadImage(hInstance, // handle of the instance containing the image
|
HANDLE hImage = LoadImage(hInstance, // handle of the instance containing the image
|
||||||
MAKEINTRESOURCE(SPLASH_BITMAP), // name or identifier of image
|
MAKEINTRESOURCE(SPLASH_BITMAP), // name or identifier of image
|
||||||
IMAGE_BITMAP, // type of image
|
IMAGE_BITMAP, // type of image
|
||||||
0, // desired width
|
0, // desired width
|
||||||
0, // desired height
|
0, // desired height
|
||||||
LR_DEFAULTSIZE);
|
LR_DEFAULTSIZE);
|
||||||
if (hImage == NULL)
|
if (hImage == NULL)
|
||||||
{
|
{
|
||||||
signalError();
|
signalError();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
SendMessage(hWnd, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM) hImage);
|
SendMessage(hWnd, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM) hImage);
|
||||||
RECT rect;
|
RECT rect;
|
||||||
GetWindowRect(hWnd, &rect);
|
GetWindowRect(hWnd, &rect);
|
||||||
int x = (GetSystemMetrics(SM_CXSCREEN) - (rect.right - rect.left)) / 2;
|
int x = (GetSystemMetrics(SM_CXSCREEN) - (rect.right - rect.left)) / 2;
|
||||||
int y = (GetSystemMetrics(SM_CYSCREEN) - (rect.bottom - rect.top)) / 2;
|
int y = (GetSystemMetrics(SM_CYSCREEN) - (rect.bottom - rect.top)) / 2;
|
||||||
SetWindowPos(hWnd, HWND_TOP, x, y, 0, 0, SWP_NOSIZE);
|
SetWindowPos(hWnd, HWND_TOP, x, y, 0, 0, SWP_NOSIZE);
|
||||||
ShowWindow(hWnd, nCmdShow);
|
ShowWindow(hWnd, nCmdShow);
|
||||||
UpdateWindow (hWnd);
|
UpdateWindow (hWnd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (splash || stayAlive)
|
if (splash || stayAlive)
|
||||||
{
|
{
|
||||||
if (!SetTimer (hWnd, ID_TIMER, TIMER_PROC_INTERVAL, TimerProc))
|
if (!SetTimer (hWnd, ID_TIMER, TIMER_PROC_INTERVAL, TimerProc))
|
||||||
{
|
{
|
||||||
signalError();
|
signalError();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!execute(FALSE, &dwExitCode))
|
if (!execute(FALSE, &dwExitCode))
|
||||||
{
|
{
|
||||||
signalError();
|
signalError();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(splash || stayAlive))
|
if (!(splash || stayAlive))
|
||||||
{
|
{
|
||||||
debug("Exit code:\t0\n");
|
debug("Exit code:\t0\n");
|
||||||
closeProcessHandles();
|
closeProcessHandles();
|
||||||
closeLogFile();
|
closeLogFile();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
MSG msg;
|
MSG msg;
|
||||||
while (GetMessage(&msg, NULL, 0, 0))
|
while (GetMessage(&msg, NULL, 0, 0))
|
||||||
{
|
{
|
||||||
TranslateMessage(&msg);
|
TranslateMessage(&msg);
|
||||||
DispatchMessage(&msg);
|
DispatchMessage(&msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (restartOnCrash && dwExitCode != 0)
|
if (restartOnCrash && dwExitCode != 0)
|
||||||
{
|
{
|
||||||
debug("Exit code:\t%d, restarting the application!\n", dwExitCode);
|
debug("Exit code:\t%d, restarting the application!\n", dwExitCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
closeProcessHandles();
|
closeProcessHandles();
|
||||||
} while (restartOnCrash && dwExitCode != 0);
|
} while (restartOnCrash && dwExitCode != 0);
|
||||||
|
|
||||||
debug("Exit code:\t%d\n", dwExitCode);
|
debug("Exit code:\t%d\n", dwExitCode);
|
||||||
closeLogFile();
|
closeLogFile();
|
||||||
return dwExitCode;
|
return dwExitCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
HWND getInstanceWindow()
|
HWND getInstanceWindow()
|
||||||
{
|
{
|
||||||
char windowTitle[STR];
|
char windowTitle[STR];
|
||||||
char instWindowTitle[STR] = {0};
|
char instWindowTitle[STR] = {0};
|
||||||
if (loadString(INSTANCE_WINDOW_TITLE, instWindowTitle))
|
if (loadString(INSTANCE_WINDOW_TITLE, instWindowTitle))
|
||||||
{
|
{
|
||||||
HWND handle = FindWindowEx(NULL, NULL, NULL, NULL);
|
HWND handle = FindWindowEx(NULL, NULL, NULL, NULL);
|
||||||
while (handle != NULL)
|
while (handle != NULL)
|
||||||
{
|
{
|
||||||
GetWindowText(handle, windowTitle, STR - 1);
|
GetWindowText(handle, windowTitle, STR - 1);
|
||||||
if (strstr(windowTitle, instWindowTitle) != NULL)
|
if (strstr(windowTitle, instWindowTitle) != NULL)
|
||||||
{
|
{
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
handle = FindWindowEx(NULL, handle, NULL, NULL);
|
handle = FindWindowEx(NULL, handle, NULL, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CALLBACK enumwndfn(HWND hwnd, LPARAM lParam)
|
BOOL CALLBACK enumwndfn(HWND hwnd, LPARAM lParam)
|
||||||
{
|
{
|
||||||
DWORD processId;
|
DWORD processId;
|
||||||
GetWindowThreadProcessId(hwnd, &processId);
|
GetWindowThreadProcessId(hwnd, &processId);
|
||||||
if (processInformation.dwProcessId == processId)
|
if (processInformation.dwProcessId == processId)
|
||||||
{
|
{
|
||||||
LONG styles = GetWindowLong(hwnd, GWL_STYLE);
|
LONG styles = GetWindowLong(hwnd, GWL_STYLE);
|
||||||
if ((styles & WS_VISIBLE) != 0)
|
if ((styles & WS_VISIBLE) != 0)
|
||||||
{
|
{
|
||||||
splash = FALSE;
|
splash = FALSE;
|
||||||
ShowWindow(hWnd, SW_HIDE);
|
ShowWindow(hWnd, SW_HIDE);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID CALLBACK TimerProc(
|
VOID CALLBACK TimerProc(
|
||||||
HWND hwnd, // handle of window for timer messages
|
HWND hwnd, // handle of window for timer messages
|
||||||
UINT uMsg, // WM_TIMER message
|
UINT uMsg, // WM_TIMER message
|
||||||
UINT idEvent, // timer identifier
|
UINT idEvent, // timer identifier
|
||||||
DWORD dwTime) // current system time
|
DWORD dwTime) // current system time
|
||||||
{
|
{
|
||||||
if (splash)
|
if (splash)
|
||||||
{
|
{
|
||||||
if (splashTimeout == 0)
|
if (splashTimeout == 0)
|
||||||
{
|
{
|
||||||
splash = FALSE;
|
splash = FALSE;
|
||||||
ShowWindow(hWnd, SW_HIDE);
|
ShowWindow(hWnd, SW_HIDE);
|
||||||
if (waitForWindow && splashTimeoutErr)
|
if (waitForWindow && splashTimeoutErr)
|
||||||
{
|
{
|
||||||
KillTimer(hwnd, ID_TIMER);
|
KillTimer(hwnd, ID_TIMER);
|
||||||
signalError();
|
signalError();
|
||||||
PostQuitMessage(0);
|
PostQuitMessage(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
splashTimeout -= TIMER_PROC_INTERVAL;
|
splashTimeout -= TIMER_PROC_INTERVAL;
|
||||||
if (waitForWindow)
|
if (waitForWindow)
|
||||||
{
|
{
|
||||||
EnumWindows(enumwndfn, 0);
|
EnumWindows(enumwndfn, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GetExitCodeProcess(processInformation.hProcess, &dwExitCode);
|
GetExitCodeProcess(processInformation.hProcess, &dwExitCode);
|
||||||
if (dwExitCode != STILL_ACTIVE
|
if (dwExitCode != STILL_ACTIVE
|
||||||
|| !(splash || stayAlive))
|
|| !(splash || stayAlive))
|
||||||
{
|
{
|
||||||
KillTimer(hWnd, ID_TIMER);
|
KillTimer(hWnd, ID_TIMER);
|
||||||
PostQuitMessage(0);
|
PostQuitMessage(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ FileName=guihead.dev
|
|||||||
Name=guihead
|
Name=guihead
|
||||||
UnitCount=5
|
UnitCount=5
|
||||||
Type=0
|
Type=0
|
||||||
Ver=1
|
Ver=2
|
||||||
ObjFiles=
|
ObjFiles=
|
||||||
Includes=
|
Includes=
|
||||||
Libs=
|
Libs=
|
||||||
@@ -22,12 +22,14 @@ OverrideOutputName=guihead.exe
|
|||||||
HostApplication=
|
HostApplication=
|
||||||
Folders=
|
Folders=
|
||||||
CommandLine=
|
CommandLine=
|
||||||
UseCustomMakefile=1
|
UseCustomMakefile=0
|
||||||
CustomMakefile=Makefile.win
|
CustomMakefile=Makefile.win
|
||||||
IncludeVersionInfo=0
|
IncludeVersionInfo=0
|
||||||
SupportXPThemes=0
|
SupportXPThemes=0
|
||||||
CompilerSet=0
|
CompilerSet=0
|
||||||
CompilerSettings=0000000001001000000100
|
CompilerSettings=000000d000000000000001000
|
||||||
|
LogOutput=
|
||||||
|
LogOutputEnabled=0
|
||||||
|
|
||||||
[Unit1]
|
[Unit1]
|
||||||
FileName=guihead.c
|
FileName=guihead.c
|
||||||
@@ -66,6 +68,7 @@ OriginalFilename=
|
|||||||
ProductName=
|
ProductName=
|
||||||
ProductVersion=
|
ProductVersion=
|
||||||
AutoIncBuildNr=0
|
AutoIncBuildNr=0
|
||||||
|
SyncProduct=0
|
||||||
|
|
||||||
[Unit4]
|
[Unit4]
|
||||||
FileName=..\head.h
|
FileName=..\head.h
|
||||||
@@ -95,7 +98,7 @@ Compile=1
|
|||||||
Link=1
|
Link=1
|
||||||
Priority=1000
|
Priority=1000
|
||||||
OverrideBuildCmd=0
|
OverrideBuildCmd=0
|
||||||
BuildCmd=
|
BuildCmd=$(CC) -c head.c -o ../../head/head.o $(CFLAGS)
|
||||||
|
|
||||||
[Unit5]
|
[Unit5]
|
||||||
FileName=..\resource.h
|
FileName=..\resource.h
|
||||||
|
|||||||
@@ -1,44 +1,44 @@
|
|||||||
/*
|
/*
|
||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2007 Grzegorz Kowal
|
Copyright (c) 2004, 2007 Grzegorz Kowal
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
in the Software without restriction, including without limitation the rights
|
in the Software without restriction, including without limitation the rights
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
furnished to do so, subject to the following conditions:
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
The above copyright notice and this permission notice shall be included in
|
||||||
all copies or substantial portions of the Software.
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
Except as contained in this notice, the name(s) of the above copyright holders
|
Except as contained in this notice, the name(s) of the above copyright holders
|
||||||
shall not be used in advertising or otherwise to promote the sale, use or other
|
shall not be used in advertising or otherwise to promote the sale, use or other
|
||||||
dealings in this Software without prior written authorization.
|
dealings in this Software without prior written authorization.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define ID_TIMER 1
|
#define ID_TIMER 1
|
||||||
#define DEFAULT_SPLASH_TIMEOUT 60 /* 60 seconds */
|
#define DEFAULT_SPLASH_TIMEOUT 60 /* 60 seconds */
|
||||||
#define MAX_SPLASH_TIMEOUT 60 * 15 /* 15 minutes */
|
#define MAX_SPLASH_TIMEOUT 60 * 15 /* 15 minutes */
|
||||||
#define TIMER_PROC_INTERVAL 100 /* interval in ms between calls to EnumWindows */
|
#define TIMER_PROC_INTERVAL 100 /* interval in ms between calls to EnumWindows */
|
||||||
|
|
||||||
HWND getInstanceWindow();
|
HWND getInstanceWindow();
|
||||||
|
|
||||||
BOOL CALLBACK enumwndfn(HWND hwnd, LPARAM lParam);
|
BOOL CALLBACK enumwndfn(HWND hwnd, LPARAM lParam);
|
||||||
|
|
||||||
VOID CALLBACK TimerProc(
|
VOID CALLBACK TimerProc(
|
||||||
HWND hwnd, // handle of window for timer messages
|
HWND hwnd, // handle of window for timer messages
|
||||||
UINT uMsg, // WM_TIMER message
|
UINT uMsg, // WM_TIMER message
|
||||||
UINT idEvent, // timer identifier
|
UINT idEvent, // timer identifier
|
||||||
DWORD dwTime // current system time
|
DWORD dwTime // current system time
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
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)
|
Ian Roberts (jdk preference patch)
|
||||||
Sylvain Mina (single instance patch)
|
Sylvain Mina (single instance patch)
|
||||||
|
|
||||||
@@ -37,6 +37,7 @@ FILE* hLog;
|
|||||||
BOOL debugAll = FALSE;
|
BOOL debugAll = FALSE;
|
||||||
BOOL console = FALSE;
|
BOOL console = FALSE;
|
||||||
BOOL wow64 = FALSE;
|
BOOL wow64 = FALSE;
|
||||||
|
BOOL jniHeader = FALSE;
|
||||||
char oldPwd[_MAX_PATH];
|
char oldPwd[_MAX_PATH];
|
||||||
|
|
||||||
PROCESS_INFORMATION processInformation;
|
PROCESS_INFORMATION processInformation;
|
||||||
@@ -51,16 +52,15 @@ struct
|
|||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
int runtimeBits;
|
|
||||||
int foundJava;
|
int foundJava;
|
||||||
BOOL bundledJreAsFallback;
|
BOOL requiresJdk;
|
||||||
|
BOOL requires64Bit;
|
||||||
BOOL corruptedJreFound;
|
BOOL corruptedJreFound;
|
||||||
char originalJavaMinVer[STR];
|
char originalJavaMinVer[STR];
|
||||||
char originalJavaMaxVer[STR];
|
char originalJavaMaxVer[STR];
|
||||||
char javaMinVer[STR];
|
char javaMinVer[STR];
|
||||||
char javaMaxVer[STR];
|
char javaMaxVer[STR];
|
||||||
char foundJavaVer[STR];
|
char foundJavaVer[STR];
|
||||||
char foundJavaKey[_MAX_PATH];
|
|
||||||
char foundJavaHome[_MAX_PATH];
|
char foundJavaHome[_MAX_PATH];
|
||||||
} search;
|
} search;
|
||||||
|
|
||||||
@@ -71,8 +71,9 @@ struct
|
|||||||
char args[MAX_ARGS];
|
char args[MAX_ARGS];
|
||||||
} launcher;
|
} launcher;
|
||||||
|
|
||||||
BOOL initGlobals()
|
BOOL initGlobals(BOOL jni)
|
||||||
{
|
{
|
||||||
|
jniHeader = jni;
|
||||||
hModule = GetModuleHandle(NULL);
|
hModule = GetModuleHandle(NULL);
|
||||||
|
|
||||||
if (hModule == NULL)
|
if (hModule == NULL)
|
||||||
@@ -82,9 +83,9 @@ BOOL initGlobals()
|
|||||||
|
|
||||||
strcpy(error.title, LAUNCH4j);
|
strcpy(error.title, LAUNCH4j);
|
||||||
|
|
||||||
search.runtimeBits = INIT_RUNTIME_BITS;
|
search.foundJava = JAVA_NOT_FOUND;
|
||||||
search.foundJava = NO_JAVA_FOUND;
|
search.requiresJdk = FALSE;
|
||||||
search.bundledJreAsFallback = FALSE;
|
search.requires64Bit = FALSE;
|
||||||
search.corruptedJreFound = FALSE;
|
search.corruptedJreFound = FALSE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -141,7 +142,7 @@ void setWow64Flag()
|
|||||||
fnIsWow64Process(GetCurrentProcess(), &wow64);
|
fnIsWow64Process(GetCurrentProcess(), &wow64);
|
||||||
}
|
}
|
||||||
|
|
||||||
debug("WOW64:\t\t%s\n", wow64 ? "yes" : "no");
|
debug("WOW64:\t\t%s\n", wow64 ? "Yes" : "No");
|
||||||
}
|
}
|
||||||
|
|
||||||
void setConsoleFlag()
|
void setConsoleFlag()
|
||||||
@@ -464,28 +465,23 @@ void regSearch(const char* keyName, const int searchType)
|
|||||||
debug("Check:\t\t%s\n", fullKeyName);
|
debug("Check:\t\t%s\n", fullKeyName);
|
||||||
formatJavaVersion(version, originalVersion);
|
formatJavaVersion(version, originalVersion);
|
||||||
|
|
||||||
if (strcmp(version, search.javaMinVer) >= 0
|
if (isJavaVersionGood(version, wow64KeyMask)
|
||||||
&& (!*search.javaMaxVer || strcmp(version, search.javaMaxVer) <= 0)
|
&& isRegistryJavaHomeValid(fullKeyName, searchType))
|
||||||
&& strcmp(version, search.foundJavaVer) > 0
|
|
||||||
&& isJavaHomeValid(fullKeyName, searchType))
|
|
||||||
{
|
{
|
||||||
strcpy(search.foundJavaVer, version);
|
strcpy(search.foundJavaVer, version);
|
||||||
strcpy(search.foundJavaKey, fullKeyName);
|
|
||||||
search.foundJava = searchType;
|
search.foundJava = searchType;
|
||||||
debug("Match:\t\t%s\n", version);
|
debug("Match:\t\t%s\n", version);
|
||||||
}
|
break;
|
||||||
else
|
|
||||||
{
|
|
||||||
debug("Ignore:\t\t%s\n", version);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
debug("Ignore:\t\t%s\n", version);
|
||||||
versionSize = _MAX_PATH;
|
versionSize = _MAX_PATH;
|
||||||
}
|
}
|
||||||
|
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL isJavaHomeValid(const char* keyName, const int searchType)
|
BOOL isRegistryJavaHomeValid(const char* keyName, const int searchType)
|
||||||
{
|
{
|
||||||
BOOL valid = FALSE;
|
BOOL valid = FALSE;
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
@@ -531,6 +527,7 @@ BOOL isLauncherPathValid(const char* path)
|
|||||||
{
|
{
|
||||||
struct _stat statBuf;
|
struct _stat statBuf;
|
||||||
char launcherPath[_MAX_PATH] = {0};
|
char launcherPath[_MAX_PATH] = {0};
|
||||||
|
char javacPath[_MAX_PATH] = {0};
|
||||||
BOOL result = FALSE;
|
BOOL result = FALSE;
|
||||||
|
|
||||||
if (*path)
|
if (*path)
|
||||||
@@ -538,6 +535,15 @@ BOOL isLauncherPathValid(const char* path)
|
|||||||
strcpy(launcherPath, path);
|
strcpy(launcherPath, path);
|
||||||
appendLauncher(launcherPath);
|
appendLauncher(launcherPath);
|
||||||
result = _stat(launcherPath, &statBuf) == 0;
|
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)
|
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;
|
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:
|
regSearch(keyName, JAVA_FOUND | KEY_WOW64_64KEY);
|
||||||
if (wow64)
|
|
||||||
{
|
|
||||||
regSearch(keyName, searchType | KEY_WOW64_64KEY);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case USE_64_AND_32_BIT_RUNTIME:
|
|
||||||
if (wow64)
|
|
||||||
{
|
|
||||||
regSearch(keyName, searchType | KEY_WOW64_64KEY);
|
|
||||||
|
|
||||||
if ((search.foundJava & KEY_WOW64_64KEY) != NO_JAVA_FOUND)
|
if ((search.foundJava & KEY_WOW64_64KEY) != JAVA_NOT_FOUND)
|
||||||
{
|
{
|
||||||
break;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
regSearch(keyName, searchType);
|
if (!search.requires64Bit)
|
||||||
break;
|
{
|
||||||
|
regSearch(keyName, JAVA_FOUND);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void regSearchJreSdk(const char* jreKeyName, const char* sdkKeyName,
|
BOOL findRegistryJavaHome(char* path)
|
||||||
const int jdkPreference)
|
|
||||||
{
|
{
|
||||||
if (jdkPreference == JDK_ONLY || jdkPreference == PREFER_JDK)
|
debugAll("findRegistryJavaHome()\n");
|
||||||
{
|
if (!search.requiresJdk)
|
||||||
regSearchWow(sdkKeyName, FOUND_SDK);
|
{
|
||||||
if (jdkPreference != JDK_ONLY)
|
regSearchWow("SOFTWARE\\JavaSoft\\Java Runtime Environment");
|
||||||
{
|
|
||||||
regSearchWow(jreKeyName, FOUND_JRE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
regSearchWow("SOFTWARE\\JavaSoft\\Java Development Kit");
|
||||||
{
|
|
||||||
// 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);
|
|
||||||
|
|
||||||
// Java 9 support
|
// Java 9 support
|
||||||
regSearchJreSdk("SOFTWARE\\JavaSoft\\JRE",
|
if (!search.requiresJdk)
|
||||||
"SOFTWARE\\JavaSoft\\JDK",
|
{
|
||||||
jdkPreference);
|
regSearchWow("SOFTWARE\\JavaSoft\\JRE");
|
||||||
|
}
|
||||||
|
regSearchWow("SOFTWARE\\JavaSoft\\JDK");
|
||||||
|
|
||||||
// IBM Java 1.8
|
// IBM Java 1.8
|
||||||
if (search.foundJava == NO_JAVA_FOUND)
|
if (search.foundJava == JAVA_NOT_FOUND)
|
||||||
{
|
{
|
||||||
regSearchJreSdk("SOFTWARE\\IBM\\Java Runtime Environment",
|
if (!search.requiresJdk)
|
||||||
"SOFTWARE\\IBM\\Java Development Kit",
|
{
|
||||||
jdkPreference);
|
regSearchWow("SOFTWARE\\IBM\\Java Runtime Environment");
|
||||||
|
}
|
||||||
|
regSearchWow("SOFTWARE\\IBM\\Java Development Kit");
|
||||||
}
|
}
|
||||||
|
|
||||||
// IBM Java 1.7 and earlier
|
// IBM Java 1.7 and earlier
|
||||||
if (search.foundJava == NO_JAVA_FOUND)
|
if (search.foundJava == JAVA_NOT_FOUND)
|
||||||
{
|
{
|
||||||
regSearchJreSdk("SOFTWARE\\IBM\\Java2 Runtime Environment",
|
if (!search.requiresJdk)
|
||||||
"SOFTWARE\\IBM\\Java Development Kit",
|
{
|
||||||
jdkPreference);
|
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);
|
strcpy(path, search.foundJavaHome);
|
||||||
debug("Runtime used:\t%s (%s-bit)\n", search.foundJavaVer,
|
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;
|
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* dst = src;
|
||||||
char tmpPath[_MAX_PATH] = {0};
|
|
||||||
BOOL is64BitJre = loadBool(BUNDLED_JRE_64_BIT);
|
|
||||||
|
|
||||||
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loadString(JRE_PATH, tmpPath))
|
if (loadString(JRE_PATH, jrePathSpec))
|
||||||
{
|
{
|
||||||
char jrePath[MAX_ARGS] = {0};
|
char jrePath[MAX_ARGS] = {0};
|
||||||
expandVars(jrePath, tmpPath, exePath, pathLen);
|
expandVars(jrePath, jrePathSpec, exePath, pathLen);
|
||||||
debug("Bundled JRE:\t%s\n", jrePath);
|
debug("JRE paths:\t%s\n", jrePath);
|
||||||
|
char* path = strtok(jrePath, ";");
|
||||||
|
|
||||||
|
while (path != NULL)
|
||||||
|
{
|
||||||
|
char pathNoBin[_MAX_PATH] = {0};
|
||||||
|
char *lastBackslash = strrchr(path, '\\');
|
||||||
|
char *lastSlash = strrchr(path, '/');
|
||||||
|
|
||||||
if (jrePath[0] == '\\' || jrePath[1] == ':')
|
if (lastBackslash != NULL && strcasecmp(lastBackslash, "\\bin") == 0)
|
||||||
{
|
{
|
||||||
// Absolute
|
strncpy(pathNoBin, path, lastBackslash - path);
|
||||||
strcpy(launcher.cmd, jrePath);
|
}
|
||||||
}
|
else if (lastSlash != NULL && strcasecmp(lastSlash, "/bin") == 0)
|
||||||
else
|
{
|
||||||
{
|
strncpy(pathNoBin, path, lastSlash - path);
|
||||||
// Relative
|
}
|
||||||
strncpy(launcher.cmd, exePath, pathLen);
|
else
|
||||||
appendPath(launcher.cmd, jrePath);
|
{
|
||||||
}
|
strcpy(pathNoBin, path);
|
||||||
|
}
|
||||||
|
|
||||||
|
removeChar(pathNoBin, '"');
|
||||||
|
|
||||||
if (isLauncherPathValid(launcher.cmd))
|
if (*pathNoBin == '\\' || (*pathNoBin != '\0' && *(pathNoBin + 1) == ':'))
|
||||||
{
|
{
|
||||||
search.foundJava = is64BitJre ? FOUND_BUNDLED | KEY_WOW64_64KEY : FOUND_BUNDLED;
|
// Absolute
|
||||||
strcpy(search.foundJavaHome, launcher.cmd);
|
strcpy(launcher.cmd, pathNoBin);
|
||||||
return TRUE;
|
}
|
||||||
}
|
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL installedJreSearch()
|
BOOL registryJreSearch()
|
||||||
{
|
{
|
||||||
debugAll("installedJreSearch()\n");
|
debugAll("registryJreSearch()\n");
|
||||||
return *search.javaMinVer && findJavaHome(launcher.cmd, loadInt(JDK_PREFERENCE));
|
return *search.javaMinVer && findRegistryJavaHome(launcher.cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void createJreSearchError()
|
void createJreSearchError()
|
||||||
@@ -972,12 +970,9 @@ void createJreSearchError()
|
|||||||
strcat(error.msg, search.originalJavaMaxVer);
|
strcat(error.msg, search.originalJavaMaxVer);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (search.runtimeBits == USE_64_BIT_RUNTIME
|
if (search.requires64Bit)
|
||||||
|| search.runtimeBits == USE_32_BIT_RUNTIME)
|
|
||||||
{
|
{
|
||||||
strcat(error.msg, " (");
|
strcat(error.msg, " (64-bit)");
|
||||||
strcat(error.msg, search.runtimeBits == USE_64_BIT_RUNTIME ? "64" : "32");
|
|
||||||
strcat(error.msg, "-bit)");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (search.corruptedJreFound)
|
if (search.corruptedJreFound)
|
||||||
@@ -995,7 +990,7 @@ void createJreSearchError()
|
|||||||
}
|
}
|
||||||
else
|
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");
|
debugAll("jreSearch()\n");
|
||||||
BOOL result = TRUE;
|
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);
|
loadString(JAVA_MIN_VER, search.originalJavaMinVer);
|
||||||
formatJavaVersion(search.javaMinVer, search.originalJavaMinVer);
|
formatJavaVersion(search.javaMinVer, search.originalJavaMinVer);
|
||||||
debug("Java min ver:\t%s\n", search.javaMinVer);
|
debug("Java min ver:\t%s\n", search.javaMinVer);
|
||||||
@@ -1012,21 +1010,11 @@ BOOL jreSearch(const char *exePath, const int pathLen)
|
|||||||
formatJavaVersion(search.javaMaxVer, search.originalJavaMaxVer);
|
formatJavaVersion(search.javaMaxVer, search.originalJavaMaxVer);
|
||||||
debug("Java max ver:\t%s\n", search.javaMaxVer);
|
debug("Java max ver:\t%s\n", search.javaMaxVer);
|
||||||
|
|
||||||
if (search.bundledJreAsFallback)
|
if (!pathJreSearch(exePath, pathLen))
|
||||||
{
|
{
|
||||||
if (!installedJreSearch())
|
result = registryJreSearch();
|
||||||
{
|
|
||||||
result = bundledJreSearch(exePath, pathLen);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!bundledJreSearch(exePath, pathLen))
|
|
||||||
{
|
|
||||||
result = installedJreSearch();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
createJreSearchError();
|
createJreSearchError();
|
||||||
@@ -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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -1230,6 +1218,7 @@ int prepare(const char *lpCmdLine)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
debug("JNI:\t\t%s\n", jniHeader ? "Yes" : "No");
|
||||||
setWow64Flag();
|
setWow64Flag();
|
||||||
|
|
||||||
// Set default error message, title and optional support web site url.
|
// Set default error message, title and optional support web site url.
|
||||||
@@ -1333,3 +1322,131 @@ const char* getLauncherArgs()
|
|||||||
return launcher.args;
|
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>
|
#include <process.h>
|
||||||
|
|
||||||
#define LAUNCH4j "Launch4j"
|
#define LAUNCH4j "Launch4j"
|
||||||
#define VERSION "3.12"
|
#define VERSION "3.50"
|
||||||
|
|
||||||
#define JRE_VER_MAX_DIGITS_PER_PART 3
|
#define JRE_VER_MAX_DIGITS_PER_PART 3
|
||||||
|
|
||||||
#define NO_JAVA_FOUND 0
|
#define JAVA_NOT_FOUND 0
|
||||||
#define FOUND_JRE 1
|
#define JAVA_FOUND 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 KEY_WOW64_64KEY 0x0100
|
#define KEY_WOW64_64KEY 0x0100
|
||||||
|
|
||||||
@@ -97,7 +84,7 @@
|
|||||||
|
|
||||||
typedef void (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
|
typedef void (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
|
||||||
|
|
||||||
BOOL initGlobals();
|
BOOL initGlobals(BOOL jni);
|
||||||
FILE* openLogFile(const char* exePath, const int pathLen);
|
FILE* openLogFile(const char* exePath, const int pathLen);
|
||||||
void closeLogFile();
|
void closeLogFile();
|
||||||
BOOL initializeLogging(const char *lpCmdLine, const char* exePath, const int pathLen);
|
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);
|
unsigned long bufferLength);
|
||||||
void formatJavaVersion(char* version, const char* originalVersion);
|
void formatJavaVersion(char* version, const char* originalVersion);
|
||||||
void regSearch(const char* keyName, const int searchType);
|
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);
|
BOOL isLauncherPathValid(const char* path);
|
||||||
void regSearchWow(const char* keyName, const int searchType);
|
void regSearchWow(const char* keyName);
|
||||||
void regSearchJreSdk(const char* jreKeyName, const char* sdkKeyName,
|
BOOL findRegistryJavaHome(char* path);
|
||||||
const int jdkPreference);
|
|
||||||
BOOL findJavaHome(char* path, const int jdkPreference);
|
|
||||||
int getExePath(char* exePath);
|
int getExePath(char* exePath);
|
||||||
void appendPath(char* basepath, const char* path);
|
void appendPath(char* basepath, const char* path);
|
||||||
void appendLauncher(char* jrePath);
|
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);
|
void setJvmOptions(char *jvmOptions, const char *exePath);
|
||||||
BOOL createMutex();
|
BOOL createMutex();
|
||||||
void setWorkingDirectory(const char *exePath, const int pathLen);
|
void setWorkingDirectory(const char *exePath, const int pathLen);
|
||||||
BOOL bundledJreSearch(const char *exePath, const int pathLen);
|
void removeChar(char *src, const char toRemove);
|
||||||
BOOL installedJreSearch();
|
BOOL pathJreSearch(const char *exePath, const int pathLen);
|
||||||
|
BOOL registryJreSearch();
|
||||||
void createJreSearchError();
|
void createJreSearchError();
|
||||||
BOOL jreSearch(const char *exePath, const int pathLen);
|
BOOL jreSearch(const char *exePath, const int pathLen);
|
||||||
BOOL appendToPathVar(const char* path);
|
BOOL appendToPathVar(const char* path);
|
||||||
@@ -136,11 +122,15 @@ BOOL appendJreBinToPathVar();
|
|||||||
void setEnvironmentVariables(const char *exePath, const int pathLen);
|
void setEnvironmentVariables(const char *exePath, const int pathLen);
|
||||||
void setMainClassAndClassPath(const char *exePath, const int pathLen);
|
void setMainClassAndClassPath(const char *exePath, const int pathLen);
|
||||||
void setCommandLineArgs(const char *lpCmdLine);
|
void setCommandLineArgs(const char *lpCmdLine);
|
||||||
int prepare(const char *lpCmdLine);
|
int prepare(const char *lpCmdLine, BOOL jni);
|
||||||
void closeProcessHandles();
|
void closeProcessHandles();
|
||||||
BOOL execute(const BOOL wait, DWORD *dwExitCode);
|
BOOL execute(const BOOL wait, DWORD *dwExitCode);
|
||||||
const char* getJavaHome();
|
const char* getJavaHome();
|
||||||
const char* getMainClass();
|
const char* getMainClass();
|
||||||
const char* getLauncherArgs();
|
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_
|
#endif // _LAUNCH4J_HEAD__INCLUDED_
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
/jniconsolehead.exe
|
|
||||||
/jniconsolehead.layout
|
|
||||||
@@ -6,9 +6,9 @@ CC = gcc.exe
|
|||||||
WINDRES = windres.exe
|
WINDRES = windres.exe
|
||||||
OBJ = ../../head_jni_BETA/jniconsolehead.o ../../head_jni_BETA/head.o ../../head_jni_BETA/jnihead.o
|
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
|
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
|
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:/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"
|
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:/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"
|
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
|
BIN = jniconsolehead.exe
|
||||||
CXXFLAGS = $(CXXINCS) -Os
|
CXXFLAGS = $(CXXINCS) -Os
|
||||||
CFLAGS = $(INCS) -Os
|
CFLAGS = $(INCS) -Os
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ int main(int argc, char* argv[])
|
|||||||
cmdLine = "";
|
cmdLine = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
int result = prepare(cmdLine);
|
int result = prepare(cmdLine, TRUE);
|
||||||
|
|
||||||
if (result == ERROR_ALREADY_EXISTS)
|
if (result == ERROR_ALREADY_EXISTS)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ UnitCount=6
|
|||||||
Type=1
|
Type=1
|
||||||
Ver=2
|
Ver=2
|
||||||
ObjFiles=
|
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=
|
Libs=
|
||||||
PrivateResource=
|
PrivateResource=
|
||||||
ResourceIncludes=
|
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
|
WINDRES = windres.exe
|
||||||
OBJ = ../../head_jni_BETA/jniguihead.o ../../head_jni_BETA/head.o ../../head_jni_BETA/jnihead.o
|
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
|
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
|
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:/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"
|
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:/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"
|
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
|
BIN = jniguihead.exe
|
||||||
CXXFLAGS = $(CXXINCS) -Os
|
CXXFLAGS = $(CXXINCS) -Os
|
||||||
CFLAGS = $(INCS) -Os
|
CFLAGS = $(INCS) -Os
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ int APIENTRY WinMain(HINSTANCE hInstance,
|
|||||||
LPSTR lpCmdLine,
|
LPSTR lpCmdLine,
|
||||||
int nCmdShow)
|
int nCmdShow)
|
||||||
{
|
{
|
||||||
int result = prepare(lpCmdLine);
|
int result = prepare(lpCmdLine, TRUE);
|
||||||
|
|
||||||
if (result == ERROR_ALREADY_EXISTS)
|
if (result == ERROR_ALREADY_EXISTS)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ UnitCount=7
|
|||||||
Type=0
|
Type=0
|
||||||
Ver=2
|
Ver=2
|
||||||
ObjFiles=
|
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=
|
Libs=
|
||||||
PrivateResource=
|
PrivateResource=
|
||||||
ResourceIncludes=
|
ResourceIncludes=
|
||||||
|
|||||||
@@ -1,43 +1,43 @@
|
|||||||
/*
|
/*
|
||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2007 Grzegorz Kowal
|
Copyright (c) 2004, 2007 Grzegorz Kowal
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
in the Software without restriction, including without limitation the rights
|
in the Software without restriction, including without limitation the rights
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
furnished to do so, subject to the following conditions:
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
The above copyright notice and this permission notice shall be included in
|
||||||
all copies or substantial portions of the Software.
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
Except as contained in this notice, the name(s) of the above copyright holders
|
Except as contained in this notice, the name(s) of the above copyright holders
|
||||||
shall not be used in advertising or otherwise to promote the sale, use or other
|
shall not be used in advertising or otherwise to promote the sale, use or other
|
||||||
dealings in this Software without prior written authorization.
|
dealings in this Software without prior written authorization.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define ID_TIMER 1
|
#define ID_TIMER 1
|
||||||
#define DEFAULT_SPLASH_TIMEOUT 60 /* 60 seconds */
|
#define DEFAULT_SPLASH_TIMEOUT 60 /* 60 seconds */
|
||||||
#define MAX_SPLASH_TIMEOUT 60 * 15 /* 15 minutes */
|
#define MAX_SPLASH_TIMEOUT 60 * 15 /* 15 minutes */
|
||||||
|
|
||||||
HWND getInstanceWindow();
|
HWND getInstanceWindow();
|
||||||
|
|
||||||
BOOL CALLBACK enumwndfn(HWND hwnd, LPARAM lParam);
|
BOOL CALLBACK enumwndfn(HWND hwnd, LPARAM lParam);
|
||||||
|
|
||||||
VOID CALLBACK TimerProc(
|
VOID CALLBACK TimerProc(
|
||||||
HWND hwnd, // handle of window for timer messages
|
HWND hwnd, // handle of window for timer messages
|
||||||
UINT uMsg, // WM_TIMER message
|
UINT uMsg, // WM_TIMER message
|
||||||
UINT idEvent, // timer identifier
|
UINT idEvent, // timer identifier
|
||||||
DWORD dwTime // current system time
|
DWORD dwTime // current system time
|
||||||
);
|
);
|
||||||
|
|||||||
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
|
||||||
@@ -1,75 +1,72 @@
|
|||||||
/*
|
/*
|
||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2014 Grzegorz Kowal
|
Copyright (c) 2004, 2014 Grzegorz Kowal
|
||||||
Ian Roberts (jdk preference patch)
|
Ian Roberts (jdk preference patch)
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
in the Software without restriction, including without limitation the rights
|
in the Software without restriction, including without limitation the rights
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
furnished to do so, subject to the following conditions:
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
The above copyright notice and this permission notice shall be included in
|
||||||
all copies or substantial portions of the Software.
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
Except as contained in this notice, the name(s) of the above copyright holders
|
Except as contained in this notice, the name(s) of the above copyright holders
|
||||||
shall not be used in advertising or otherwise to promote the sale, use or other
|
shall not be used in advertising or otherwise to promote the sale, use or other
|
||||||
dealings in this Software without prior written authorization.
|
dealings in this Software without prior written authorization.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// ICON
|
// ICON
|
||||||
#define APP_ICON 1
|
#define APP_ICON 1
|
||||||
|
|
||||||
// BITMAP
|
// BITMAP
|
||||||
#define SPLASH_BITMAP 1
|
#define SPLASH_BITMAP 1
|
||||||
|
|
||||||
// RCDATA
|
// RCDATA
|
||||||
#define JRE_PATH 1
|
#define JRE_PATH 1
|
||||||
#define JAVA_MIN_VER 2
|
#define JAVA_MIN_VER 2
|
||||||
#define JAVA_MAX_VER 3
|
#define JAVA_MAX_VER 3
|
||||||
#define SHOW_SPLASH 4
|
#define SHOW_SPLASH 4
|
||||||
#define SPLASH_WAITS_FOR_WINDOW 5
|
#define SPLASH_WAITS_FOR_WINDOW 5
|
||||||
#define SPLASH_TIMEOUT 6
|
#define SPLASH_TIMEOUT 6
|
||||||
#define SPLASH_TIMEOUT_ERR 7
|
#define SPLASH_TIMEOUT_ERR 7
|
||||||
#define CHDIR 8
|
#define CHDIR 8
|
||||||
#define SET_PROC_NAME 9
|
#define ERR_TITLE 10
|
||||||
#define ERR_TITLE 10
|
#define GUI_HEADER_STAYS_ALIVE 11
|
||||||
#define GUI_HEADER_STAYS_ALIVE 11
|
#define JVM_OPTIONS 12
|
||||||
#define JVM_OPTIONS 12
|
#define CMD_LINE 13
|
||||||
#define CMD_LINE 13
|
#define JAR 14
|
||||||
#define JAR 14
|
#define MAIN_CLASS 15
|
||||||
#define MAIN_CLASS 15
|
#define CLASSPATH 16
|
||||||
#define CLASSPATH 16
|
#define WRAPPER 17
|
||||||
#define WRAPPER 17
|
#define REQUIRES_JDK 18
|
||||||
#define JDK_PREFERENCE 18
|
#define ENV_VARIABLES 19
|
||||||
#define ENV_VARIABLES 19
|
#define PRIORITY_CLASS 20
|
||||||
#define PRIORITY_CLASS 20
|
#define DOWNLOAD_URL 21
|
||||||
#define DOWNLOAD_URL 21
|
#define SUPPORT_URL 22
|
||||||
#define SUPPORT_URL 22
|
#define MUTEX_NAME 23
|
||||||
#define MUTEX_NAME 23
|
#define INSTANCE_WINDOW_TITLE 24
|
||||||
#define INSTANCE_WINDOW_TITLE 24
|
#define INITIAL_HEAP_SIZE 25
|
||||||
#define INITIAL_HEAP_SIZE 25
|
#define INITIAL_HEAP_PERCENT 26
|
||||||
#define INITIAL_HEAP_PERCENT 26
|
#define MAX_HEAP_SIZE 27
|
||||||
#define MAX_HEAP_SIZE 27
|
#define MAX_HEAP_PERCENT 28
|
||||||
#define MAX_HEAP_PERCENT 28
|
#define REQUIRES_64_BIT 29
|
||||||
#define BUNDLED_JRE_64_BIT 29
|
#define RESTART_ON_CRASH 31
|
||||||
#define RUNTIME_BITS 30
|
|
||||||
#define RESTART_ON_CRASH 31
|
#define STARTUP_ERR 101
|
||||||
#define BUNDLED_JRE_AS_FALLBACK 32
|
#define JRE_NOT_FOUND_ERR 102
|
||||||
|
#define JRE_VERSION_ERR 103
|
||||||
#define STARTUP_ERR 101
|
#define LAUNCHER_ERR 104
|
||||||
#define BUNDLED_JRE_ERR 102
|
#define INSTANCE_ALREADY_EXISTS_MSG 105
|
||||||
#define JRE_VERSION_ERR 103
|
|
||||||
#define LAUNCHER_ERR 104
|
|
||||||
#define INSTANCE_ALREADY_EXISTS_MSG 105
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
LAUNCH4J="$(dirname "$0")"/launch4j.jar
|
LAUNCH4J="$(dirname "$0")"/launch4j.jar
|
||||||
if [ -n "$JAVA_HOME" ]; then
|
if [ -n "$JAVA_HOME" ]; then
|
||||||
$JAVA_HOME/bin/java -jar "$LAUNCH4J" "$@"
|
$JAVA_HOME/bin/java -jar "$LAUNCH4J" "$@"
|
||||||
else
|
else
|
||||||
java -jar "$LAUNCH4J" "$@"
|
java -jar "$LAUNCH4J" "$@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
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.
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,27 +1,28 @@
|
|||||||
(BSD Style License)
|
(BSD Style License)
|
||||||
|
|
||||||
Copyright (c) 2003-2004, Joe Walnes
|
Copyright (c) 2003-2006, Joe Walnes
|
||||||
All rights reserved.
|
Copyright (c) 2006-2019, XStream Committers
|
||||||
|
All rights reserved.
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
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
|
Redistributions of source code must retain the above copyright notice, this list of
|
||||||
the above copyright notice, this list of conditions and the following disclaimer in
|
conditions and the following disclaimer. Redistributions in binary form must reproduce
|
||||||
the documentation and/or other materials provided with the distribution.
|
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 XStream nor the names of its contributors may be used to endorse
|
|
||||||
or promote products derived from this software without specific prior written
|
Neither the name of XStream nor the names of its contributors may be used to endorse
|
||||||
permission.
|
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
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||||
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
||||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
||||||
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
|
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
|
||||||
DAMAGE.
|
WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
|
DAMAGE.
|
||||||
|
|||||||
@@ -1,201 +1,201 @@
|
|||||||
Apache License
|
Apache License
|
||||||
Version 2.0, January 2004
|
Version 2.0, January 2004
|
||||||
http://www.apache.org/licenses/
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
1. Definitions.
|
1. Definitions.
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
the copyright owner that is granting the License.
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
other entities that control, are controlled by, or are under common
|
other entities that control, are controlled by, or are under common
|
||||||
control with that entity. For the purposes of this definition,
|
control with that entity. For the purposes of this definition,
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
direction or management of such entity, whether by contract or
|
direction or management of such entity, whether by contract or
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
exercising permissions granted by this License.
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
including but not limited to software source code, documentation
|
including but not limited to software source code, documentation
|
||||||
source, and configuration files.
|
source, and configuration files.
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
"Object" form shall mean any form resulting from mechanical
|
||||||
transformation or translation of a Source form, including but
|
transformation or translation of a Source form, including but
|
||||||
not limited to compiled object code, generated documentation,
|
not limited to compiled object code, generated documentation,
|
||||||
and conversions to other media types.
|
and conversions to other media types.
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
Object form, made available under the License, as indicated by a
|
Object form, made available under the License, as indicated by a
|
||||||
copyright notice that is included in or attached to the work
|
copyright notice that is included in or attached to the work
|
||||||
(an example is provided in the Appendix below).
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
"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
|
form, that is based on (or derived from) the Work and for which the
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
of this License, Derivative Works shall not include works that remain
|
of this License, Derivative Works shall not include works that remain
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
the Work and Derivative Works thereof.
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
"Contribution" shall mean any work of authorship, including
|
||||||
the original version of the Work and any modifications or additions
|
the original version of the Work and any modifications or additions
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
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
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
means any form of electronic, verbal, or written communication sent
|
means any form of electronic, verbal, or written communication sent
|
||||||
to the Licensor or its representatives, including but not limited to
|
to the Licensor or its representatives, including but not limited to
|
||||||
communication on electronic mailing lists, source code control systems,
|
communication on electronic mailing lists, source code control systems,
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
excluding communication that is conspicuously marked or otherwise
|
excluding communication that is conspicuously marked or otherwise
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
subsequently incorporated within the Work.
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
Work and such Derivative Works in Source or Object form.
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
(except as stated in this section) patent license to make, have made,
|
(except as stated in this section) patent license to make, have made,
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
where such license applies only to those patent claims licensable
|
where such license applies only to those patent claims licensable
|
||||||
by such Contributor that are necessarily infringed by their
|
by such Contributor that are necessarily infringed by their
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
institute patent litigation against any entity (including a
|
institute patent litigation against any entity (including a
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
or contributory patent infringement, then any patent licenses
|
or contributory patent infringement, then any patent licenses
|
||||||
granted to You under this License for that Work shall terminate
|
granted to You under this License for that Work shall terminate
|
||||||
as of the date such litigation is filed.
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
modifications, and in Source or Object form, provided that You
|
modifications, and in Source or Object form, provided that You
|
||||||
meet the following conditions:
|
meet the following conditions:
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
(a) You must give any other recipients of the Work or
|
||||||
Derivative Works a copy of this License; and
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
(b) You must cause any modified files to carry prominent notices
|
||||||
stating that You changed the files; and
|
stating that You changed the files; and
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
that You distribute, all copyright, patent, trademark, and
|
that You distribute, all copyright, patent, trademark, and
|
||||||
attribution notices from the Source form of the Work,
|
attribution notices from the Source form of the Work,
|
||||||
excluding those notices that do not pertain to any part of
|
excluding those notices that do not pertain to any part of
|
||||||
the Derivative Works; and
|
the Derivative Works; and
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
distribution, then any Derivative Works that You distribute must
|
distribution, then any Derivative Works that You distribute must
|
||||||
include a readable copy of the attribution notices contained
|
include a readable copy of the attribution notices contained
|
||||||
within such NOTICE file, excluding those notices that do not
|
within such NOTICE file, excluding those notices that do not
|
||||||
pertain to any part of the Derivative Works, in at least one
|
pertain to any part of the Derivative Works, in at least one
|
||||||
of the following places: within a NOTICE text file distributed
|
of the following places: within a NOTICE text file distributed
|
||||||
as part of the Derivative Works; within the Source form or
|
as part of the Derivative Works; within the Source form or
|
||||||
documentation, if provided along with the Derivative Works; or,
|
documentation, if provided along with the Derivative Works; or,
|
||||||
within a display generated by the Derivative Works, if and
|
within a display generated by the Derivative Works, if and
|
||||||
wherever such third-party notices normally appear. The contents
|
wherever such third-party notices normally appear. The contents
|
||||||
of the NOTICE file are for informational purposes only and
|
of the NOTICE file are for informational purposes only and
|
||||||
do not modify the License. You may add Your own attribution
|
do not modify the License. You may add Your own attribution
|
||||||
notices within Derivative Works that You distribute, alongside
|
notices within Derivative Works that You distribute, alongside
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
that such additional attribution notices cannot be construed
|
that such additional attribution notices cannot be construed
|
||||||
as modifying the License.
|
as modifying the License.
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
You may add Your own copyright statement to Your modifications and
|
||||||
may provide additional or different license terms and conditions
|
may provide additional or different license terms and conditions
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
the conditions stated in this License.
|
the conditions stated in this License.
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
this License, without any additional terms or conditions.
|
this License, without any additional terms or conditions.
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
the terms of any separate license agreement you may have executed
|
the terms of any separate license agreement you may have executed
|
||||||
with Licensor regarding such Contributions.
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
except as required for reasonable and customary use in describing the
|
except as required for reasonable and customary use in describing the
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
implied, including, without limitation, any warranties or conditions
|
implied, including, without limitation, any warranties or conditions
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
appropriateness of using or redistributing the Work and assume any
|
appropriateness of using or redistributing the Work and assume any
|
||||||
risks associated with Your exercise of permissions under this License.
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
unless required by applicable law (such as deliberate and grossly
|
unless required by applicable law (such as deliberate and grossly
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
liable to You for damages, including any direct, indirect, special,
|
liable to You for damages, including any direct, indirect, special,
|
||||||
incidental, or consequential damages of any character arising as a
|
incidental, or consequential damages of any character arising as a
|
||||||
result of this License or out of the use or inability to use the
|
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 (including but not limited to damages for loss of goodwill,
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
other commercial damages or losses), even if such Contributor
|
other commercial damages or losses), even if such Contributor
|
||||||
has been advised of the possibility of such damages.
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
or other liability obligations and/or rights consistent with this
|
or other liability obligations and/or rights consistent with this
|
||||||
License. However, in accepting such obligations, You may act only
|
License. However, in accepting such obligations, You may act only
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
defend, and hold each Contributor harmless for any liability
|
defend, and hold each Contributor harmless for any liability
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
of your accepting any such warranty or additional liability.
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
To apply the Apache License to your work, attach the following
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
replaced with your own identifying information. (Don't include
|
replaced with your own identifying information. (Don't include
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
comment syntax for the file format. We also recommend that a
|
comment syntax for the file format. We also recommend that a
|
||||||
file or class name and description of purpose be included on the
|
file or class name and description of purpose be included on the
|
||||||
same "printed page" as the copyright notice for easier
|
same "printed page" as the copyright notice for easier
|
||||||
identification within third-party archives.
|
identification within third-party archives.
|
||||||
|
|
||||||
Copyright [yyyy] [name of copyright owner]
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|||||||
BIN
launch4j/lib/ant.jar
LFS
BIN
launch4j/lib/ant.jar
LFS
Binary file not shown.
Binary file not shown.
@@ -1,50 +1,202 @@
|
|||||||
/*
|
|
||||||
|
|
||||||
============================================================================
|
Apache License
|
||||||
The Apache Software License, Version 1.1
|
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-
|
1. Definitions.
|
||||||
tion, are permitted provided that the following conditions are met:
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
this list of conditions and the following disclaimer.
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
the copyright owner that is granting the License.
|
||||||
this list of conditions and the following disclaimer in the documentation
|
|
||||||
and/or other materials provided with the distribution.
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
3. The end-user documentation included with the redistribution, if any, must
|
control with that entity. For the purposes of this definition,
|
||||||
include the following acknowledgment: "This product includes software
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
developed by the Apache Software Foundation (http://www.apache.org/)."
|
direction or management of such entity, whether by contract or
|
||||||
Alternately, this acknowledgment may appear in the software itself, if
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
and wherever such third-party acknowledgments normally appear.
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
used to endorse or promote products derived from this software without
|
exercising permissions granted by this License.
|
||||||
prior written permission. For written permission, please contact
|
|
||||||
apache@apache.org.
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
5. Products derived from this software may not be called "Apache", nor may
|
source, and configuration files.
|
||||||
"Apache" appear in their name, without prior written permission of the
|
|
||||||
Apache Software Foundation.
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
|
not limited to compiled object code, generated documentation,
|
||||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
and conversions to other media types.
|
||||||
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
|
Object form, made available under the License, as indicated by a
|
||||||
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
copyright notice that is included in or attached to the work
|
||||||
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
(an example is provided in the Appendix below).
|
||||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
This software consists of voluntary contributions made by many individuals
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
on behalf of the Apache Software Foundation and was originally created by
|
of this License, Derivative Works shall not include works that remain
|
||||||
Stefano Mazzocchi <stefano@apache.org>. For more information on the Apache
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
Software Foundation, please see <http://www.apache.org/>.
|
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,12 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
<security>
|
<security>
|
||||||
<requestedPrivileges>
|
<requestedPrivileges>
|
||||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||||
<!-- <requestedExecutionLevel level="highestAvailable" uiAccess="false"/> -->
|
<!-- <requestedExecutionLevel level="highestAvailable" uiAccess="false"/> -->
|
||||||
<!-- <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/> -->
|
<!-- <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/> -->
|
||||||
</requestedPrivileges>
|
</requestedPrivileges>
|
||||||
</security>
|
</security>
|
||||||
</trustInfo>
|
</trustInfo>
|
||||||
</assembly>
|
</assembly>
|
||||||
@@ -1,24 +1,24 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src">
|
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="src" output="demo/SimpleApp/build" path="demo/SimpleApp/src"/>
|
<classpathentry kind="src" output="demo/SimpleApp/build" path="demo/SimpleApp/src"/>
|
||||||
<classpathentry kind="src" output="demo/ConsoleApp/build" path="demo/ConsoleApp/src"/>
|
<classpathentry kind="src" output="demo/ConsoleApp/build" path="demo/ConsoleApp/src"/>
|
||||||
|
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
|
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
|
||||||
<id>distribution-libs</id>
|
<id>distribution-libs</id>
|
||||||
<formats>
|
<formats>
|
||||||
<format>dir</format>
|
<format>dir</format>
|
||||||
</formats>
|
</formats>
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
<dependencySets>
|
<dependencySets>
|
||||||
<dependencySet>
|
<dependencySet>
|
||||||
<includes></includes>
|
<includes></includes>
|
||||||
<useProjectArtifact>false</useProjectArtifact>
|
<useProjectArtifact>false</useProjectArtifact>
|
||||||
</dependencySet>
|
</dependencySet>
|
||||||
</dependencySets>
|
</dependencySets>
|
||||||
</assembly>
|
</assembly>
|
||||||
@@ -1,53 +1,53 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
Maven Launch4j Plugin
|
Maven Launch4j Plugin
|
||||||
Copyright (c) 2006 Paul Jungwirth
|
Copyright (c) 2006 Paul Jungwirth
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
-->
|
-->
|
||||||
<assembly>
|
<assembly>
|
||||||
<id>workdir-linux</id>
|
<id>workdir-linux</id>
|
||||||
<formats>
|
<formats>
|
||||||
<format>jar</format>
|
<format>jar</format>
|
||||||
</formats>
|
</formats>
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
<fileSets>
|
<fileSets>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>bin/bin-linux</directory>
|
<directory>bin/bin-linux</directory>
|
||||||
<outputDirectory>${finalName}-workdir-linux/bin</outputDirectory>
|
<outputDirectory>${finalName}-workdir-linux/bin</outputDirectory>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<outputDirectory>${finalName}-workdir-linux</outputDirectory>
|
<outputDirectory>${finalName}-workdir-linux</outputDirectory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>w32api/**/*</include>
|
<include>w32api/**/*</include>
|
||||||
<include>w32api_jni/**/*</include>
|
<include>w32api_jni/**/*</include>
|
||||||
<include>head/**/*</include>
|
<include>head/**/*</include>
|
||||||
<include>head_jni_BETA/**/*</include>
|
<include>head_jni_BETA/**/*</include>
|
||||||
</includes>
|
</includes>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
</fileSets>
|
</fileSets>
|
||||||
</assembly>
|
</assembly>
|
||||||
|
|||||||
@@ -1,53 +1,53 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
Maven Launch4j Plugin
|
Maven Launch4j Plugin
|
||||||
Copyright (c) 2006 Paul Jungwirth
|
Copyright (c) 2006 Paul Jungwirth
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
-->
|
-->
|
||||||
<assembly>
|
<assembly>
|
||||||
<id>workdir-linux64</id>
|
<id>workdir-linux64</id>
|
||||||
<formats>
|
<formats>
|
||||||
<format>jar</format>
|
<format>jar</format>
|
||||||
</formats>
|
</formats>
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
<fileSets>
|
<fileSets>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>bin/bin-linux64</directory>
|
<directory>bin/bin-linux64</directory>
|
||||||
<outputDirectory>${finalName}-workdir-linux64/bin</outputDirectory>
|
<outputDirectory>${finalName}-workdir-linux64/bin</outputDirectory>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<outputDirectory>${finalName}-workdir-linux64</outputDirectory>
|
<outputDirectory>${finalName}-workdir-linux64</outputDirectory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>w32api/**/*</include>
|
<include>w32api/**/*</include>
|
||||||
<include>w32api_jni/**/*</include>
|
<include>w32api_jni/**/*</include>
|
||||||
<include>head/**/*</include>
|
<include>head/**/*</include>
|
||||||
<include>head_jni_BETA/**/*</include>
|
<include>head_jni_BETA/**/*</include>
|
||||||
</includes>
|
</includes>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
</fileSets>
|
</fileSets>
|
||||||
</assembly>
|
</assembly>
|
||||||
|
|||||||
@@ -1,53 +1,53 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
Maven Launch4j Plugin
|
Maven Launch4j Plugin
|
||||||
Copyright (c) 2006 Paul Jungwirth
|
Copyright (c) 2006 Paul Jungwirth
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
-->
|
-->
|
||||||
<assembly>
|
<assembly>
|
||||||
<id>workdir-mac</id>
|
<id>workdir-mac</id>
|
||||||
<formats>
|
<formats>
|
||||||
<format>jar</format>
|
<format>jar</format>
|
||||||
</formats>
|
</formats>
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
<fileSets>
|
<fileSets>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>bin/bin-macosx-x86</directory>
|
<directory>bin/bin-macosx-x86</directory>
|
||||||
<outputDirectory>${finalName}-workdir-mac/bin</outputDirectory>
|
<outputDirectory>${finalName}-workdir-mac/bin</outputDirectory>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<outputDirectory>${finalName}-workdir-mac</outputDirectory>
|
<outputDirectory>${finalName}-workdir-mac</outputDirectory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>w32api/**/*</include>
|
<include>w32api/**/*</include>
|
||||||
<include>w32api_jni/**/*</include>
|
<include>w32api_jni/**/*</include>
|
||||||
<include>head/**/*</include>
|
<include>head/**/*</include>
|
||||||
<include>head_jni_BETA/**/*</include>
|
<include>head_jni_BETA/**/*</include>
|
||||||
</includes>
|
</includes>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
</fileSets>
|
</fileSets>
|
||||||
</assembly>
|
</assembly>
|
||||||
|
|||||||
@@ -1,53 +1,53 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
Maven Launch4j Plugin
|
Maven Launch4j Plugin
|
||||||
Copyright (c) 2006 Paul Jungwirth
|
Copyright (c) 2006 Paul Jungwirth
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
-->
|
-->
|
||||||
<assembly>
|
<assembly>
|
||||||
<id>workdir-win32</id>
|
<id>workdir-win32</id>
|
||||||
<formats>
|
<formats>
|
||||||
<format>jar</format>
|
<format>jar</format>
|
||||||
</formats>
|
</formats>
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
<fileSets>
|
<fileSets>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>bin/bin-win32</directory>
|
<directory>bin/bin-win32</directory>
|
||||||
<outputDirectory>${finalName}-workdir-win32/bin</outputDirectory>
|
<outputDirectory>${finalName}-workdir-win32/bin</outputDirectory>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<outputDirectory>${finalName}-workdir-win32</outputDirectory>
|
<outputDirectory>${finalName}-workdir-win32</outputDirectory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>w32api/**/*</include>
|
<include>w32api/**/*</include>
|
||||||
<include>w32api_jni/**/*</include>
|
<include>w32api_jni/**/*</include>
|
||||||
<include>head/**/*</include>
|
<include>head/**/*</include>
|
||||||
<include>head_jni_BETA/**/*</include>
|
<include>head_jni_BETA/**/*</include>
|
||||||
</includes>
|
</includes>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
</fileSets>
|
</fileSets>
|
||||||
</assembly>
|
</assembly>
|
||||||
|
|||||||
@@ -1,55 +1,55 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
Maven Launch4j Plugin
|
Maven Launch4j Plugin
|
||||||
Copyright (c) 2006 Paul Jungwirth
|
Copyright (c) 2006 Paul Jungwirth
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
-->
|
-->
|
||||||
<assembly>
|
<assembly>
|
||||||
<id>src</id>
|
<id>src</id>
|
||||||
<formats>
|
<formats>
|
||||||
<format>tar.gz</format>
|
<format>tar.gz</format>
|
||||||
<format>zip</format>
|
<format>zip</format>
|
||||||
</formats>
|
</formats>
|
||||||
<fileSets>
|
<fileSets>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<includes>
|
<includes>
|
||||||
<include>README*</include>
|
<include>README*</include>
|
||||||
<include>LICENSE*</include>
|
<include>LICENSE*</include>
|
||||||
<include>NOTICE*</include>
|
<include>NOTICE*</include>
|
||||||
<include>TODO</include>
|
<include>TODO</include>
|
||||||
<include>pom.xml</include>
|
<include>pom.xml</include>
|
||||||
</includes>
|
</includes>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>src</directory>
|
<directory>src</directory>
|
||||||
<excludes>
|
<excludes>
|
||||||
<exclude>**/.*.swp</exclude>
|
<exclude>**/.*.swp</exclude>
|
||||||
</excludes>
|
</excludes>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
</fileSets>
|
</fileSets>
|
||||||
</assembly>
|
</assembly>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
Run once the Ant target switch-to-maven, it will reconfigure the project to use maven.
|
Run once the Ant target switch-to-maven, it will reconfigure the project to use maven.
|
||||||
|
|
||||||
*** Creation of Distribution Release ***
|
*** Creation of Distribution Release ***
|
||||||
Windows: mvn -P dist,win32 clean package
|
Windows: mvn -P dist,win32 clean package
|
||||||
|
|
||||||
Linux: mvn -P dist,linux clean package
|
Linux: mvn -P dist,linux clean package
|
||||||
|
|
||||||
MacOsX: mvn -P dist,macosx-x86 clean package
|
MacOsX: mvn -P dist,macosx-x86 clean package
|
||||||
|
|||||||
@@ -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">
|
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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>net.sf.launch4j</groupId>
|
<groupId>net.sf.launch4j</groupId>
|
||||||
@@ -115,11 +116,6 @@
|
|||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>foxtrot</groupId>
|
|
||||||
<artifactId>foxtrot</artifactId>
|
|
||||||
<version>2.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.jgoodies</groupId>
|
<groupId>com.jgoodies</groupId>
|
||||||
<artifactId>jgoodies-common</artifactId>
|
<artifactId>jgoodies-common</artifactId>
|
||||||
@@ -131,19 +127,19 @@
|
|||||||
<version>1.2.1</version>
|
<version>1.2.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.jgoodies</groupId>
|
<groupId>com.formdev</groupId>
|
||||||
<artifactId>looks</artifactId>
|
<artifactId>flatlaf</artifactId>
|
||||||
<version>2.2.2</version>
|
<version>1.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.thoughtworks.xstream</groupId>
|
<groupId>com.thoughtworks.xstream</groupId>
|
||||||
<artifactId>xstream</artifactId>
|
<artifactId>xstream</artifactId>
|
||||||
<version>1.4.10-java7</version>
|
<version>1.4.15</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.ant</groupId>
|
<groupId>org.apache.ant</groupId>
|
||||||
<artifactId>ant</artifactId>
|
<artifactId>ant</artifactId>
|
||||||
<version>1.8.2</version>
|
<version>1.10.9</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
@@ -161,10 +157,10 @@
|
|||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.1</version>
|
<version>3.8.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.6</source>
|
<source>1.8</source>
|
||||||
<target>1.6</target>
|
<target>1.8</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
@@ -321,7 +317,10 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>2.9.1</version>
|
<version>3.2.0</version>
|
||||||
|
<configuration>
|
||||||
|
<doclint>none</doclint>
|
||||||
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>attach-javadocs</id>
|
<id>attach-javadocs</id>
|
||||||
@@ -381,12 +380,12 @@
|
|||||||
<bin.dir>bin-win32</bin.dir>
|
<bin.dir>bin-win32</bin.dir>
|
||||||
</properties>
|
</properties>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<!-- Creates Launch4j executable -->
|
<!-- Creates Launch4j executable -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>com.akathist.maven.plugins.launch4j</groupId>
|
<groupId>com.akathist.maven.plugins.launch4j</groupId>
|
||||||
<artifactId>launch4j-maven-plugin</artifactId>
|
<artifactId>launch4j-maven-plugin</artifactId>
|
||||||
<version>1.6</version>
|
<version>1.7.25</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>launch4j</id>
|
<id>launch4j</id>
|
||||||
@@ -404,7 +403,7 @@
|
|||||||
<stayAlive>false</stayAlive>
|
<stayAlive>false</stayAlive>
|
||||||
|
|
||||||
<jre>
|
<jre>
|
||||||
<minVersion>1.6.0</minVersion>
|
<minVersion>1.8.0</minVersion>
|
||||||
</jre>
|
</jre>
|
||||||
<versionInfo>
|
<versionInfo>
|
||||||
<fileVersion>${versionNumber}</fileVersion>
|
<fileVersion>${versionNumber}</fileVersion>
|
||||||
@@ -427,7 +426,7 @@
|
|||||||
</profile>
|
</profile>
|
||||||
<!-- Generic distribution profile -->
|
<!-- Generic distribution profile -->
|
||||||
<profile>
|
<profile>
|
||||||
<id>dist</id>
|
<id>dist</id>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<!-- Clean -->
|
<!-- Clean -->
|
||||||
@@ -435,7 +434,7 @@
|
|||||||
<artifactId>maven-clean-plugin</artifactId>
|
<artifactId>maven-clean-plugin</artifactId>
|
||||||
<version>2.6</version>
|
<version>2.6</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<filesets>
|
<filesets>
|
||||||
<fileset>
|
<fileset>
|
||||||
<directory>${basedir}/bin</directory>
|
<directory>${basedir}/bin</directory>
|
||||||
<includes>
|
<includes>
|
||||||
@@ -450,7 +449,7 @@
|
|||||||
<includes>
|
<includes>
|
||||||
<incude>launch4j.exe</incude>
|
<incude>launch4j.exe</incude>
|
||||||
</includes>
|
</includes>
|
||||||
</fileset>
|
</fileset>
|
||||||
<fileset>
|
<fileset>
|
||||||
<directory>${basedir}</directory>
|
<directory>${basedir}</directory>
|
||||||
<includes>
|
<includes>
|
||||||
@@ -505,8 +504,8 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
|
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -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,30 +1,30 @@
|
|||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
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.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
versionNumber=3.12.0.0
|
versionNumber=3.50.0.0
|
||||||
version=3.12
|
version=3.50
|
||||||
|
|||||||
@@ -1,217 +1,217 @@
|
|||||||
/*
|
/*
|
||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Created on 2005-04-24
|
* Created on 2005-04-24
|
||||||
*/
|
*/
|
||||||
package net.sf.launch4j;
|
package net.sf.launch4j;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
import net.sf.launch4j.binding.InvariantViolationException;
|
import net.sf.launch4j.binding.InvariantViolationException;
|
||||||
import net.sf.launch4j.config.Config;
|
import net.sf.launch4j.config.Config;
|
||||||
import net.sf.launch4j.config.ConfigPersister;
|
import net.sf.launch4j.config.ConfigPersister;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Copyright (C) 2005 Grzegorz Kowal
|
* @author Copyright (C) 2005 Grzegorz Kowal
|
||||||
*/
|
*/
|
||||||
public class Builder {
|
public class Builder {
|
||||||
private final Log _log;
|
private final Log _log;
|
||||||
private final File _basedir;
|
private final File _basedir;
|
||||||
|
|
||||||
public Builder(Log log) {
|
public Builder(Log log) {
|
||||||
_log = log;
|
_log = log;
|
||||||
_basedir = Util.getJarBasedir();
|
_basedir = Util.getJarBasedir();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder(Log log, File basedir) {
|
public Builder(Log log, File basedir) {
|
||||||
_log = log;
|
_log = log;
|
||||||
_basedir = basedir;
|
_basedir = basedir;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Output file path.
|
* @return Output file path.
|
||||||
*/
|
*/
|
||||||
public File build() throws BuilderException {
|
public File build() throws BuilderException {
|
||||||
final Config c = ConfigPersister.getInstance().getConfig();
|
final Config c = ConfigPersister.getInstance().getConfig();
|
||||||
try {
|
try {
|
||||||
c.validate();
|
c.validate();
|
||||||
} catch (InvariantViolationException e) {
|
} catch (InvariantViolationException e) {
|
||||||
throw new BuilderException(e.getMessage());
|
throw new BuilderException(e.getMessage());
|
||||||
}
|
}
|
||||||
File rc = null;
|
File rc = null;
|
||||||
File ro = null;
|
File ro = null;
|
||||||
File outfile = null;
|
File outfile = null;
|
||||||
FileInputStream is = null;
|
FileInputStream is = null;
|
||||||
FileOutputStream os = null;
|
FileOutputStream os = null;
|
||||||
final RcBuilder rcb = new RcBuilder();
|
final RcBuilder rcb = new RcBuilder();
|
||||||
try {
|
try {
|
||||||
if (c.isJniApplication()) {
|
if (c.isJniApplication()) {
|
||||||
_log.append("WARNING: Some features are not implemented in JNI headers, see documentation.");
|
_log.append("WARNING: Some features are not implemented in JNI headers, see documentation.");
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = rcb.build(c);
|
rc = rcb.build(c);
|
||||||
ro = Util.createTempFile("o");
|
ro = Util.createTempFile("o");
|
||||||
outfile = ConfigPersister.getInstance().getOutputFile();
|
outfile = ConfigPersister.getInstance().getOutputFile();
|
||||||
|
|
||||||
Cmd resCmd = new Cmd(_basedir);
|
Cmd resCmd = new Cmd(_basedir);
|
||||||
resCmd.addExe("windres")
|
resCmd.addExe("windres")
|
||||||
.add(Util.WINDOWS_OS ? "--preprocessor=type" : "--preprocessor=cat")
|
.add(Util.WINDOWS_OS ? "--preprocessor=type" : "--preprocessor=cat")
|
||||||
.add("-J rc -O coff -F pe-i386")
|
.add("-J rc -O coff -F pe-i386")
|
||||||
.addAbsFile(rc)
|
.addAbsFile(rc)
|
||||||
.addAbsFile(ro);
|
.addAbsFile(ro);
|
||||||
_log.append(Messages.getString("Builder.compiling.resources"));
|
_log.append(Messages.getString("Builder.compiling.resources"));
|
||||||
resCmd.exec(_log);
|
resCmd.exec(_log);
|
||||||
|
|
||||||
Cmd ldCmd = new Cmd(_basedir);
|
Cmd ldCmd = new Cmd(_basedir);
|
||||||
ldCmd.addExe("ld")
|
ldCmd.addExe("ld")
|
||||||
.add("-mi386pe")
|
.add("-mi386pe")
|
||||||
.add("--oformat pei-i386")
|
.add("--oformat pei-i386")
|
||||||
.add("--dynamicbase")
|
.add("--dynamicbase")
|
||||||
.add("--nxcompat")
|
.add("--nxcompat")
|
||||||
.add("--no-seh")
|
.add("--no-seh")
|
||||||
.add(c.isGuiApplication() ? "--subsystem windows" : "--subsystem console")
|
.add(c.isGuiApplication() ? "--subsystem windows" : "--subsystem console")
|
||||||
.add("-s") // strip symbols
|
.add("-s") // strip symbols
|
||||||
.addFiles(c.getHeaderObjects())
|
.addFiles(c.getHeaderObjects())
|
||||||
.addAbsFile(ro)
|
.addAbsFile(ro)
|
||||||
.addFiles(c.getLibs())
|
.addFiles(c.getLibs())
|
||||||
.add("-o")
|
.add("-o")
|
||||||
.addAbsFile(outfile);
|
.addAbsFile(outfile);
|
||||||
_log.append(Messages.getString("Builder.linking"));
|
_log.append(Messages.getString("Builder.linking"));
|
||||||
ldCmd.exec(_log);
|
ldCmd.exec(_log);
|
||||||
|
|
||||||
if (!c.isDontWrapJar()) {
|
if (!c.isDontWrapJar()) {
|
||||||
_log.append(Messages.getString("Builder.wrapping"));
|
_log.append(Messages.getString("Builder.wrapping"));
|
||||||
int len;
|
int len;
|
||||||
byte[] buffer = new byte[1024];
|
byte[] buffer = new byte[1024];
|
||||||
is = new FileInputStream(Util.getAbsoluteFile(
|
is = new FileInputStream(Util.getAbsoluteFile(
|
||||||
ConfigPersister.getInstance().getConfigPath(), c.getJar()));
|
ConfigPersister.getInstance().getConfigPath(), c.getJar()));
|
||||||
os = new FileOutputStream(outfile, true);
|
os = new FileOutputStream(outfile, true);
|
||||||
while ((len = is.read(buffer)) > 0) {
|
while ((len = is.read(buffer)) > 0) {
|
||||||
os.write(buffer, 0, len);
|
os.write(buffer, 0, len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_log.append(Messages.getString("Builder.success") + outfile.getPath());
|
_log.append(Messages.getString("Builder.success") + outfile.getPath());
|
||||||
return outfile;
|
return outfile;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Util.delete(outfile);
|
Util.delete(outfile);
|
||||||
_log.append(e.getMessage());
|
_log.append(e.getMessage());
|
||||||
throw new BuilderException(e);
|
throw new BuilderException(e);
|
||||||
} catch (ExecException e) {
|
} catch (ExecException e) {
|
||||||
Util.delete(outfile);
|
Util.delete(outfile);
|
||||||
String msg = e.getMessage();
|
String msg = e.getMessage();
|
||||||
if (msg != null && msg.indexOf("windres") != -1) {
|
if (msg != null && msg.indexOf("windres") != -1) {
|
||||||
if (e.getErrLine() != -1) {
|
if (e.getErrLine() != -1) {
|
||||||
_log.append(Messages.getString("Builder.line.has.errors",
|
_log.append(Messages.getString("Builder.line.has.errors",
|
||||||
String.valueOf(e.getErrLine())));
|
String.valueOf(e.getErrLine())));
|
||||||
_log.append(rcb.getLine(e.getErrLine()));
|
_log.append(rcb.getLine(e.getErrLine()));
|
||||||
} else {
|
} else {
|
||||||
_log.append(Messages.getString("Builder.generated.resource.file"));
|
_log.append(Messages.getString("Builder.generated.resource.file"));
|
||||||
_log.append(rcb.getContent());
|
_log.append(rcb.getContent());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw new BuilderException(e);
|
throw new BuilderException(e);
|
||||||
} finally {
|
} finally {
|
||||||
Util.close(is);
|
Util.close(is);
|
||||||
Util.close(os);
|
Util.close(os);
|
||||||
Util.delete(rc);
|
Util.delete(rc);
|
||||||
Util.delete(ro);
|
Util.delete(ro);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Cmd {
|
class Cmd {
|
||||||
private final List<String> _cmd = new ArrayList<String>();
|
private final List<String> _cmd = new ArrayList<String>();
|
||||||
private final File _basedir;
|
private final File _basedir;
|
||||||
private final File _bindir;
|
private final File _bindir;
|
||||||
|
|
||||||
public Cmd(File basedir) {
|
public Cmd(File basedir) {
|
||||||
_basedir = basedir;
|
_basedir = basedir;
|
||||||
String path = System.getProperty("launch4j.bindir");
|
String path = System.getProperty("launch4j.bindir");
|
||||||
|
|
||||||
if (path == null) {
|
if (path == null) {
|
||||||
_bindir = new File(basedir, "bin");
|
_bindir = new File(basedir, "bin");
|
||||||
} else {
|
} else {
|
||||||
File bindir = new File(path);
|
File bindir = new File(path);
|
||||||
_bindir = bindir.isAbsolute() ? bindir : new File(basedir, path);
|
_bindir = bindir.isAbsolute() ? bindir : new File(basedir, path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Cmd add(String s) {
|
public Cmd add(String s) {
|
||||||
StringTokenizer st = new StringTokenizer(s);
|
StringTokenizer st = new StringTokenizer(s);
|
||||||
|
|
||||||
while (st.hasMoreTokens()) {
|
while (st.hasMoreTokens()) {
|
||||||
_cmd.add(st.nextToken());
|
_cmd.add(st.nextToken());
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Cmd addAbsFile(File file) {
|
public Cmd addAbsFile(File file) {
|
||||||
_cmd.add(file.getPath());
|
_cmd.add(file.getPath());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Cmd addFile(String pathname) {
|
public Cmd addFile(String pathname) {
|
||||||
_cmd.add(new File(_basedir, pathname).getPath());
|
_cmd.add(new File(_basedir, pathname).getPath());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Cmd addExe(String pathname) {
|
public Cmd addExe(String pathname) {
|
||||||
if (Util.WINDOWS_OS) {
|
if (Util.WINDOWS_OS) {
|
||||||
pathname += ".exe";
|
pathname += ".exe";
|
||||||
}
|
}
|
||||||
|
|
||||||
_cmd.add(new File(_bindir, pathname).getPath());
|
_cmd.add(new File(_bindir, pathname).getPath());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Cmd addFiles(List<String> files) {
|
public Cmd addFiles(List<String> files) {
|
||||||
for (String f : files) {
|
for (String f : files) {
|
||||||
addFile(f);
|
addFile(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void exec(Log log) throws ExecException {
|
public void exec(Log log) throws ExecException {
|
||||||
String[] cmd = (String[]) _cmd.toArray(new String[_cmd.size()]);
|
String[] cmd = (String[]) _cmd.toArray(new String[_cmd.size()]);
|
||||||
Util.exec(cmd, log);
|
Util.exec(cmd, log);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,52 +1,52 @@
|
|||||||
/*
|
/*
|
||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Created on May 13, 2005
|
* Created on May 13, 2005
|
||||||
*/
|
*/
|
||||||
package net.sf.launch4j;
|
package net.sf.launch4j;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Copyright (C) 2005 Grzegorz Kowal
|
* @author Copyright (C) 2005 Grzegorz Kowal
|
||||||
*/
|
*/
|
||||||
public class BuilderException extends Exception {
|
public class BuilderException extends Exception {
|
||||||
public BuilderException() {}
|
public BuilderException() {}
|
||||||
|
|
||||||
public BuilderException(Throwable t) {
|
public BuilderException(Throwable t) {
|
||||||
super(t);
|
super(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
public BuilderException(String msg) {
|
public BuilderException(String msg) {
|
||||||
super(msg);
|
super(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,66 +1,66 @@
|
|||||||
/*
|
/*
|
||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Created on May 14, 2005
|
* Created on May 14, 2005
|
||||||
*/
|
*/
|
||||||
package net.sf.launch4j;
|
package net.sf.launch4j;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Copyright (C) 2005 Grzegorz Kowal
|
* @author Copyright (C) 2005 Grzegorz Kowal
|
||||||
*/
|
*/
|
||||||
public class ExecException extends Exception {
|
public class ExecException extends Exception {
|
||||||
private final int _errLine;
|
private final int _errLine;
|
||||||
|
|
||||||
public ExecException(Throwable t, int errLine) {
|
public ExecException(Throwable t, int errLine) {
|
||||||
super(t);
|
super(t);
|
||||||
_errLine = errLine;
|
_errLine = errLine;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExecException(Throwable t) {
|
public ExecException(Throwable t) {
|
||||||
this(t, -1);
|
this(t, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExecException(String msg, int errLine) {
|
public ExecException(String msg, int errLine) {
|
||||||
super(msg);
|
super(msg);
|
||||||
_errLine = errLine;
|
_errLine = errLine;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ExecException(String msg) {
|
public ExecException(String msg) {
|
||||||
this(msg, -1);
|
this(msg, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getErrLine() {
|
public int getErrLine() {
|
||||||
return _errLine;
|
return _errLine;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,76 +1,76 @@
|
|||||||
/*
|
/*
|
||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Created on 2004-01-15
|
* Created on 2004-01-15
|
||||||
*/
|
*/
|
||||||
package net.sf.launch4j;
|
package net.sf.launch4j;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
import javax.swing.filechooser.FileFilter;
|
import javax.swing.filechooser.FileFilter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Copyright (C) 2004 Grzegorz Kowal
|
* @author Copyright (C) 2004 Grzegorz Kowal
|
||||||
*/
|
*/
|
||||||
public class FileChooserFilter extends FileFilter {
|
public class FileChooserFilter extends FileFilter {
|
||||||
String _description;
|
String _description;
|
||||||
String[] _extensions;
|
String[] _extensions;
|
||||||
|
|
||||||
public FileChooserFilter(String description, String extension) {
|
public FileChooserFilter(String description, String extension) {
|
||||||
_description = description;
|
_description = description;
|
||||||
_extensions = new String[] {extension};
|
_extensions = new String[] {extension};
|
||||||
}
|
}
|
||||||
|
|
||||||
public FileChooserFilter(String description, String[] extensions) {
|
public FileChooserFilter(String description, String[] extensions) {
|
||||||
_description = description;
|
_description = description;
|
||||||
_extensions = extensions;
|
_extensions = extensions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean accept(File f) {
|
public boolean accept(File f) {
|
||||||
if (f.isDirectory()) {
|
if (f.isDirectory()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
String ext = Util.getExtension(f);
|
String ext = Util.getExtension(f);
|
||||||
for (int i = 0; i < _extensions.length; i++) {
|
for (int i = 0; i < _extensions.length; i++) {
|
||||||
if (ext.toLowerCase().equals(_extensions[i].toLowerCase())) {
|
if (ext.toLowerCase().equals(_extensions[i].toLowerCase())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return _description;
|
return _description;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,86 +1,86 @@
|
|||||||
/*
|
/*
|
||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2013 toshimm
|
Copyright (c) 2013 toshimm
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
package net.sf.launch4j;
|
package net.sf.launch4j;
|
||||||
|
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author toshimm (2013)
|
* @author toshimm (2013)
|
||||||
*
|
*
|
||||||
* This class makes Japanese Kanji characters in MS932 charcode escaped
|
* This class makes Japanese Kanji characters in MS932 charcode escaped
|
||||||
* in octal form.
|
* in octal form.
|
||||||
*/
|
*/
|
||||||
public class KanjiEscapeOutputStream extends OutputStream {
|
public class KanjiEscapeOutputStream extends OutputStream {
|
||||||
|
|
||||||
protected OutputStream parent;
|
protected OutputStream parent;
|
||||||
|
|
||||||
public KanjiEscapeOutputStream(OutputStream out) {
|
public KanjiEscapeOutputStream(OutputStream out) {
|
||||||
this.parent = out;
|
this.parent = out;
|
||||||
}
|
}
|
||||||
|
|
||||||
private final int MASK = 0x000000FF;
|
private final int MASK = 0x000000FF;
|
||||||
private boolean state = true;
|
private boolean state = true;
|
||||||
|
|
||||||
public void write(int b) throws IOException {
|
public void write(int b) throws IOException {
|
||||||
b = b & MASK;
|
b = b & MASK;
|
||||||
|
|
||||||
if (state) {
|
if (state) {
|
||||||
if (0x00 <= b && b <= 0x7f) {
|
if (0x00 <= b && b <= 0x7f) {
|
||||||
this.parent.write(b);
|
this.parent.write(b);
|
||||||
} else {
|
} else {
|
||||||
this.octprint(b);
|
this.octprint(b);
|
||||||
if ((0x81 <= b && b <= 0x9f) || (0xe0 <= b && b <= 0xfc)) {
|
if ((0x81 <= b && b <= 0x9f) || (0xe0 <= b && b <= 0xfc)) {
|
||||||
this.state = false;
|
this.state = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((0x40 <= b && b <= 0x7e) || (0x80 <= b && b <= 0xfc)) {
|
if ((0x40 <= b && b <= 0x7e) || (0x80 <= b && b <= 0xfc)) {
|
||||||
this.octprint(b);
|
this.octprint(b);
|
||||||
} else if (0x00 <= b && b <= 0x7f) {
|
} else if (0x00 <= b && b <= 0x7f) {
|
||||||
this.parent.write(b);
|
this.parent.write(b);
|
||||||
} else {
|
} else {
|
||||||
this.octprint(b);
|
this.octprint(b);
|
||||||
}
|
}
|
||||||
this.state = true;
|
this.state = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void octprint(int b) throws IOException {
|
private void octprint(int b) throws IOException {
|
||||||
String oct = "\\" + String.format("%o", b & MASK);
|
String oct = "\\" + String.format("%o", b & MASK);
|
||||||
for (int i = 0; i < oct.length(); ++i) {
|
for (int i = 0; i < oct.length(); ++i) {
|
||||||
int bb = oct.charAt(i);
|
int bb = oct.charAt(i);
|
||||||
this.parent.write(bb);
|
this.parent.write(bb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,105 +1,105 @@
|
|||||||
/*
|
/*
|
||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Created on May 12, 2005
|
* Created on May 12, 2005
|
||||||
*/
|
*/
|
||||||
package net.sf.launch4j;
|
package net.sf.launch4j;
|
||||||
|
|
||||||
import javax.swing.JTextArea;
|
import javax.swing.JTextArea;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Copyright (C) 2005 Grzegorz Kowal
|
* @author Copyright (C) 2005 Grzegorz Kowal
|
||||||
*/
|
*/
|
||||||
public abstract class Log {
|
public abstract class Log {
|
||||||
private static final Log _consoleLog = new ConsoleLog();
|
private static final Log _consoleLog = new ConsoleLog();
|
||||||
private static final Log _antLog = new AntLog();
|
private static final Log _antLog = new AntLog();
|
||||||
|
|
||||||
public abstract void clear();
|
public abstract void clear();
|
||||||
public abstract void append(String line);
|
public abstract void append(String line);
|
||||||
|
|
||||||
public static Log getConsoleLog() {
|
public static Log getConsoleLog() {
|
||||||
return _consoleLog;
|
return _consoleLog;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Log getAntLog() {
|
public static Log getAntLog() {
|
||||||
return _antLog;
|
return _antLog;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Log getSwingLog(JTextArea textArea) {
|
public static Log getSwingLog(JTextArea textArea) {
|
||||||
return new SwingLog(textArea);
|
return new SwingLog(textArea);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ConsoleLog extends Log {
|
class ConsoleLog extends Log {
|
||||||
public void clear() {
|
public void clear() {
|
||||||
System.out.println("\n");
|
System.out.println("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void append(String line) {
|
public void append(String line) {
|
||||||
System.out.println("launch4j: " + line);
|
System.out.println("launch4j: " + line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AntLog extends Log {
|
class AntLog extends Log {
|
||||||
public void clear() {
|
public void clear() {
|
||||||
System.out.println("\n");
|
System.out.println("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void append(String line) {
|
public void append(String line) {
|
||||||
System.out.println(line);
|
System.out.println(line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class SwingLog extends Log {
|
class SwingLog extends Log {
|
||||||
private final JTextArea _textArea;
|
private final JTextArea _textArea;
|
||||||
|
|
||||||
public SwingLog(JTextArea textArea) {
|
public SwingLog(JTextArea textArea) {
|
||||||
_textArea = textArea;
|
_textArea = textArea;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void clear() {
|
public void clear() {
|
||||||
SwingUtilities.invokeLater(new Runnable() {
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
_textArea.setText("");
|
_textArea.setText("");
|
||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void append(final String line) {
|
public void append(final String line) {
|
||||||
SwingUtilities.invokeLater(new Runnable() {
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
_textArea.append(line + "\n");
|
_textArea.append(line + "\n");
|
||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,95 +1,95 @@
|
|||||||
/*
|
/*
|
||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Created on Apr 21, 2005
|
* Created on Apr 21, 2005
|
||||||
*/
|
*/
|
||||||
package net.sf.launch4j;
|
package net.sf.launch4j;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import net.sf.launch4j.config.ConfigPersister;
|
import net.sf.launch4j.config.ConfigPersister;
|
||||||
import net.sf.launch4j.formimpl.MainFrame;
|
import net.sf.launch4j.formimpl.MainFrame;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Copyright (C) 2005 Grzegorz Kowal
|
* @author Copyright (C) 2005 Grzegorz Kowal
|
||||||
*/
|
*/
|
||||||
public class Main {
|
public class Main {
|
||||||
private static String _name;
|
private static String _name;
|
||||||
private static String _description;
|
private static String _description;
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
try {
|
try {
|
||||||
Properties props = Util.getProperties();
|
Properties props = Util.getProperties();
|
||||||
setDescription(props);
|
setDescription(props);
|
||||||
|
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
ConfigPersister.getInstance().createBlank();
|
ConfigPersister.getInstance().createBlank();
|
||||||
MainFrame.createInstance();
|
MainFrame.createInstance();
|
||||||
} else if (args.length == 1 && !args[0].startsWith("-")) {
|
} else if (args.length == 1 && !args[0].startsWith("-")) {
|
||||||
ConfigPersister.getInstance().load(new File(args[0]));
|
ConfigPersister.getInstance().load(new File(args[0]));
|
||||||
Builder b = new Builder(Log.getConsoleLog());
|
Builder b = new Builder(Log.getConsoleLog());
|
||||||
b.build();
|
b.build();
|
||||||
} else {
|
} else {
|
||||||
System.out.println(_description
|
System.out.println(_description
|
||||||
+ Messages.getString("Main.usage")
|
+ Messages.getString("Main.usage")
|
||||||
+ ": launch4j config.xml");
|
+ ": launch4j config.xml");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.getConsoleLog().append(e.getMessage());
|
Log.getConsoleLog().append(e.getMessage());
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getName() {
|
public static String getName() {
|
||||||
return _name;
|
return _name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getDescription() {
|
public static String getDescription() {
|
||||||
return _description;
|
return _description;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void setDescription(Properties props) {
|
private static void setDescription(Properties props) {
|
||||||
_name = "Launch4j " + props.getProperty("version");
|
_name = "Launch4j " + props.getProperty("version");
|
||||||
_description = _name +
|
_description = _name +
|
||||||
" (http://launch4j.sourceforge.net/)\n" +
|
" (http://launch4j.sourceforge.net/)\n" +
|
||||||
"Cross-platform Java application wrapper" +
|
"Cross-platform Java application wrapper" +
|
||||||
" for creating Windows native executables.\n\n" +
|
" 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" +
|
"Launch4j comes with ABSOLUTELY NO WARRANTY.\n" +
|
||||||
"This is free software, licensed under the BSD License.\n" +
|
"This is free software, licensed under the BSD License.\n" +
|
||||||
"This product includes software developed by the Apache Software Foundation" +
|
"This product includes software developed by the Apache Software Foundation" +
|
||||||
" (http://www.apache.org/).";
|
" (http://www.apache.org/).";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,78 +1,78 @@
|
|||||||
/*
|
/*
|
||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.sf.launch4j;
|
package net.sf.launch4j;
|
||||||
|
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.MissingResourceException;
|
import java.util.MissingResourceException;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
public class Messages {
|
public class Messages {
|
||||||
private static final String BUNDLE_NAME = "net.sf.launch4j.messages";
|
private static final String BUNDLE_NAME = "net.sf.launch4j.messages";
|
||||||
|
|
||||||
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
|
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
|
||||||
.getBundle(BUNDLE_NAME);
|
.getBundle(BUNDLE_NAME);
|
||||||
private static final MessageFormat FORMATTER = new MessageFormat("");
|
private static final MessageFormat FORMATTER = new MessageFormat("");
|
||||||
|
|
||||||
private Messages() {
|
private Messages() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getString(String key) {
|
public static String getString(String key) {
|
||||||
try {
|
try {
|
||||||
return RESOURCE_BUNDLE.getString(key);
|
return RESOURCE_BUNDLE.getString(key);
|
||||||
} catch (MissingResourceException e) {
|
} catch (MissingResourceException e) {
|
||||||
return '!' + key + '!';
|
return '!' + key + '!';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getString(String key, String arg0) {
|
public static String getString(String key, String arg0) {
|
||||||
return getString(key, new Object[] {arg0});
|
return getString(key, new Object[] {arg0});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getString(String key, String arg0, String arg1) {
|
public static String getString(String key, String arg0, String arg1) {
|
||||||
return getString(key, new Object[] {arg0, arg1});
|
return getString(key, new Object[] {arg0, arg1});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getString(String key, String arg0, String arg1, String arg2) {
|
public static String getString(String key, String arg0, String arg1, String arg2) {
|
||||||
return getString(key, new Object[] {arg0, arg1, arg2});
|
return getString(key, new Object[] {arg0, arg1, arg2});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getString(String key, Object[] args) {
|
public static String getString(String key, Object[] args) {
|
||||||
try {
|
try {
|
||||||
FORMATTER.applyPattern(RESOURCE_BUNDLE.getString(key));
|
FORMATTER.applyPattern(RESOURCE_BUNDLE.getString(key));
|
||||||
return FORMATTER.format(args);
|
return FORMATTER.format(args);
|
||||||
} catch (MissingResourceException e) {
|
} catch (MissingResourceException e) {
|
||||||
return '!' + key + '!';
|
return '!' + key + '!';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,420 +1,415 @@
|
|||||||
/*
|
/*
|
||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Created on 2005-04-24
|
* Created on 2005-04-24
|
||||||
*/
|
*/
|
||||||
package net.sf.launch4j;
|
package net.sf.launch4j;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.FileWriter;
|
import java.io.IOException;
|
||||||
import java.io.IOException;
|
import java.io.OutputStreamWriter;
|
||||||
import java.io.OutputStreamWriter;
|
import java.util.List;
|
||||||
import java.util.List;
|
|
||||||
|
import net.sf.launch4j.config.CharsetID;
|
||||||
import net.sf.launch4j.config.CharsetID;
|
import net.sf.launch4j.config.Config;
|
||||||
import net.sf.launch4j.config.Config;
|
import net.sf.launch4j.config.ConfigPersister;
|
||||||
import net.sf.launch4j.config.ConfigPersister;
|
import net.sf.launch4j.config.Jre;
|
||||||
import net.sf.launch4j.config.Jre;
|
import net.sf.launch4j.config.Msg;
|
||||||
import net.sf.launch4j.config.Msg;
|
import net.sf.launch4j.config.Splash;
|
||||||
import net.sf.launch4j.config.Splash;
|
import net.sf.launch4j.config.VersionInfo;
|
||||||
import net.sf.launch4j.config.VersionInfo;
|
|
||||||
|
/**
|
||||||
/**
|
* @author Copyright (C) 2022 Grzegorz Kowal
|
||||||
* @author Copyright (C) 2005 Grzegorz Kowal
|
*/
|
||||||
*/
|
public class RcBuilder {
|
||||||
public class RcBuilder {
|
|
||||||
|
// winnt.h
|
||||||
// winnt.h
|
public static final int LANG_NEUTRAL = 0;
|
||||||
public static final int LANG_NEUTRAL = 0;
|
public static final int SUBLANG_NEUTRAL = 0;
|
||||||
public static final int SUBLANG_NEUTRAL = 0;
|
public static final int SUBLANG_DEFAULT = 1;
|
||||||
public static final int SUBLANG_DEFAULT = 1;
|
public static final int SUBLANG_SYS_DEFAULT = 2;
|
||||||
public static final int SUBLANG_SYS_DEFAULT = 2;
|
|
||||||
|
// MANIFEST
|
||||||
// MANIFEST
|
public static final int MANIFEST = 1;
|
||||||
public static final int MANIFEST = 1;
|
|
||||||
|
// ICON
|
||||||
// ICON
|
public static final int APP_ICON = 1;
|
||||||
public static final int APP_ICON = 1;
|
|
||||||
|
// BITMAP
|
||||||
// BITMAP
|
public static final int SPLASH_BITMAP = 1;
|
||||||
public static final int SPLASH_BITMAP = 1;
|
|
||||||
|
// RCDATA
|
||||||
// RCDATA
|
public static final int JRE_PATH = 1;
|
||||||
public static final int JRE_PATH = 1;
|
public static final int JAVA_MIN_VER = 2;
|
||||||
public static final int JAVA_MIN_VER = 2;
|
public static final int JAVA_MAX_VER = 3;
|
||||||
public static final int JAVA_MAX_VER = 3;
|
public static final int SHOW_SPLASH = 4;
|
||||||
public static final int SHOW_SPLASH = 4;
|
public static final int SPLASH_WAITS_FOR_WINDOW = 5;
|
||||||
public static final int SPLASH_WAITS_FOR_WINDOW = 5;
|
public static final int SPLASH_TIMEOUT = 6;
|
||||||
public static final int SPLASH_TIMEOUT = 6;
|
public static final int SPLASH_TIMEOUT_ERR = 7;
|
||||||
public static final int SPLASH_TIMEOUT_ERR = 7;
|
public static final int CHDIR = 8;
|
||||||
public static final int CHDIR = 8;
|
public static final int ERR_TITLE = 10;
|
||||||
public static final int ERR_TITLE = 10;
|
public static final int GUI_HEADER_STAYS_ALIVE = 11;
|
||||||
public static final int GUI_HEADER_STAYS_ALIVE = 11;
|
public static final int JVM_OPTIONS = 12;
|
||||||
public static final int JVM_OPTIONS = 12;
|
public static final int CMD_LINE = 13;
|
||||||
public static final int CMD_LINE = 13;
|
public static final int JAR = 14;
|
||||||
public static final int JAR = 14;
|
public static final int MAIN_CLASS = 15;
|
||||||
public static final int MAIN_CLASS = 15;
|
public static final int CLASSPATH = 16;
|
||||||
public static final int CLASSPATH = 16;
|
public static final int WRAPPER = 17;
|
||||||
public static final int WRAPPER = 17;
|
public static final int REQUIRES_JDK = 18;
|
||||||
public static final int JDK_PREFERENCE = 18;
|
public static final int ENV_VARIABLES = 19;
|
||||||
public static final int ENV_VARIABLES = 19;
|
public static final int PRIORITY_CLASS = 20;
|
||||||
public static final int PRIORITY_CLASS = 20;
|
public static final int DOWNLOAD_URL = 21;
|
||||||
public static final int DOWNLOAD_URL = 21;
|
public static final int SUPPORT_URL = 22;
|
||||||
public static final int SUPPORT_URL = 22;
|
public static final int MUTEX_NAME = 23;
|
||||||
public static final int MUTEX_NAME = 23;
|
public static final int INSTANCE_WINDOW_TITLE = 24;
|
||||||
public static final int INSTANCE_WINDOW_TITLE = 24;
|
public static final int INITIAL_HEAP_SIZE = 25;
|
||||||
public static final int INITIAL_HEAP_SIZE = 25;
|
public static final int INITIAL_HEAP_PERCENT = 26;
|
||||||
public static final int INITIAL_HEAP_PERCENT = 26;
|
public static final int MAX_HEAP_SIZE = 27;
|
||||||
public static final int MAX_HEAP_SIZE = 27;
|
public static final int MAX_HEAP_PERCENT = 28;
|
||||||
public static final int MAX_HEAP_PERCENT = 28;
|
public static final int REQUIRES_64_BIT = 29;
|
||||||
public static final int BUNDLED_JRE_64_BIT = 29;
|
public static final int RESTART_ON_CRASH = 31;
|
||||||
public static final int RUNTIME_BITS = 30;
|
|
||||||
public static final int RESTART_ON_CRASH = 31;
|
public static final int STARTUP_ERR = 101;
|
||||||
public static final int BUNDLED_JRE_AS_FALLBACK = 32;
|
public static final int JRE_NOT_FOUND_ERR = 102;
|
||||||
|
public static final int JRE_VERSION_ERR = 103;
|
||||||
public static final int STARTUP_ERR = 101;
|
public static final int LAUNCHER_ERR = 104;
|
||||||
public static final int BUNDLED_JRE_ERR = 102;
|
public static final int INSTANCE_ALREADY_EXISTS_MSG = 105;
|
||||||
public static final int JRE_VERSION_ERR = 103;
|
|
||||||
public static final int LAUNCHER_ERR = 104;
|
private final StringBuffer _sb = new StringBuffer();
|
||||||
public static final int INSTANCE_ALREADY_EXISTS_MSG = 105;
|
|
||||||
|
public String getContent() {
|
||||||
private final StringBuffer _sb = new StringBuffer();
|
return _sb.toString();
|
||||||
|
}
|
||||||
public String getContent() {
|
|
||||||
return _sb.toString();
|
public String getLine(int line) {
|
||||||
}
|
return _sb.toString().split("\n")[line - 1];
|
||||||
|
}
|
||||||
public String getLine(int line) {
|
|
||||||
return _sb.toString().split("\n")[line - 1];
|
public File build(Config c) throws IOException {
|
||||||
}
|
_sb.append("LANGUAGE ");
|
||||||
|
_sb.append(LANG_NEUTRAL);
|
||||||
public File build(Config c) throws IOException {
|
_sb.append(", ");
|
||||||
_sb.append("LANGUAGE ");
|
_sb.append(SUBLANG_DEFAULT);
|
||||||
_sb.append(LANG_NEUTRAL);
|
_sb.append('\n');
|
||||||
_sb.append(", ");
|
addVersionInfo(c.getVersionInfo());
|
||||||
_sb.append(SUBLANG_DEFAULT);
|
addJre(c.getJre());
|
||||||
_sb.append('\n');
|
addManifest(MANIFEST, c.getManifest());
|
||||||
addVersionInfo(c.getVersionInfo());
|
addIcon(APP_ICON, c.getIcon());
|
||||||
addJre(c.getJre());
|
addText(ERR_TITLE, c.getErrTitle());
|
||||||
addManifest(MANIFEST, c.getManifest());
|
addText(DOWNLOAD_URL, c.getDownloadUrl());
|
||||||
addIcon(APP_ICON, c.getIcon());
|
addText(SUPPORT_URL, c.getSupportUrl());
|
||||||
addText(ERR_TITLE, c.getErrTitle());
|
addText(CMD_LINE, c.getCmdLine());
|
||||||
addText(DOWNLOAD_URL, c.getDownloadUrl());
|
addWindowsPath(CHDIR, c.getChdir());
|
||||||
addText(SUPPORT_URL, c.getSupportUrl());
|
addText(PRIORITY_CLASS, String.valueOf(c.getPriorityClass()));
|
||||||
addText(CMD_LINE, c.getCmdLine());
|
addTrue(GUI_HEADER_STAYS_ALIVE, c.isStayAlive());
|
||||||
addWindowsPath(CHDIR, c.getChdir());
|
addTrue(RESTART_ON_CRASH, c.isRestartOnCrash());
|
||||||
addText(PRIORITY_CLASS, String.valueOf(c.getPriorityClass()));
|
addSplash(c.getSplash());
|
||||||
addTrue(GUI_HEADER_STAYS_ALIVE, c.isStayAlive());
|
addMessages(c);
|
||||||
addTrue(RESTART_ON_CRASH, c.isRestartOnCrash());
|
|
||||||
addSplash(c.getSplash());
|
if (c.getSingleInstance() != null) {
|
||||||
addMessages(c);
|
addText(MUTEX_NAME, c.getSingleInstance().getMutexName());
|
||||||
|
addText(INSTANCE_WINDOW_TITLE, c.getSingleInstance().getWindowTitle());
|
||||||
if (c.getSingleInstance() != null) {
|
}
|
||||||
addText(MUTEX_NAME, c.getSingleInstance().getMutexName());
|
|
||||||
addText(INSTANCE_WINDOW_TITLE, c.getSingleInstance().getWindowTitle());
|
if (c.getVariables() != null && !c.getVariables().isEmpty()) {
|
||||||
}
|
StringBuffer vars = new StringBuffer();
|
||||||
|
append(vars, c.getVariables(), "\t");
|
||||||
if (c.getVariables() != null && !c.getVariables().isEmpty()) {
|
addText(ENV_VARIABLES, vars.toString());
|
||||||
StringBuffer vars = new StringBuffer();
|
}
|
||||||
append(vars, c.getVariables(), "\t");
|
|
||||||
addText(ENV_VARIABLES, vars.toString());
|
// MAIN_CLASS / JAR
|
||||||
}
|
addTrue(WRAPPER, !c.isDontWrapJar());
|
||||||
|
|
||||||
// MAIN_CLASS / JAR
|
if (c.getClassPath() != null) {
|
||||||
addTrue(WRAPPER, !c.isDontWrapJar());
|
addText(MAIN_CLASS, c.getClassPath().getMainClass());
|
||||||
|
addWindowsPath(CLASSPATH, c.getClassPath().getPathsString());
|
||||||
if (c.getClassPath() != null) {
|
}
|
||||||
addText(MAIN_CLASS, c.getClassPath().getMainClass());
|
|
||||||
addWindowsPath(CLASSPATH, c.getClassPath().getPathsString());
|
if (c.isDontWrapJar() && c.getJar() != null) {
|
||||||
}
|
addWindowsPath(JAR, c.getJar().getPath());
|
||||||
|
}
|
||||||
if (c.isDontWrapJar() && c.getJar() != null) {
|
|
||||||
addWindowsPath(JAR, c.getJar().getPath());
|
File file = Util.createTempFile("rc");
|
||||||
}
|
|
||||||
|
if ("MS932".equals(System.getProperty("file.encoding"))) {
|
||||||
File file = Util.createTempFile("rc");
|
writeKanjiResourceFile(file);
|
||||||
|
} else {
|
||||||
if ("MS932".equals(System.getProperty("file.encoding"))) {
|
writeResourceFile(file);
|
||||||
writeKanjiResourceFile(file);
|
}
|
||||||
} else {
|
|
||||||
writeResourceFile(file);
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
return file;
|
private void writeResourceFile(File file) throws IOException {
|
||||||
}
|
FileOutputStream os = null;
|
||||||
|
OutputStreamWriter osw = null;
|
||||||
private void writeResourceFile(File file) throws IOException {
|
BufferedWriter w = null;
|
||||||
FileOutputStream os = null;
|
|
||||||
OutputStreamWriter osw = null;
|
try {
|
||||||
BufferedWriter w = null;
|
os = new FileOutputStream(file);
|
||||||
|
osw = new OutputStreamWriter(os, "ISO-8859-1");
|
||||||
try {
|
w = new BufferedWriter(osw);
|
||||||
os = new FileOutputStream(file);
|
w.write(_sb.toString());
|
||||||
osw = new OutputStreamWriter(os, "ISO-8859-1");
|
} finally {
|
||||||
w = new BufferedWriter(osw);
|
Util.close(w);
|
||||||
w.write(_sb.toString());
|
Util.close(osw);
|
||||||
} finally {
|
Util.close(os);
|
||||||
Util.close(w);
|
}
|
||||||
Util.close(osw);
|
}
|
||||||
Util.close(os);
|
|
||||||
}
|
/**
|
||||||
}
|
* Handle Japanese encoding - by toshimm.
|
||||||
|
*/
|
||||||
/**
|
private void writeKanjiResourceFile(File file) throws IOException {
|
||||||
* Handle Japanese encoding - by toshimm.
|
FileOutputStream output = null;
|
||||||
*/
|
KanjiEscapeOutputStream kanji = null;
|
||||||
private void writeKanjiResourceFile(File file) throws IOException {
|
OutputStreamWriter writer = null;
|
||||||
FileOutputStream output = null;
|
BufferedWriter w = null;
|
||||||
KanjiEscapeOutputStream kanji = null;
|
|
||||||
OutputStreamWriter writer = null;
|
try {
|
||||||
BufferedWriter w = null;
|
output = new FileOutputStream(file);
|
||||||
|
kanji = new KanjiEscapeOutputStream(output);
|
||||||
try {
|
writer = new OutputStreamWriter(kanji);
|
||||||
output = new FileOutputStream(file);
|
w = new BufferedWriter(writer);
|
||||||
kanji = new KanjiEscapeOutputStream(output);
|
w.write(_sb.toString());
|
||||||
writer = new OutputStreamWriter(kanji);
|
} finally {
|
||||||
w = new BufferedWriter(writer);
|
Util.close(w);
|
||||||
w.write(_sb.toString());
|
Util.close(writer);
|
||||||
} finally {
|
Util.close(kanji);
|
||||||
Util.close(w);
|
Util.close(output);
|
||||||
Util.close(writer);
|
}
|
||||||
Util.close(kanji);
|
}
|
||||||
Util.close(output);
|
|
||||||
}
|
private void addVersionInfo(VersionInfo v) {
|
||||||
}
|
if (v == null) {
|
||||||
|
return;
|
||||||
private void addVersionInfo(VersionInfo v) {
|
}
|
||||||
if (v == null) {
|
|
||||||
return;
|
_sb.append("1 VERSIONINFO\n");
|
||||||
}
|
_sb.append("FILEVERSION ");
|
||||||
|
_sb.append(v.getFileVersion().replaceAll("\\.", ", "));
|
||||||
_sb.append("1 VERSIONINFO\n");
|
_sb.append("\nPRODUCTVERSION ");
|
||||||
_sb.append("FILEVERSION ");
|
_sb.append(v.getProductVersion().replaceAll("\\.", ", "));
|
||||||
_sb.append(v.getFileVersion().replaceAll("\\.", ", "));
|
_sb.append("\nFILEFLAGSMASK 0\n" +
|
||||||
_sb.append("\nPRODUCTVERSION ");
|
"FILEOS 0x40000\n" +
|
||||||
_sb.append(v.getProductVersion().replaceAll("\\.", ", "));
|
"FILETYPE 1\n" +
|
||||||
_sb.append("\nFILEFLAGSMASK 0\n" +
|
"{\n" +
|
||||||
"FILEOS 0x40000\n" +
|
" BLOCK \"StringFileInfo\"\n" +
|
||||||
"FILETYPE 1\n" +
|
" {\n" +
|
||||||
"{\n" +
|
" BLOCK \"");
|
||||||
" BLOCK \"StringFileInfo\"\n" +
|
_sb.append(String.format("%04X%04X", v.getLanguage().getId(), CharsetID.MULTILINGUAL.getId()));
|
||||||
" {\n" +
|
_sb.append("\"\n" +
|
||||||
" BLOCK \"");
|
" {\n");
|
||||||
_sb.append(String.format("%04X%04X", v.getLanguage().getId(), CharsetID.MULTILINGUAL.getId()));
|
|
||||||
_sb.append("\"\n" +
|
addVerBlockValue("CompanyName", v.getCompanyName());
|
||||||
" {\n");
|
addVerBlockValue("FileDescription", v.getFileDescription());
|
||||||
|
addVerBlockValue("FileVersion", v.getTxtFileVersion());
|
||||||
addVerBlockValue("CompanyName", v.getCompanyName());
|
addVerBlockValue("InternalName", v.getInternalName());
|
||||||
addVerBlockValue("FileDescription", v.getFileDescription());
|
addVerBlockValue("LegalCopyright", v.getCopyright());
|
||||||
addVerBlockValue("FileVersion", v.getTxtFileVersion());
|
addVerBlockValue("LegalTrademarks", v.getTrademarks());
|
||||||
addVerBlockValue("InternalName", v.getInternalName());
|
addVerBlockValue("OriginalFilename", v.getOriginalFilename());
|
||||||
addVerBlockValue("LegalCopyright", v.getCopyright());
|
addVerBlockValue("ProductName", v.getProductName());
|
||||||
addVerBlockValue("LegalTrademarks", v.getTrademarks());
|
addVerBlockValue("ProductVersion", v.getTxtProductVersion());
|
||||||
addVerBlockValue("OriginalFilename", v.getOriginalFilename());
|
_sb.append(" }\n }\nBLOCK \"VarFileInfo\"\n{\nVALUE \"Translation\", ");
|
||||||
addVerBlockValue("ProductName", v.getProductName());
|
_sb.append(String.format("0x%04X, 0x%04X", v.getLanguage().getId(), CharsetID.MULTILINGUAL.getId()));
|
||||||
addVerBlockValue("ProductVersion", v.getTxtProductVersion());
|
_sb.append("\n}\n}");
|
||||||
_sb.append(" }\n }\nBLOCK \"VarFileInfo\"\n{\nVALUE \"Translation\", ");
|
}
|
||||||
_sb.append(String.format("0x%04X, 0x%04X", v.getLanguage().getId(), CharsetID.MULTILINGUAL.getId()));
|
|
||||||
_sb.append("\n}\n}");
|
private void addJre(Jre jre) {
|
||||||
}
|
addWindowsPath(JRE_PATH, jre.getPath());
|
||||||
|
addTrue(REQUIRES_JDK, jre.getRequiresJdk());
|
||||||
private void addJre(Jre jre) {
|
addTrue(REQUIRES_64_BIT, jre.getRequires64Bit());
|
||||||
addWindowsPath(JRE_PATH, jre.getPath());
|
addText(JAVA_MIN_VER, jre.getMinVersion());
|
||||||
addTrue(BUNDLED_JRE_64_BIT, jre.getBundledJre64Bit());
|
addText(JAVA_MAX_VER, jre.getMaxVersion());
|
||||||
addTrue(BUNDLED_JRE_AS_FALLBACK, jre.getBundledJreAsFallback());
|
|
||||||
addText(JAVA_MIN_VER, jre.getMinVersion());
|
addInteger(INITIAL_HEAP_SIZE, jre.getInitialHeapSize());
|
||||||
addText(JAVA_MAX_VER, jre.getMaxVersion());
|
addInteger(INITIAL_HEAP_PERCENT, jre.getInitialHeapPercent());
|
||||||
addText(JDK_PREFERENCE, String.valueOf(jre.getJdkPreferenceIndex()));
|
addInteger(MAX_HEAP_SIZE, jre.getMaxHeapSize());
|
||||||
|
addInteger(MAX_HEAP_PERCENT, jre.getMaxHeapPercent());
|
||||||
addInteger(RUNTIME_BITS, jre.getRuntimeBitsIndex() + 1);
|
|
||||||
addInteger(INITIAL_HEAP_SIZE, jre.getInitialHeapSize());
|
StringBuffer options = new StringBuffer();
|
||||||
addInteger(INITIAL_HEAP_PERCENT, jre.getInitialHeapPercent());
|
|
||||||
addInteger(MAX_HEAP_SIZE, jre.getMaxHeapSize());
|
if (jre.getOptions() != null && !jre.getOptions().isEmpty()) {
|
||||||
addInteger(MAX_HEAP_PERCENT, jre.getMaxHeapPercent());
|
addSpace(options);
|
||||||
|
append(options, jre.getOptions(), " ");
|
||||||
StringBuffer options = new StringBuffer();
|
}
|
||||||
|
|
||||||
if (jre.getOptions() != null && !jre.getOptions().isEmpty()) {
|
addText(JVM_OPTIONS, options.toString());
|
||||||
addSpace(options);
|
}
|
||||||
append(options, jre.getOptions(), " ");
|
|
||||||
}
|
private void addSplash(Splash splash) {
|
||||||
|
if (splash == null) {
|
||||||
addText(JVM_OPTIONS, options.toString());
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addSplash(Splash splash) {
|
addTrue(SHOW_SPLASH, true);
|
||||||
if (splash == null) {
|
addTrue(SPLASH_WAITS_FOR_WINDOW, splash.getWaitForWindow());
|
||||||
return;
|
addText(SPLASH_TIMEOUT, String.valueOf(splash.getTimeout()));
|
||||||
}
|
addTrue(SPLASH_TIMEOUT_ERR, splash.isTimeoutErr());
|
||||||
|
addBitmap(SPLASH_BITMAP, splash.getFile());
|
||||||
addTrue(SHOW_SPLASH, true);
|
}
|
||||||
addTrue(SPLASH_WAITS_FOR_WINDOW, splash.getWaitForWindow());
|
|
||||||
addText(SPLASH_TIMEOUT, String.valueOf(splash.getTimeout()));
|
private void addMessages(Config c) {
|
||||||
addTrue(SPLASH_TIMEOUT_ERR, splash.isTimeoutErr());
|
Msg msg = c.getMessages();
|
||||||
addBitmap(SPLASH_BITMAP, splash.getFile());
|
|
||||||
}
|
if (msg == null) {
|
||||||
|
msg = new Msg();
|
||||||
private void addMessages(Config c) {
|
}
|
||||||
Msg msg = c.getMessages();
|
|
||||||
|
addText(STARTUP_ERR, msg.getStartupErr());
|
||||||
if (msg == null) {
|
addText(JRE_NOT_FOUND_ERR, msg.getJreNotFoundErr());
|
||||||
msg = new Msg();
|
addText(JRE_VERSION_ERR, msg.getJreVersionErr());
|
||||||
}
|
addText(LAUNCHER_ERR, msg.getLauncherErr());
|
||||||
|
|
||||||
addText(STARTUP_ERR, msg.getStartupErr());
|
if (c.getSingleInstance() != null) {
|
||||||
addText(BUNDLED_JRE_ERR, msg.getBundledJreErr());
|
addText(INSTANCE_ALREADY_EXISTS_MSG, msg.getInstanceAlreadyExistsMsg());
|
||||||
addText(JRE_VERSION_ERR, msg.getJreVersionErr());
|
}
|
||||||
addText(LAUNCHER_ERR, msg.getLauncherErr());
|
}
|
||||||
|
|
||||||
if (c.getSingleInstance() != null) {
|
private void append(StringBuffer sb, List<String> list, String separator) {
|
||||||
addText(INSTANCE_ALREADY_EXISTS_MSG, msg.getInstanceAlreadyExistsMsg());
|
for (int i = 0; i < list.size(); i++) {
|
||||||
}
|
sb.append(list.get(i));
|
||||||
}
|
|
||||||
|
if (i < list.size() - 1) {
|
||||||
private void append(StringBuffer sb, List<String> list, String separator) {
|
sb.append(separator);
|
||||||
for (int i = 0; i < list.size(); i++) {
|
}
|
||||||
sb.append(list.get(i));
|
}
|
||||||
|
}
|
||||||
if (i < list.size() - 1) {
|
|
||||||
sb.append(separator);
|
private void addText(int id, String text) {
|
||||||
}
|
if (text == null || text.equals("")) {
|
||||||
}
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addText(int id, String text) {
|
_sb.append(id);
|
||||||
if (text == null || text.equals("")) {
|
_sb.append(" RCDATA BEGIN \"");
|
||||||
return;
|
_sb.append(escape(text));
|
||||||
}
|
_sb.append("\\0\" END\n");
|
||||||
|
}
|
||||||
_sb.append(id);
|
|
||||||
_sb.append(" RCDATA BEGIN \"");
|
private void addTrue(int id, boolean value) {
|
||||||
_sb.append(escape(text));
|
if (value) {
|
||||||
_sb.append("\\0\" END\n");
|
addText(id, "true");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
private void addTrue(int id, boolean value) {
|
|
||||||
if (value) {
|
private void addInteger(int id, Integer value) {
|
||||||
addText(id, "true");
|
if (value != null) {
|
||||||
}
|
addText(id, value.toString());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
private void addInteger(int id, Integer value) {
|
|
||||||
if (value != null) {
|
/**
|
||||||
addText(id, value.toString());
|
* Stores path in Windows format with '\' separators.
|
||||||
}
|
*/
|
||||||
}
|
private void addWindowsPath(int id, String path) {
|
||||||
|
if (path == null || path.equals("")) {
|
||||||
/**
|
return;
|
||||||
* Stores path in Windows format with '\' separators.
|
}
|
||||||
*/
|
|
||||||
private void addWindowsPath(int id, String path) {
|
_sb.append(id);
|
||||||
if (path == null || path.equals("")) {
|
_sb.append(" RCDATA BEGIN \"");
|
||||||
return;
|
_sb.append(path.replaceAll("\\\\", "\\\\\\\\")
|
||||||
}
|
.replaceAll("/", "\\\\\\\\"));
|
||||||
|
_sb.append("\\0\" END\n");
|
||||||
_sb.append(id);
|
}
|
||||||
_sb.append(" RCDATA BEGIN \"");
|
|
||||||
_sb.append(path.replaceAll("\\\\", "\\\\\\\\")
|
private void addManifest(int id, File manifest) {
|
||||||
.replaceAll("/", "\\\\\\\\"));
|
if (manifest == null || manifest.getPath().equals("")) {
|
||||||
_sb.append("\\0\" END\n");
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addManifest(int id, File manifest) {
|
_sb.append(id);
|
||||||
if (manifest == null || manifest.getPath().equals("")) {
|
_sb.append(" 24 \"");
|
||||||
return;
|
_sb.append(getPath(Util.getAbsoluteFile(
|
||||||
}
|
ConfigPersister.getInstance().getConfigPath(), manifest)));
|
||||||
|
_sb.append("\"\n");
|
||||||
_sb.append(id);
|
}
|
||||||
_sb.append(" 24 \"");
|
|
||||||
_sb.append(getPath(Util.getAbsoluteFile(
|
private void addIcon(int id, File icon) {
|
||||||
ConfigPersister.getInstance().getConfigPath(), manifest)));
|
if (icon == null || icon.getPath().equals("")) {
|
||||||
_sb.append("\"\n");
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addIcon(int id, File icon) {
|
_sb.append(id);
|
||||||
if (icon == null || icon.getPath().equals("")) {
|
_sb.append(" ICON DISCARDABLE \"");
|
||||||
return;
|
_sb.append(getPath(Util.getAbsoluteFile(
|
||||||
}
|
ConfigPersister.getInstance().getConfigPath(), icon)));
|
||||||
|
_sb.append("\"\n");
|
||||||
_sb.append(id);
|
}
|
||||||
_sb.append(" ICON DISCARDABLE \"");
|
|
||||||
_sb.append(getPath(Util.getAbsoluteFile(
|
private void addBitmap(int id, File bitmap) {
|
||||||
ConfigPersister.getInstance().getConfigPath(), icon)));
|
if (bitmap == null) {
|
||||||
_sb.append("\"\n");
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addBitmap(int id, File bitmap) {
|
_sb.append(id);
|
||||||
if (bitmap == null) {
|
_sb.append(" BITMAP \"");
|
||||||
return;
|
_sb.append(getPath(Util.getAbsoluteFile(
|
||||||
}
|
ConfigPersister.getInstance().getConfigPath(), bitmap)));
|
||||||
|
_sb.append("\"\n");
|
||||||
_sb.append(id);
|
}
|
||||||
_sb.append(" BITMAP \"");
|
|
||||||
_sb.append(getPath(Util.getAbsoluteFile(
|
private String getPath(File f) {
|
||||||
ConfigPersister.getInstance().getConfigPath(), bitmap)));
|
return f.getPath().replaceAll("\\\\", "\\\\\\\\");
|
||||||
_sb.append("\"\n");
|
}
|
||||||
}
|
|
||||||
|
private void addSpace(StringBuffer sb) {
|
||||||
private String getPath(File f) {
|
int len = sb.length();
|
||||||
return f.getPath().replaceAll("\\\\", "\\\\\\\\");
|
|
||||||
}
|
if (len-- > 0 && sb.charAt(len) != ' ') {
|
||||||
|
sb.append(' ');
|
||||||
private void addSpace(StringBuffer sb) {
|
}
|
||||||
int len = sb.length();
|
}
|
||||||
|
|
||||||
if (len-- > 0 && sb.charAt(len) != ' ') {
|
private void addVerBlockValue(String key, String value) {
|
||||||
sb.append(' ');
|
_sb.append(" VALUE \"");
|
||||||
}
|
_sb.append(key);
|
||||||
}
|
_sb.append("\", \"");
|
||||||
|
|
||||||
private void addVerBlockValue(String key, String value) {
|
if (value != null) {
|
||||||
_sb.append(" VALUE \"");
|
_sb.append(escape(value));
|
||||||
_sb.append(key);
|
}
|
||||||
_sb.append("\", \"");
|
|
||||||
|
_sb.append("\"\n");
|
||||||
if (value != null) {
|
}
|
||||||
_sb.append(escape(value));
|
|
||||||
}
|
private String escape(String text) {
|
||||||
|
return text.replace("\"", "\"\"")
|
||||||
_sb.append("\"\n");
|
.replace("\\", "\\\\")
|
||||||
}
|
.replace("\n", "\\r\\n");
|
||||||
|
}
|
||||||
private String escape(String text) {
|
}
|
||||||
return text.replace("\"", "\"\"")
|
|
||||||
.replace("\\", "\\\\")
|
|
||||||
.replace("\n", "\\r\\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,220 +1,220 @@
|
|||||||
/*
|
/*
|
||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Created on 2005-04-24
|
* Created on 2005-04-24
|
||||||
*/
|
*/
|
||||||
package net.sf.launch4j;
|
package net.sf.launch4j;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Copyright (C) 2005 Grzegorz Kowal
|
* @author Copyright (C) 2005 Grzegorz Kowal
|
||||||
*/
|
*/
|
||||||
public class Util {
|
public class Util {
|
||||||
public static final boolean WINDOWS_OS = System.getProperty("os.name")
|
public static final boolean WINDOWS_OS = System.getProperty("os.name")
|
||||||
.toLowerCase().startsWith("windows");
|
.toLowerCase().startsWith("windows");
|
||||||
|
|
||||||
private static final String Launch4jProperties = "launch4j.properties";
|
private static final String Launch4jProperties = "launch4j.properties";
|
||||||
|
|
||||||
private Util() {}
|
private Util() {}
|
||||||
|
|
||||||
public static Properties getProperties() throws IOException {
|
public static Properties getProperties() throws IOException {
|
||||||
Properties props = new Properties();
|
Properties props = new Properties();
|
||||||
InputStream in = Main.class.getClassLoader().getResourceAsStream(Launch4jProperties);
|
InputStream in = Main.class.getClassLoader().getResourceAsStream(Launch4jProperties);
|
||||||
props.load(in);
|
props.load(in);
|
||||||
in.close();
|
in.close();
|
||||||
return props;
|
return props;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static File createTempFile(String suffix) throws IOException {
|
public static File createTempFile(String suffix) throws IOException {
|
||||||
String tmpdir = System.getProperty("launch4j.tmpdir");
|
String tmpdir = System.getProperty("launch4j.tmpdir");
|
||||||
if (tmpdir != null) {
|
if (tmpdir != null) {
|
||||||
if (tmpdir.indexOf(' ') != -1) {
|
if (tmpdir.indexOf(' ') != -1) {
|
||||||
throw new IOException(Messages.getString("Util.tmpdir"));
|
throw new IOException(Messages.getString("Util.tmpdir"));
|
||||||
}
|
}
|
||||||
return File.createTempFile("launch4j", suffix, new File(tmpdir));
|
return File.createTempFile("launch4j", suffix, new File(tmpdir));
|
||||||
} else {
|
} else {
|
||||||
return File.createTempFile("launch4j", suffix);
|
return File.createTempFile("launch4j", suffix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static File getJarBasedir() {
|
public static File getJarBasedir() {
|
||||||
try {
|
try {
|
||||||
URI uri = new URI(Util.class.getClassLoader()
|
URI uri = new URI(Util.class.getClassLoader()
|
||||||
.getResource(Launch4jProperties)
|
.getResource(Launch4jProperties)
|
||||||
.getFile());
|
.getFile());
|
||||||
|
|
||||||
String path = uri.getPath();
|
String path = uri.getPath();
|
||||||
|
|
||||||
if (path.startsWith("/") && path.contains("!")) {
|
if (path.startsWith("/") && path.contains("!")) {
|
||||||
// jar file
|
// jar file
|
||||||
String jarPath = path.substring(0, path.lastIndexOf('!'));
|
String jarPath = path.substring(0, path.lastIndexOf('!'));
|
||||||
String basedir = jarPath.substring(0, jarPath.lastIndexOf('/') + 1);
|
String basedir = jarPath.substring(0, jarPath.lastIndexOf('/') + 1);
|
||||||
return new File(basedir);
|
return new File(basedir);
|
||||||
} else {
|
} else {
|
||||||
// class files - launch4j development
|
// class files - launch4j development
|
||||||
return new File(".");
|
return new File(".");
|
||||||
}
|
}
|
||||||
} catch (URISyntaxException e) {
|
} catch (URISyntaxException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static File getAbsoluteFile(File basepath, File f) {
|
public static File getAbsoluteFile(File basepath, File f) {
|
||||||
return f.isAbsolute() ? f : new File(basepath, f.getPath());
|
return f.isAbsolute() ? f : new File(basepath, f.getPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getExtension(File f) {
|
public static String getExtension(File f) {
|
||||||
String name = f.getName();
|
String name = f.getName();
|
||||||
int x = name.lastIndexOf('.');
|
int x = name.lastIndexOf('.');
|
||||||
if (x != -1) {
|
if (x != -1) {
|
||||||
return name.substring(x);
|
return name.substring(x);
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void exec(String[] cmd, Log log) throws ExecException {
|
public static void exec(String[] cmd, Log log) throws ExecException {
|
||||||
BufferedReader is = null;
|
BufferedReader is = null;
|
||||||
try {
|
try {
|
||||||
if (WINDOWS_OS) {
|
if (WINDOWS_OS) {
|
||||||
for (int i = 0; i < cmd.length; i++) {
|
for (int i = 0; i < cmd.length; i++) {
|
||||||
cmd[i] = cmd[i].replaceAll("/", "\\\\");
|
cmd[i] = cmd[i].replaceAll("/", "\\\\");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Process p = Runtime.getRuntime().exec(cmd);
|
Process p = Runtime.getRuntime().exec(cmd);
|
||||||
is = new BufferedReader(new InputStreamReader(p.getErrorStream()));
|
is = new BufferedReader(new InputStreamReader(p.getErrorStream()));
|
||||||
String line;
|
String line;
|
||||||
int errLine = -1;
|
int errLine = -1;
|
||||||
Pattern pattern = Pattern.compile(":\\d+:");
|
Pattern pattern = Pattern.compile(":\\d+:");
|
||||||
while ((line = is.readLine()) != null) {
|
while ((line = is.readLine()) != null) {
|
||||||
log.append(line);
|
log.append(line);
|
||||||
Matcher matcher = pattern.matcher(line);
|
Matcher matcher = pattern.matcher(line);
|
||||||
if (matcher.find()) {
|
if (matcher.find()) {
|
||||||
errLine = Integer.valueOf(
|
errLine = Integer.valueOf(
|
||||||
line.substring(matcher.start() + 1, matcher.end() - 1))
|
line.substring(matcher.start() + 1, matcher.end() - 1))
|
||||||
.intValue();
|
.intValue();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
is.close();
|
is.close();
|
||||||
p.waitFor();
|
p.waitFor();
|
||||||
if (errLine != -1) {
|
if (errLine != -1) {
|
||||||
StringBuffer sb = new StringBuffer(Messages.getString("Util.exec.failed"));
|
StringBuffer sb = new StringBuffer(Messages.getString("Util.exec.failed"));
|
||||||
AppendCommandLine(sb, cmd);
|
AppendCommandLine(sb, cmd);
|
||||||
throw new ExecException(sb.toString(), errLine);
|
throw new ExecException(sb.toString(), errLine);
|
||||||
}
|
}
|
||||||
if (p.exitValue() != 0) {
|
if (p.exitValue() != 0) {
|
||||||
StringBuffer sb = new StringBuffer(Messages.getString("Util.exec.failed"));
|
StringBuffer sb = new StringBuffer(Messages.getString("Util.exec.failed"));
|
||||||
sb.append(" (");
|
sb.append(" (");
|
||||||
sb.append(p.exitValue());
|
sb.append(p.exitValue());
|
||||||
sb.append(')');
|
sb.append(')');
|
||||||
AppendCommandLine(sb, cmd);
|
AppendCommandLine(sb, cmd);
|
||||||
throw new ExecException(sb.toString());
|
throw new ExecException(sb.toString());
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
close(is);
|
close(is);
|
||||||
throw new ExecException(e);
|
throw new ExecException(e);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
close(is);
|
close(is);
|
||||||
throw new ExecException(e);
|
throw new ExecException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void AppendCommandLine(StringBuffer sb, String[] cmd) {
|
private static void AppendCommandLine(StringBuffer sb, String[] cmd) {
|
||||||
sb.append(": ");
|
sb.append(": ");
|
||||||
for (int i = 0; i < cmd.length; i++) {
|
for (int i = 0; i < cmd.length; i++) {
|
||||||
sb.append(cmd[i]);
|
sb.append(cmd[i]);
|
||||||
if (i < cmd.length - 1) {
|
if (i < cmd.length - 1) {
|
||||||
sb.append(' ');
|
sb.append(' ');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void close(final InputStream o) {
|
public static void close(final InputStream o) {
|
||||||
if (o != null) {
|
if (o != null) {
|
||||||
try {
|
try {
|
||||||
o.close();
|
o.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
System.err.println(e); // XXX log
|
System.err.println(e); // XXX log
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void close(final OutputStream o) {
|
public static void close(final OutputStream o) {
|
||||||
if (o != null) {
|
if (o != null) {
|
||||||
try {
|
try {
|
||||||
o.close();
|
o.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
System.err.println(e); // XXX log
|
System.err.println(e); // XXX log
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void close(final Reader o) {
|
public static void close(final Reader o) {
|
||||||
if (o != null) {
|
if (o != null) {
|
||||||
try {
|
try {
|
||||||
o.close();
|
o.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
System.err.println(e); // XXX log
|
System.err.println(e); // XXX log
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void close(final Writer o) {
|
public static void close(final Writer o) {
|
||||||
if (o != null) {
|
if (o != null) {
|
||||||
try {
|
try {
|
||||||
o.close();
|
o.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
System.err.println(e); // XXX log
|
System.err.println(e); // XXX log
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean delete(File f) {
|
public static boolean delete(File f) {
|
||||||
return (f != null) ? f.delete() : false;
|
return (f != null) ? f.delete() : false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,63 +1,63 @@
|
|||||||
/*
|
/*
|
||||||
Launch4j (http://launch4j.sourceforge.net/)
|
Launch4j (http://launch4j.sourceforge.net/)
|
||||||
Cross-platform Java application wrapper for creating Windows native executables.
|
Cross-platform Java application wrapper for creating Windows native executables.
|
||||||
|
|
||||||
Copyright (c) 2004, 2015 Grzegorz Kowal
|
Copyright (c) 2004, 2015 Grzegorz Kowal
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice,
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
this list of conditions and the following disclaimer.
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
this list of conditions and the following disclaimer in the documentation
|
||||||
and/or other materials provided with the distribution.
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its contributors
|
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
|
may be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
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
|
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.
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Created on Jul 19, 2006
|
* Created on Jul 19, 2006
|
||||||
*/
|
*/
|
||||||
package net.sf.launch4j.ant;
|
package net.sf.launch4j.ant;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.sf.launch4j.config.ClassPath;
|
import net.sf.launch4j.config.ClassPath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Copyright (C) 2006 Grzegorz Kowal
|
* @author Copyright (C) 2006 Grzegorz Kowal
|
||||||
*/
|
*/
|
||||||
public class AntClassPath extends ClassPath {
|
public class AntClassPath extends ClassPath {
|
||||||
private final List<StringWrapper> wrappedPaths = new ArrayList<StringWrapper>();
|
private final List<StringWrapper> wrappedPaths = new ArrayList<StringWrapper>();
|
||||||
|
|
||||||
public void setCp(String cp){
|
public void setCp(String cp){
|
||||||
StringWrapper wrapper = new StringWrapper();
|
StringWrapper wrapper = new StringWrapper();
|
||||||
wrapper.addText(cp);
|
wrapper.addText(cp);
|
||||||
wrappedPaths.add(wrapper);
|
wrappedPaths.add(wrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addCp(StringWrapper cp) {
|
public void addCp(StringWrapper cp) {
|
||||||
wrappedPaths.add(cp);
|
wrappedPaths.add(cp);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void unwrap() {
|
public void unwrap() {
|
||||||
setPaths(StringWrapper.unwrap(wrappedPaths));
|
setPaths(StringWrapper.unwrap(wrappedPaths));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user