nmea0183.build
来自「提取各种NEMA0183格式数据的类编程。」· BUILD 代码 · 共 138 行
BUILD
138 行
<?xml version="1.0" ?>
<project name="NMEA0183 Class Library" default="all" basedir=".">
<description>C++ framework for parsing NMEA1083 sentences.</description>
<property name="ProjectName" value="NMEA0183" />
<tstamp property="ProjectVersion" pattern="yyyyMMdd" verbose="false" />
<target name="release" description="Release">
<!-- find out where dev studio is on this machine -->
<xmlpeek file="/machinesettings.nant" property="devenv" xpath="/nant/devenv" />
<exec program="${devenv}" commandline="${ProjectName}.sln /build "Release"" />
</target>
<target name="debug" description="Debug">
<!-- find out where dev studio is on this machine -->
<xmlpeek file="/machinesettings.nant" property="devenv" xpath="/nant/devenv" />
<exec program="${devenv}" commandline="${ProjectName}.sln /build "Debug"" />
</target>
<target name="test" description="Tests all releases of NMEA0183" />
<target name="all" description="Builds all Release versions.">
<call target="test" />
</target>
<target name="clean" description="Gets rid of all compiler generated files.">
<delete dir="Debug" failonerror="false" />
<delete dir="Release" failonerror="false" />
</target>
<target name="zip" description="Make a ZIP file with the source in it.">
<delete file="NMEA0183.ZIP" failonerror="false" />
<delete dir="doc" failonerror="false"/>
<delete dir="../NMEA0183Source" failonerror="false" />
<mkdir dir="../NMEA0183Source/NMEA0183" />
<copy todir="../NMEA0183Source/NMEA0183" >
<fileset basedir="." >
<include name="*.bin" />
<include name="*.build" />
<include name="*.c" />
<include name="*.cfg" />
<include name="*.cpp" />
<include name="*.def" />
<include name="*.dlg" />
<include name="*.h" />
<include name="*.hpp" />
<include name="*.ico" />
<include name="*.rc" />
<include name="*.rc2" />
<include name="*.sln" />
<include name="*.vcproj" />
<exclude name="*/Test/**" />
</fileset>
</copy>
<zip ziplevel="9" zipfile="nmea0183.zip" >
<fileset basedir="../NMEA0183Source">
<include name="**" />
</fileset>
</zip>
<delete dir="../NMEA0183Source" failonerror="false" />
</target>
<target name="install" description="Make an installation file with the source in it.">
<!-- find out where dev studio is on this machine -->
<xmlpeek file="/machinesettings.nant" property="innocompiler" xpath="/nant/innocompiler" />
<xmlpeek file="/machinesettings.nant" property="Distributables" xpath="/nant/distributables" />
<property name="DistributionDirectory" value="/NMEA0183Install" />
<delete dir="doc" failonerror="false"/>
<delete dir="${DistributionDirectory}" failonerror="false" />
<mkdir dir="${DistributionDirectory}" />
<copy todir="${DistributionDirectory}" >
<fileset basedir="." >
<include name="*.bin" />
<include name="*.build" />
<include name="*.c" />
<include name="*.cfg" />
<include name="*.cpp" />
<include name="*.def" />
<include name="*.dlg" />
<include name="*.h" />
<include name="*.hpp" />
<include name="*.ico" />
<include name="*.rc" />
<include name="*.rc2" />
<include name="*.sln" />
<include name="*.vcproj" />
<exclude name="*/Test/**" />
</fileset>
</copy>
<!-- Now write the config file for Inno Setup -->
<script language="C#">
<code><![CDATA[
public static void ScriptMain( Project project )
{
PropertyDictionary pd = project.Properties;
string project_name = pd[ "ProjectName" ];
string version_string = pd[ "ProjectVersion" ];
string setup_filename = project_name + "_" + version_string + "_Setup";
StreamWriter sw = new StreamWriter( pd[ "DistributionDirectory" ] + @"\" + project_name + ".iss" );
sw.WriteLine( "[Setup]" );
sw.WriteLine( "AppName={0}", project_name + " " + version_string );
sw.WriteLine( "AppVerName={0} version {1}", project_name, version_string );
sw.WriteLine( "DefaultDirName={{pf}}\\{0}", project_name );
sw.WriteLine( "DefaultGroupName={0}", project_name );
sw.WriteLine( "Compression=lzma" );
sw.WriteLine( "SolidCompression=yes" );
sw.WriteLine( "OutputDir={0}", pd[ "Distributables" ] );
sw.WriteLine( "OutputBaseFilename={0}", setup_filename );
sw.WriteLine( "" );
sw.WriteLine( "[Files]" );
sw.WriteLine( "Source: \"*\"; Excludes: \"*.iss\"; DestDir: \"{app}\"" );
sw.Close();
}
]]></code>
</script>
<exec program="${innocompiler}" workingdir="${DistributionDirectory}" commandline="${ProjectName}.iss" />
<delete dir="${DistributionDirectory}" failonerror="false" />
</target>
<target name="publish" description="Zip the source and publish it on my website." depends="zip">
<xmlpeek file="/nant.variables" xpath="/nant/nmea0183/ftp/server" property="ftp.server" />
<xmlpeek file="/nant.variables" xpath="/nant/nmea0183/ftp/account" property="ftp.account" />
<xmlpeek file="/nant.variables" xpath="/nant/nmea0183/ftp/password" property="ftp.password" />
<xmlpeek file="/nant.variables" xpath="/nant/nmea0183/ftp/directory" property="ftp.directory" />
<ftp server="${ftp.server}" remotepath="${ftp.directory}">
<credentials username="${ftp.account}" password="${ftp.password}" />
<up-binary>
<include name="nmea0183.zip" />
<include name="index.html" />
<include name="sentences.htm" />
</up-binary>
</ftp>
</target>
</project>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?