Merge pull request #1104 from JoePfeiffer/check-database

Check for database submodule and give instructions for including it if not found
This commit is contained in:
SiboVG 2022-02-01 17:54:31 +01:00 committed by GitHub
commit 3264c1ccb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,16 +160,46 @@
</for>
</target>
<!-- COPY orc files from source directories to build directory -->
<target name="copy-orc-files"
<!-- COPY orc files from source directories to build directory -->
<target name="check-database" description="check component database">
<available file="${resources-src.dir}/datafiles/components/orc" property="database"/>
</target>
<target name="copy-orc-files" depends="check-database"
description="Copy orc files">
<copy todir="${resources.dir}/datafiles/presets">
<fail message="NOTE: ${line.separator}
The component database is now a submodule, and must be included into ${line.separator}
this project to build the .jar file. ${line.separator}
${line.separator}
If you retrieved this code by cloning the openrocket repository, you ${line.separator}
must initialize and update the submodule. From the command line, ${line.separator}
this can be accomplished with ${line.separator}
% git submodule init ${line.separator}
% git submodule update ${line.separator}
${line.separator}
If you retrieved this code by downloading and uncompressing a zip file, ${line.separator}
you must do the same for the submodule. Download the code ${line.separator}
from https://github.com/dbcook/openrocket-database and uncompress it.${line.separator}
Copy the files and directories under the openrocket-database-master ${line.separator}
into ${resources-src.dir}/datafiles/components/ ${line.separator}
${line.separator}
After including the database submodule, you will be able to build
${line.separator}
the .jar file
">
<condition>
<not>
<isset property="database" />
</not>
</condition>
</fail>
<copy todir="${resources.dir}/datafiles/presets">
<fileset dir="${resources-src.dir}/datafiles/legacy_components"/>
</copy>
<copy todir="${resources.dir}/datafiles/presets">
</copy>
<copy todir="${resources.dir}/datafiles/presets">
<fileset dir="${resources-src.dir}/datafiles/components/orc"/>
</copy>
</copy>
</target>
<!-- DIST-SRC -->