Added changes to ANT build script to adapt to new stationapi repository

This commit is contained in:
Cekis
2021-11-28 20:43:00 -08:00
committed by GitHub
parent 417941c602
commit d5c5585292

View File

@@ -257,10 +257,13 @@
<!-- Prepares the Station API (chat server) code for building -->
<target name="prepare_chat" description="creates a symbolic link to the udplibrary">
<mkdir dir="${chat_build}"/>
<mkdir dir="${basedir}/chat"/>
<symlink link="${stationapi}/externals/udplibrary" resource="${src_library}/udplibrary" overwrite="true"/>
</target>
<target name="cleanup_chat" description="removes the symbolic link to the udplibrary">
<!-- Cleans up the station chat compilation process -->
<target name="clean_chat" description="removes the symbolic link to the udplibrary">
<delete dir="${chat_build}"/>
<symlink action="delete" link="${stationapi}/externals/udplibrary"/>
</target>
@@ -268,12 +271,16 @@
<target name="compile_chat" description="compile chat server code" depends="prepare_chat">
<exec executable="cmake" dir="${chat_build}" failonerror="true">
<arg value="${stationapi}"/>
<arg value="-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${build}/bin"/>
<arg value="-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${basedir}/chat"/>
</exec>
<exec executable="cmake" dir="${chat_build}" failonerror="true">
<arg value="--build"/>
<arg value="."/>
</exec>
<copy file="${stationapi}/extras/logger.cfg.dist" tofile="${basedir}/chat/logger.cfg"/>
<copy file="${stationapi}/extras/swgchat.cfg.dist" tofile="${basedir}/chat/swgchat.cfg"/>
<copy file="${stationapi}/extras/stationchat.db.dist" tofile="${basedir}/chat/stationchat.db"/>
<copy file="${stationapi}/extras/init_database.sql" tofile="${basedir}/chat/init_database.sql"/>
</target>
<!-- Compiles the DSRC (Java) code -->