move installer into msbuild

This commit is contained in:
bao-qian 2016-05-08 22:26:37 +01:00
parent 4216eec494
commit c3d22335e2
6 changed files with 39 additions and 61 deletions

View file

@ -1,15 +0,0 @@
$currentPath = Convert-Path .
Write-Host "Current path: " + $currentPath
$path = $env:APPVEYOR_BUILD_FOLDER + "\Deploy\wox.nuspec"
Write-Host "nuspec path: " + $path
& nuget.exe pack $path -Version $env:APPVEYOR_BUILD_VERSION -Properties Configuration=Release
$nupkgPath = $env:APPVEYOR_BUILD_FOLDER + "\Wox." + $env:APPVEYOR_BUILD_VERSION + ".nupkg"
Write-Host "nupkg path: " + $nupkgPath
# must use Squirrel.com, Squirrel.exe will produce nothing
$squirrelPath = $env:APPVEYOR_BUILD_FOLDER + "\packages\squirrel*\tools\Squirrel.com"
Write-Host "squirrel path: " + $squirrelPath
$iconPath = $env:APPVEYOR_BUILD_FOLDER + "\Wox\Resources\app.ico"
& $squirrelPath --releasify $nupkgPath --setupIcon $iconPath --no-msi

View file

@ -11,6 +11,6 @@
<description>Wox - a launcher for windows</description>
</metadata>
<files>
<file src="..\Output\Release\**\*.*" target="lib\net45\" exclude="*.nupkg;*.vshost.*"/>
<file src="**\*.*" target="lib\net45\" exclude="Wox.vshost.exe;Wox.vshost.exe.config;*.nupkg;Setup.exe;RELEASES"/>
</files>
</package>

View file

@ -15,6 +15,6 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("1.2.0")]
[assembly: AssemblyFileVersion("1.2.0")]
[assembly: AssemblyInformationalVersion("1.2.0")]
[assembly: AssemblyVersion("1.2.0.*")]
[assembly: AssemblyFileVersion("1.2.0.*")]
[assembly: AssemblyInformationalVersion("1.2.0.*")]

View file

@ -157,7 +157,6 @@
<Compile Include="..\SolutionAssemblyInfo.cs">
<Link>Properties\SolutionAssemblyInfo.cs</Link>
</Compile>
<Compile Include="CommandArgs\ToggleCommandArg.cs" />
<Compile Include="Helper\VisibilityExtensions.cs" />
<Compile Include="Helper\SingletonWindowOpener.cs" />
<Compile Include="NotifyIconManager.cs" />
@ -172,9 +171,6 @@
<Compile Include="ViewModel\MainViewModel.cs" />
<Compile Include="ViewModel\ResultViewModel.cs" />
<Compile Include="ViewModel\ResultsViewModel.cs" />
<Compile Include="WoxUpdate.xaml.cs">
<DependentUpon>WoxUpdate.xaml</DependentUpon>
</Compile>
<Page Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@ -182,11 +178,6 @@
<Compile Include="ActionKeywords.xaml.cs">
<DependentUpon>ActionKeywords.xaml</DependentUpon>
</Compile>
<Compile Include="CommandArgs\CommandArgsFactory.cs" />
<Compile Include="CommandArgs\HideStartCommandArg.cs" />
<Compile Include="CommandArgs\ICommandArg.cs" />
<Compile Include="CommandArgs\InstallPluginCommandArg.cs" />
<Compile Include="CommandArgs\QueryCommandArg.cs" />
<Compile Include="Helper\DataWebRequestFactory.cs" />
<Compile Include="Helper\ErrorReporting.cs" />
<Compile Include="Helper\SingleInstance.cs" />
@ -224,6 +215,10 @@
<SubType>Designer</SubType>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Page Include="WoxUpdate.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Resource Include="Images\update.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
@ -332,10 +327,6 @@
<SubType>Designer</SubType>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Page>
<Page Include="WoxUpdate.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
@ -418,29 +409,31 @@
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>xcopy /Y $(ProjectDir)Themes\* $(TargetDir)Themes\
xcopy /Y /E $(ProjectDir)Images\* $(TargetDir)Images\
xcopy /Y /D /E $(SolutionDir)Plugins\HelloWorldPython\* $(TargetDir)Plugins\HelloWorldPython\*
<PostBuildEvent>
xcopy /Y $(ProjectDir)Themes\* $(TargetDir)Themes\
xcopy /Y /E $(ProjectDir)Images\* $(TargetDir)Images\
xcopy /Y /D /E $(SolutionDir)Plugins\HelloWorldPython\* $(TargetDir)Plugins\HelloWorldPython\*
if $(ConfigurationName) == Release (
cd "$(TargetDir)Plugins" &amp; del /s /q NLog.dll
cd "$(TargetDir)Plugins" &amp; del /s /q NLog.config
cd "$(TargetDir)Plugins" &amp; del /s /q Wox.Plugin.pdb
cd "$(TargetDir)Plugins" &amp; del /s /q Wox.Plugin.dll
cd "$(TargetDir)Plugins" &amp; del /s /q Wox.Core.dll
cd "$(TargetDir)Plugins" &amp; del /s /q Wox.Core.pdb
cd "$(TargetDir)Plugins" &amp; del /s /q ICSharpCode.SharpZipLib.dll
cd "$(TargetDir)Plugins" &amp; del /s /q NAppUpdate.Framework.dll
cd "$(TargetDir)Plugins" &amp; del /s /q Wox.Infrastructure.dll
cd "$(TargetDir)Plugins" &amp; del /s /q Wox.Infrastructure.pdb
cd "$(TargetDir)Plugins" &amp; del /s /q Newtonsoft.Json.dll
cd "$(TargetDir)Plugins" &amp; del /s /q JetBrains.Annotations.dll
cd "$(TargetDir)Plugins" &amp; del /s /q Pinyin4Net.dll
cd "$(TargetDir)" &amp; del /s /q *.xml
)</PostBuildEvent>
if $(ConfigurationName) == Release (
cd "$(TargetDir)Plugins" &amp; del /s /q NLog.dll
cd "$(TargetDir)Plugins" &amp; del /s /q NLog.config
cd "$(TargetDir)Plugins" &amp; del /s /q Wox.Plugin.pdb
cd "$(TargetDir)Plugins" &amp; del /s /q Wox.Plugin.dll
cd "$(TargetDir)Plugins" &amp; del /s /q Wox.Core.dll
cd "$(TargetDir)Plugins" &amp; del /s /q Wox.Core.pdb
cd "$(TargetDir)Plugins" &amp; del /s /q ICSharpCode.SharpZipLib.dll
cd "$(TargetDir)Plugins" &amp; del /s /q NAppUpdate.Framework.dll
cd "$(TargetDir)Plugins" &amp; del /s /q Wox.Infrastructure.dll
cd "$(TargetDir)Plugins" &amp; del /s /q Wox.Infrastructure.pdb
cd "$(TargetDir)Plugins" &amp; del /s /q Newtonsoft.Json.dll
cd "$(TargetDir)Plugins" &amp; del /s /q JetBrains.Annotations.dll
cd "$(TargetDir)Plugins" &amp; del /s /q Pinyin4Net.dll
cd "$(TargetDir)" &amp; del /s /q *.xml
)
</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>
@ -448,9 +441,14 @@ cd "$(TargetDir)" &amp; del /s /q *.xml
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
!-->
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
<Target Name="AfterBuild" Condition=" '$(Configuration)' == 'Release'">
<GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
<Output TaskParameter="Assemblies" ItemName="myAssemblyInfo"/>
</GetAssemblyIdentity>
<Exec Command="nuget pack $(SolutionDir)Deploy\wox.nuspec -Version %(myAssemblyInfo.Version) -Properties Configuration=Release -OutputDirectory $(TargetDir) -BasePath $(TargetDir)" />
<Exec Command="squirrel --releasify $(TargetDir)Wox.%(myAssemblyInfo.Version).nupkg --releaseDir $(TargetDir)Installer --no-msi" />
</Target>
-->
</Project>

View file

@ -8,6 +8,7 @@
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net452" />
<package id="NHotkey" version="1.2.1" targetFramework="net452" />
<package id="NHotkey.Wpf" version="1.2.1" targetFramework="net452" />
<package id="NuGet.CommandLine" version="3.4.3" targetFramework="net452" developmentDependency="true" />
<package id="SharpZipLib" version="0.86.0" targetFramework="net452" />
<package id="Splat" version="1.6.2" targetFramework="net452" />
<package id="squirrel.windows" version="1.4.0" targetFramework="net452" />

View file

@ -17,16 +17,10 @@ after_test:
.\Deploy\nuget.ps1
.\Deploy\binary_zip.ps1
.\Deploy\squirrel_installer.ps1
artifacts:
- path: 'Wox-*.zip'
name: zipped_binary
- path: '*.nupkg'
name: nuget_package
- path: '\Releases\*.exe'
name: installer
- path: '\Releases\*.nupkg'
name: installer
- path: 'Releases\RELEASES'
- path: '\Output\Releases\Installer\*.*'
name: installer