-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from MarcoFalke/ant_exe
[launch4j] Let ant create a windows exe
- Loading branch information
Showing
4 changed files
with
55 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
/bin | ||
/ant_build | ||
/launch4j | ||
globalreplace.jar | ||
globalreplace.exe | ||
|
||
# OS Generated files | ||
.DS_Store | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<launch4jConfig> | ||
<dontWrapJar>false</dontWrapJar> | ||
<headerType>gui</headerType> | ||
<jar>globalreplace.jar</jar> | ||
<outfile>globalreplace.exe</outfile> | ||
<errTitle></errTitle> | ||
<cmdLine></cmdLine> | ||
<chdir>.</chdir> | ||
<priority>normal</priority> | ||
<downloadUrl>http://java.com/download</downloadUrl> | ||
<supportUrl></supportUrl> | ||
<stayAlive>false</stayAlive> | ||
<restartOnCrash>false</restartOnCrash> | ||
<manifest></manifest> | ||
<icon></icon> | ||
<jre> | ||
<path></path> | ||
<bundledJre64Bit>false</bundledJre64Bit> | ||
<bundledJreAsFallback>false</bundledJreAsFallback> | ||
<minVersion>1.8.0</minVersion> | ||
<maxVersion>2.0.0</maxVersion> | ||
<jdkPreference>preferJre</jdkPreference> | ||
<runtimeBits>64/32</runtimeBits> | ||
</jre> | ||
</launch4jConfig> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,36 @@ | ||
<project default="global-replace_jar" name="Create Runnable Jar for Project GlobalReplace"> | ||
<property name="file.jar" value="globalreplace.jar" /> | ||
<property name="dir.src" value="src/globalreplace" /> | ||
<property name="dir.build" value="ant_build" /> | ||
<property name="dir.dist" value="ant_dist" /> | ||
<property name="dir.launch4j" value="launch4j" /> | ||
|
||
<target name="compile"> | ||
<delete dir="${dir.build}" /> | ||
<mkdir dir="${dir.build}" /> | ||
<javac srcdir="${dir.src}" destdir="${dir.build}" > | ||
<classpath> | ||
<pathelement path="lib/jwiki-v1.1.jar"/> | ||
</classpath> | ||
</javac> | ||
<javac srcdir="${dir.src}" destdir="${dir.build}"> | ||
<classpath> | ||
<pathelement path="lib/jwiki-v1.1.jar" /> | ||
</classpath> | ||
</javac> | ||
</target> | ||
|
||
<target name="global-replace_jar" depends="compile"> | ||
<jar destfile="globalreplace.jar" filesetmanifest="mergewithoutmain"> | ||
<jar destfile="${file.jar}" filesetmanifest="mergewithoutmain"> | ||
<manifest> | ||
<attribute name="Main-Class" value="globalreplace.GlobalReplace" /> | ||
<attribute name="Class-Path" value="." /> | ||
</manifest> | ||
<fileset dir="${dir.build}" /> | ||
<zipfileset excludes="META-INF/*.SF,*.md" src="lib/jwiki-v1.1.jar" /> | ||
</jar> | ||
<echo message="Done!" /> | ||
<echo message="Created jar!" /> | ||
</target> | ||
|
||
<target name="dist" depends="global-replace_jar"> | ||
<copy file="${file.jar}" tofile="${dir.dist}/${file.jar}" /> | ||
<taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask" classpath="${dir.launch4j}/launch4j.jar:${dir.launch4j}/lib/xstream.jar" /> | ||
<launch4j configFile="${dir.dist}/launch4jconfig.xml" /> | ||
<echo message="Windows executable created!" /> | ||
</target> | ||
</project> |