mirror of
https://github.com/twiglet/cs2j.git
synced 2025-01-18 13:15:17 +01:00
Add simple launch option
- add simple launch option that just asks for source and target - simplify properties, death to ScormEngine baggage
This commit is contained in:
parent
b9664f1484
commit
b30ae76c17
@ -25,32 +25,16 @@ cs2jtx.build.dir=${build.dir}/cs2jtx
|
||||
cs2jtx.exe= ${cs2jtx.bin.dir}/Translator.exe
|
||||
#cs2jtx.exe= ${basedir}/../bin/Translator.exe
|
||||
|
||||
|
||||
#whichbranch=AmazonBranch
|
||||
whichbranch=TrunkBranch
|
||||
|
||||
|
||||
|
||||
# Sources, by default these are sibling directories of this script
|
||||
#cs2j.dir=${basedir}/../../AmazonBranch/CS2JLibrary
|
||||
#cheats.dir=${basedir}/../AmazonBranch/Cheats
|
||||
|
||||
cs2j.dir=${basedir}/../../${whichbranch}/CS2JLibrary
|
||||
cheats.dir=${basedir}/../${whichbranch}/Cheats
|
||||
# by default, sibling directory to Translator
|
||||
cs2j.dir=${basedir}/../../CS2JLibrary/NetTranslations
|
||||
cheats.dir=${basedir}/../../Cheats
|
||||
|
||||
# Directories to build into, against
|
||||
cs.app.name=ScormEngineNetTrunk
|
||||
#cs.app.name=Amazonsimpledb4thed
|
||||
#cs.app.dir=${user.home}/My Documents/gitrepos/${cs.app.name}/src/app/ScormEngine.Core
|
||||
cs.app.dir=${user.home}/My Documents/Visual Studio 2005/Projects/${cs.app.name}/src/app/ScormEngine.Core
|
||||
|
||||
# Set cs.tx.project if you want to translate a subset of the application
|
||||
#cs.tx.project=ScormEngine.Core/Logic
|
||||
cs.tx.project=Logic
|
||||
cs.tx.dir=${cs.app.dir}/${cs.tx.project}
|
||||
# If no cs.app.dir set make it equal to cs.tx.dir
|
||||
cs.app.dir=${cs.tx.dir}
|
||||
|
||||
# Object of the translation, by default in the build area
|
||||
#java.output.dir=${user.home}/My Documents/AmazonBranch/RusticiSoftware.ScormContentPlayer.Logic/src
|
||||
java.output.dir=${user.home}/My Documents/${whichbranch}/RusticiSoftware.ScormContentPlayer.Logic/src
|
||||
java.output.dir=${build.dir}/javaproject/src
|
||||
|
||||
|
||||
|
@ -3,13 +3,9 @@
|
||||
|
||||
<description>
|
||||
This script builds the cs2j translator and translates C# code
|
||||
</description>
|
||||
|
||||
<property file="${basedir}/launch.properties" />
|
||||
<property file="${user.home}/${ant.project.name}.build.properties" />
|
||||
<property file="${user.home}/build.properties" />
|
||||
<property file="build.properties" />
|
||||
</description>
|
||||
|
||||
<property name="builder.ant.lib" value="${basedir}/lib"/>
|
||||
<!-- load the ant-dotnet task, see http://ant.apache.org/antlibs/dotnet/index.html -->
|
||||
<taskdef uri="antlib:org.apache.ant.dotnet" resource="org/apache/ant/dotnet/antlib.xml" classpath="${builder.ant.lib}/ant-dotnet-1.0.jar" />
|
||||
|
||||
@ -17,38 +13,53 @@
|
||||
<taskdef name="antform" classname="com.sardak.antform.AntForm" classpath="${builder.ant.lib}/antform.jar"/>
|
||||
<taskdef name="antmenu" classname="com.sardak.antform.AntMenu" classpath="${builder.ant.lib}/antform.jar"/>
|
||||
|
||||
<target name="launch">
|
||||
<antform title="C# to Java Translation" save="${basedir}/launch.properties">
|
||||
<label>Enter a scratch directory to use for building</label>
|
||||
<fileSelectionProperty label="Java output directory : " property="java.output.dir" directoryChooser="true" />
|
||||
<fileSelectionProperty label="C# Application Root : " property="cs.app.dir" directoryChooser="true" />
|
||||
<fileSelectionProperty label="C# Translation Root : " property="cs.tx.dir" directoryChooser="true" />
|
||||
<fileSelectionProperty label="CS2J Translation Files : " property="cs2j.dir" directoryChooser="true" />
|
||||
<separator />
|
||||
<!-- <label>Enter the locations of the branches you want to translate from / to</label>
|
||||
<target name="launch">
|
||||
<property file="${basedir}/launch-simple.properties" />
|
||||
<antform title="C# to Java Translation" save="${basedir}/launch-simple.properties">
|
||||
<label>Configure the source and target locations for your translation:</label>
|
||||
<fileSelectionProperty label="Java output directory : " property="java.output.dir" directoryChooser="true" />
|
||||
<fileSelectionProperty label="C# Translation Root : " property="cs.tx.dir" directoryChooser="true" />
|
||||
<separator />
|
||||
<controlbar>
|
||||
<button label="Cancel" type="cancel" target="cancel" newproject="false"/>
|
||||
<button label="Reset" type="reset" />
|
||||
<button label="OK" type="ok"/>
|
||||
</controlbar>
|
||||
</antform>
|
||||
<antcall target="ok" />
|
||||
</target>
|
||||
|
||||
<target name="launch-full">
|
||||
<property file="${basedir}/launch-full.properties" />
|
||||
<antform title="C# to Java Translation" save="${basedir}/launch-full.properties">
|
||||
<label>Configure the source and target locations for your translation:</label>
|
||||
<fileSelectionProperty label="Java output directory : " property="java.output.dir" directoryChooser="true" />
|
||||
<fileSelectionProperty label="C# Application Root : " property="cs.app.dir" directoryChooser="true" />
|
||||
<fileSelectionProperty label="C# Translation Root : " property="cs.tx.dir" directoryChooser="true" />
|
||||
<fileSelectionProperty label="CS2J Translation Files : " property="cs2j.dir" directoryChooser="true" />
|
||||
<separator />
|
||||
<!-- <label>Enter the locations of the branches you want to translate from / to</label>
|
||||
<textProperty label="ScormEngineNet branch : " property="csharp.project.full" />
|
||||
<textProperty label="ScormEngineJava branch : " property="java.project.full" />
|
||||
<separator />
|
||||
<booleanProperty label="Commit Java code after translation " property="is.commit.javacode" />
|
||||
<booleanProperty label="Refresh and Rebuild cs2j executable " property="is.rebuild.cs2j" />
|
||||
-->
|
||||
<controlbar>
|
||||
<button label="Cancel" type="cancel" target="cancel" newproject="false"/>
|
||||
<button label="Reset" type="reset" />
|
||||
<button label="OK" type="ok"/>
|
||||
</controlbar>
|
||||
</antform>
|
||||
<antcall target="ok" />
|
||||
</target>
|
||||
<controlbar>
|
||||
<button label="Cancel" type="cancel" target="cancel" newproject="false"/>
|
||||
<button label="Reset" type="reset" />
|
||||
<button label="OK" type="ok"/>
|
||||
</controlbar>
|
||||
</antform>
|
||||
<antcall target="ok" />
|
||||
</target>
|
||||
|
||||
<target name="cancel">
|
||||
<target name="cancel">
|
||||
<echo message="Translation cancelled by user" />
|
||||
<property name="is.run.cancelled" value="true" />
|
||||
</target>
|
||||
|
||||
<target name="ok" unless="is.run.cancelled">
|
||||
<!--antcall target="dumpProperties" inheritall="false" / -->
|
||||
<antcall target="translateCS2J" inheritall="false" />
|
||||
<target name="ok" depends="init,translateCS2J" unless="is.run.cancelled">
|
||||
</target>
|
||||
|
||||
|
||||
@ -172,6 +183,7 @@ Settings\kevin.glynn\eclipsews\RusticiSoftware.ScormUntethered.Logic\src"
|
||||
<target name="translateCS2J" depends="init" description="run translator">
|
||||
<dn:dotnetexec executable="${cs2jtx.exe}">
|
||||
<arg value="-version"/>
|
||||
<arg value="-v"/>
|
||||
<arg value="-dumpxml"/>
|
||||
<arg value="-xmldir"/>
|
||||
<arg file="${cs2jtx.build.dir}/xmls"/>
|
||||
@ -202,7 +214,12 @@ Settings\kevin.glynn\eclipsews\RusticiSoftware.ScormUntethered.Logic\src"
|
||||
</target>
|
||||
|
||||
<target name="init" depends="">
|
||||
<mkdir dir="${cs2jtx.build.dir}" />
|
||||
<property file="${user.home}/${ant.project.name}.build.properties" />
|
||||
<property file="${user.home}/build.properties" />
|
||||
<property file="build.properties" />
|
||||
<antcall target="dumpProperties" inheritall="true" />
|
||||
|
||||
<mkdir dir="${cs2jtx.build.dir}" />
|
||||
</target>
|
||||
|
||||
<target name="clean" depends="" description="clean out build area">
|
||||
|
Loading…
x
Reference in New Issue
Block a user