Browse Source

Add ZipFromMsi to build process

pull/32/merge
Christoph Wille 13 years ago
parent
commit
6a9ab97540
  1. 12
      src/Automated.proj
  2. 5
      src/Tools/Tools.build
  3. 9
      src/Tools/ZipFromMsi/Program.cs

12
src/Automated.proj

@ -45,6 +45,7 @@ @@ -45,6 +45,7 @@
<CallTarget Targets="build"/>
<CallTarget Targets="createsetup"/>
<CallTarget Targets="createxcopydeployablezip"/>
<CallTarget Targets="buildunittests"/>
<CallTarget Targets="rununittests"/>
@ -52,6 +53,7 @@ @@ -52,6 +53,7 @@
<CallTarget Targets="clean2"/>
<CallTarget Targets="zipsource"/>
<CallTarget Targets="addnote" Condition=" '$(IsOfficialBuildServer)' == 'True' "/>
</Target>
<Target Name="build">
@ -133,6 +135,16 @@ @@ -133,6 +135,16 @@
</Target>
<Target Name="createxcopydeployablezip">
<MSBuild Projects="$(SharpDevelopSrc)\Tools\Tools.build"
Targets="PrepareXcopyZip"
Properties="Configuration=Release"/>
<Move SourceFiles="$(SharpDevelopSrc)\Tools\ZipFromMsi\bin\Debug\SharpDevelopStandalone.zip"
DestinationFiles="$(ArtefactsOutputDir)\$(ArtefactPrefix)$(BuildNumber).Xcopyable.zip"/>
</Target>
<Target Name="zipsource">
<CreateItem Include="$(ProjectDir)\**"
Exclude="$(ProjectDir)\**\.svn\**;$(ProjectDir)\**\obj\**;$(ProjectDir)\.git\**;$(ProjectDir)\.git*;$(ProjectDir)\build\**">

5
src/Tools/Tools.build

@ -57,6 +57,11 @@ @@ -57,6 +57,11 @@
<Exec Command="UpdateAssemblyInfo.exe --REVISION" WorkingDirectory = "UpdateAssemblyInfo\bin\Debug" Timeout = "60000" Condition = " '$(BranchName)' == '' "/>
</Target>
<Target Name="PrepareXcopyZip">
<MSBuild Projects="ZipFromMsi\ZipFromMsi.csproj" Targets="Build" Properties="Configuration=Debug"/>
<Exec Command="ZipFromMsi.exe" WorkingDirectory = "ZipFromMsi\bin\Debug" Timeout = "60000" />
</Target>
<ItemGroup>
<CleanupFiles Include="..\..\bin\*"/>
<CleanupFiles Include="..\Main\GlobalAssemblyInfo.cs"/>

9
src/Tools/ZipFromMsi/Program.cs

@ -17,7 +17,7 @@ namespace ZipFromMsi @@ -17,7 +17,7 @@ namespace ZipFromMsi
private const string ElementNameComponent = "Component";
private const string ElementNameFile = "File";
// TODO: Promote to parameters / app-computed local variables
// NOTE: App has to be started in bin\Debug working directory, otherwise those paths don't work
private const string WxsFilename = "../../../../Setup/Files.wxs";
public static string RelativePathToolToSetupFolder = "..\\..\\..\\";
@ -27,12 +27,7 @@ namespace ZipFromMsi @@ -27,12 +27,7 @@ namespace ZipFromMsi
static void Main(string[] args)
{
// TODO: Pass name of zip file
// TODO: Auto-detect relative path (maybe see UpdateAssemblyInfo)
string zipFileName = DateTime.Now.Ticks.ToString() + ".Standalone.zip";
CreateZip(zipFileName, LoadWxsFile(WxsFilename));
CreateZip("SharpDevelopStandalone.zip", LoadWxsFile(WxsFilename));
}
static void CreateZip(string zipFileName, XDocument doc)

Loading…
Cancel
Save