mirror of
https://github.com/badvision/lawless-legends.git
synced 2025-02-22 18:29:03 +00:00
PackPartitions now does everything itself: compile, assemble, pack.
This commit is contained in:
parent
d1558d67cf
commit
f239bd4ac2
BIN
Platform/Apple/tools/ACME/src/acme.jar
Normal file
BIN
Platform/Apple/tools/ACME/src/acme.jar
Normal file
Binary file not shown.
@ -1302,6 +1302,7 @@ class PackPartitions
|
||||
{
|
||||
if (!binaryStubsOnly) {
|
||||
println "Assembling ${codeName}.s"
|
||||
new File(inDir + "build").mkdir()
|
||||
String[] args = ["acme", "-f", "plain",
|
||||
"-o", "build/" + codeName + ".b",
|
||||
codeName + ".s"]
|
||||
@ -1310,15 +1311,26 @@ class PackPartitions
|
||||
readCode(codeName, inDir + "build/" + codeName + ".b")
|
||||
}
|
||||
|
||||
def assembleCore(inDir)
|
||||
{
|
||||
if (!binaryStubsOnly) {
|
||||
println "Assembling mem.s"
|
||||
new File(inDir + "build").mkdir()
|
||||
String[] args = ["acme", "-o", "build/cmd.sys#2000", "mem.s"]
|
||||
runNestedvm(acme.Acme.class, "ACME assembler", args, inDir, null, null)
|
||||
}
|
||||
}
|
||||
|
||||
def compileModule(moduleName, codeDir)
|
||||
{
|
||||
if (!binaryStubsOnly)
|
||||
{
|
||||
println "Compiling ${moduleName}.pla"
|
||||
String[] args = ["plasm", "-AM"]
|
||||
new File(codeDir + "build").mkdir()
|
||||
runNestedvm(plasma.Plasma.class, "PLASMA compiler", args, codeDir,
|
||||
new File(codeDir + moduleName + ".pla"),
|
||||
new File(codeDir + "build/" + moduleName + ".b"))
|
||||
new File(codeDir + "build/" + moduleName + ".a"))
|
||||
|
||||
args = ["acme", "--setpc", "4096",
|
||||
"-o", moduleName + ".b",
|
||||
@ -1331,6 +1343,8 @@ class PackPartitions
|
||||
|
||||
def readAllCode()
|
||||
{
|
||||
assembleCore("src/core/")
|
||||
|
||||
assembleCode("render", "src/raycast/")
|
||||
assembleCode("expand", "src/raycast/")
|
||||
assembleCode("fontEngine", "src/font/")
|
||||
@ -1719,10 +1733,8 @@ class PackPartitions
|
||||
// Go for it.
|
||||
def inst = new PackPartitions()
|
||||
try {
|
||||
if (args[1] == "-dataGen")
|
||||
inst.dataGen(args[0])
|
||||
else
|
||||
inst.pack(args[0], args[1], args.size() > 2 ? args[2] : null)
|
||||
new PackPartitions().dataGen(args[0])
|
||||
inst.pack(args[0], args[1], args.size() > 2 ? args[2] : null)
|
||||
}
|
||||
catch (Throwable t) {
|
||||
errorFile.withWriter { out ->
|
||||
|
@ -29,25 +29,6 @@
|
||||
<!-- Create build directory -->
|
||||
<mkdir dir="${build.dir}"/>
|
||||
|
||||
<!-- Generate code from tables -->
|
||||
<echo>Generating code from tables.</echo>
|
||||
<java jar="${pack.dir}/PackPartitions.jar" fork="true" failonerror="true">
|
||||
<arg value="data/world/world.xml"/>
|
||||
<arg value="-dataGen"/>
|
||||
</java>
|
||||
|
||||
<!-- Build sub-projects -->
|
||||
<echo>Building core.</echo>
|
||||
<ant dir="${src.dir}/core" target="build" useNativeBasedir="true" inheritAll="false"/>
|
||||
<echo>Building game loop.</echo>
|
||||
<ant dir="${src.dir}/plasma" target="build" useNativeBasedir="true" inheritAll="false"/>
|
||||
<echo>Building raycast.</echo>
|
||||
<ant dir="${src.dir}/raycast" target="build" useNativeBasedir="true" inheritAll="false"/>
|
||||
<echo>Building font engine.</echo>
|
||||
<ant dir="${src.dir}/font" target="build" useNativeBasedir="true" inheritAll="false"/>
|
||||
<echo>Building tile engine.</echo>
|
||||
<ant dir="${src.dir}/tile" target="build" useNativeBasedir="true" inheritAll="false"/>
|
||||
|
||||
<!-- Pack the game data -->
|
||||
<echo>Packing game and code resources.</echo>
|
||||
<java jar="${pack.dir}/PackPartitions.jar" fork="true" failonerror="true">
|
||||
|
@ -20,6 +20,9 @@
|
||||
|
||||
<target name="clean">
|
||||
<delete failonerror="false" dir="${build.dir}"/>
|
||||
<delete>
|
||||
<fileset dir="." includes="gen_*.pl?"/>
|
||||
</delete>
|
||||
</target>
|
||||
|
||||
<target name="build">
|
||||
|
Loading…
x
Reference in New Issue
Block a user