Merge pull request #1678 from JoePfeiffer/fix-1668a
Tidy up directories a little and better identify legacy components
This commit is contained in:
commit
ac03049277
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -1,3 +1,3 @@
|
|||||||
[submodule "swing/resources-src/datafiles/components"]
|
[submodule "swing/resources-src/datafiles/components"]
|
||||||
path = swing/resources-src/datafiles/components
|
path = swing/resources-src/datafiles/components-dbcook
|
||||||
url = https://github.com/dbcook/openrocket-database.git
|
url = https://github.com/dbcook/openrocket-database.git
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
<target name="clean" description="Removes all build artifacts">
|
<target name="clean" description="Removes all build artifacts">
|
||||||
<delete dir="${build.dir}"/>
|
<delete dir="${build.dir}"/>
|
||||||
<delete dir="${tmp.dir}/"/>
|
<delete dir="${tmp.dir}/"/>
|
||||||
<delete dir="${resources.dir}/datafiles/presets"/>
|
<delete dir="${resources.dir}/datafiles/components"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
@ -144,7 +144,7 @@
|
|||||||
classpathref="run-classpath"
|
classpathref="run-classpath"
|
||||||
failonerror="true">
|
failonerror="true">
|
||||||
<arg value="@{dir}"/>
|
<arg value="@{dir}"/>
|
||||||
<arg value="${resources-src.dir}/datafiles/presets/@{vendor}.orc"/>
|
<arg value="${resources-src.dir}/datafiles/components-openrocket/@{vendor}.orc"/>
|
||||||
</java>
|
</java>
|
||||||
</sequential>
|
</sequential>
|
||||||
</macrodef>
|
</macrodef>
|
||||||
@ -169,7 +169,7 @@
|
|||||||
|
|
||||||
<!-- COPY orc files from source directories to build directory -->
|
<!-- COPY orc files from source directories to build directory -->
|
||||||
<target name="check-database" description="check component database">
|
<target name="check-database" description="check component database">
|
||||||
<available file="${resources-src.dir}/datafiles/components/orc" property="database"/>
|
<available file="${resources-src.dir}/datafiles/components-dbcook/orc" property="database"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="copy-orc-files" depends="check-database"
|
<target name="copy-orc-files" depends="check-database"
|
||||||
@ -188,8 +188,8 @@ ${line.separator}
|
|||||||
If you retrieved this code by downloading and uncompressing a zip file, ${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}
|
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}
|
from https://github.com/dbcook/openrocket-database and uncompress it.${line.separator}
|
||||||
Copy the files and directories under the openrocket-database-master ${line.separator}
|
Copy the files and directories under openrocket-database-master ${line.separator}
|
||||||
into ${resources-src.dir}/datafiles/components/ ${line.separator}
|
into ${resources-src.dir}/datafiles/components-dbcook/ ${line.separator}
|
||||||
${line.separator}
|
${line.separator}
|
||||||
After including the database submodule, you will be able to build
|
After including the database submodule, you will be able to build
|
||||||
${line.separator}
|
${line.separator}
|
||||||
@ -201,15 +201,15 @@ the .jar file
|
|||||||
</not>
|
</not>
|
||||||
</condition>
|
</condition>
|
||||||
</fail>
|
</fail>
|
||||||
<copy todir="${resources.dir}/datafiles/presets">
|
<copy todir="${resources.dir}/datafiles/components">
|
||||||
<fileset dir="${resources-src.dir}/datafiles/legacy_components"/>
|
<fileset dir="${resources-src.dir}/datafiles/components-openrocket"/>
|
||||||
</copy>
|
</copy>
|
||||||
<copy todir="${resources.dir}/datafiles/presets">
|
<copy todir="${resources.dir}/datafiles/components">
|
||||||
<fileset dir="${resources-src.dir}/datafiles/components/orc"/>
|
<fileset dir="${resources-src.dir}/datafiles/components-dbcook/orc"/>
|
||||||
</copy>
|
</copy>
|
||||||
<copy
|
<copy
|
||||||
file="${resources-src.dir}/datafiles/components/LICENSE"
|
file="${resources-src.dir}/datafiles/components-dbcook/LICENSE"
|
||||||
todir="${resources.dir}/datafiles/presets">
|
todir="${resources.dir}/datafiles/components">
|
||||||
</copy>
|
</copy>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<OpenRocketComponent>
|
<OpenRocketComponent>
|
||||||
<Version>0.1</Version>
|
<Version>0.1</Version>
|
||||||
|
<Legacy />
|
||||||
<Materials>
|
<Materials>
|
||||||
<Material UnitsOfMeasure="g/cm3">
|
<Material UnitsOfMeasure="g/cm3">
|
||||||
<Name>Balsa</Name>
|
<Name>Balsa</Name>
|
@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<OpenRocketComponent>
|
<OpenRocketComponent>
|
||||||
<Version>0.1</Version>
|
<Version>0.1</Version>
|
||||||
|
<Legacy />
|
||||||
<Materials>
|
<Materials>
|
||||||
<Material UnitsOfMeasure="g/cm3">
|
<Material UnitsOfMeasure="g/cm3">
|
||||||
<Name>Balsa</Name>
|
<Name>Balsa</Name>
|
@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<OpenRocketComponent>
|
<OpenRocketComponent>
|
||||||
<Version>0.1</Version>
|
<Version>0.1</Version>
|
||||||
|
<Legacy />
|
||||||
<Materials>
|
<Materials>
|
||||||
<Material UnitsOfMeasure="g/cm3">
|
<Material UnitsOfMeasure="g/cm3">
|
||||||
<Name>Birch</Name>
|
<Name>Birch</Name>
|
@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<OpenRocketComponent>
|
<OpenRocketComponent>
|
||||||
<Version>0.1</Version>
|
<Version>0.1</Version>
|
||||||
|
<Legacy />
|
||||||
<Materials>
|
<Materials>
|
||||||
<Material UnitsOfMeasure="g/m">
|
<Material UnitsOfMeasure="g/m">
|
||||||
<Name>1/16 In. braided nylon</Name>
|
<Name>1/16 In. braided nylon</Name>
|
@ -28,7 +28,7 @@ public class ComponentPresetDatabaseLoader extends AsynchronousDatabaseLoader {
|
|||||||
|
|
||||||
private final static Logger log = LoggerFactory.getLogger(ComponentPresetDatabaseLoader.class);
|
private final static Logger log = LoggerFactory.getLogger(ComponentPresetDatabaseLoader.class);
|
||||||
|
|
||||||
private static final String SYSTEM_PRESET_DIR = "datafiles/presets";
|
private static final String SYSTEM_PRESET_DIR = "datafiles/components";
|
||||||
private int fileCount = 0;
|
private int fileCount = 0;
|
||||||
private int presetCount = 0;
|
private int presetCount = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user