| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?xml version="1.0" encoding="UTF-8"?>
- <project name="sample-lua" default="help">
- <property file="local.properties" />
- <property file="ant.properties" />
- <loadproperties srcFile="project.properties" />
- <fail message="sdk.dir is missing. Make sure to generate local.properties using 'android update project -t 1 -p . -s'" unless="sdk.dir" />
- <fail message="OS not supported. Supported platforms: Windows, MacOS X or Linux.">
- <condition>
- <not>
- <or>
- <os family="unix"/>
- <os family="windows"/>
- </or>
- </not>
- </condition>
- </fail>
- <macrodef name="build-native">
- <attribute name="location"/>
- <sequential>
- <exec osfamily="unix" dir="@{location}/android" executable="ndk-build">
- <arg value="-j4"/>
- </exec>
- <exec osfamily="windows" dir="@{location}/android" executable="cmd">
- <arg value="/c"/>
- <arg value="ndk-build -j4"/>
- </exec>
- </sequential>
- </macrodef>
-
- <target name="-pre-build">
- <build-native location="../../../gameplay"/>
- <build-native location=".."/>
- <mkdir dir="../src/org/gameplay3d"/>
- <copy todir="../src/org/gameplay3d">
- <fileset dir="../../../gameplay/src/org/gameplay3d"/>
- </copy>
- </target>
- <target name="-post-compile">
- <copy file="../game.config" tofile="assets/game.config"/>
- <copy file="../res/ai.lua" tofile="assets/res/ai.lua"/>
- <copy file="../res/game.lua" tofile="assets/res/game.lua"/>
- <copy file="../res/lua.gpb" tofile="assets/res/lua.gpb"/>
- <copy file="../res/lua.material" tofile="assets/res/lua.material"/>
- <copy file="../res/lua.scene" tofile="assets/res/lua.scene"/>
- <copy file="../res/lua-logo.png" tofile="assets/res/lua-logo.png"/>
- <copy file="../../../gameplay/res/logo_powered_white.png" tofile="assets/res/logo_powered_white.png"/>
- <copy todir="assets/res/shaders">
- <fileset dir="../../../gameplay/res/shaders"/>
- </copy>
- <copy todir="assets/res/ui">
- <fileset dir="../../../gameplay/res/ui"/>
- </copy>
- </target>
- <!-- version-tag: 1 -->
- <import file="${sdk.dir}/tools/ant/build.xml" />
- </project>
|