+
+ <!-- CONVERT vendor csv to ORC files -->
+ <macrodef name="build-orc-file">
+ <attribute name="dir"/>
+ <attribute name="vendor"/>
+ <sequential>
+ <echo>Generating ORC file for vendor @{vendor}</echo>
+ <java classname="net.sf.openrocket.preset.loader.RocksimComponentFileTranslator"
+ fork="true"
+ classpathref="run-classpath"
+ failonerror="true">
+ <arg value="@{dir}"/>
+ <arg value="resources/datafiles/presets/@{vendor}.orc"/>
+ </java>
+ </sequential>
+ </macrodef>
+
+ <target name="generate-orc-files"
+ description="Generate ORC file from vendor csv"
+ depends="build">
+
+ <for param="vendor-dir">
+ <dirset dir="resources-src/datafiles/rocksim_components"
+ includes="*"/>
+ <sequential>
+ <propertyregex property="vendor"
+ override="true"
+ input="@{vendor-dir}"
+ select="\1"
+ regexp=".*[/\\]([^/\\]*)$"/>
+ <build-orc-file dir="@{vendor-dir}" vendor="${vendor}"/>
+ </sequential>
+ </for>
+ </target>