Skip to content

Commit

Permalink
[Build] Xenko.build now properly build Launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
xen2 committed Dec 6, 2018
1 parent 90ce1a0 commit 8ab5690
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 161 deletions.
4 changes: 2 additions & 2 deletions build/.nuget/NuGet.exe
Git LFS file not shown
144 changes: 0 additions & 144 deletions build/.nuget/NuGet.targets

This file was deleted.

22 changes: 9 additions & 13 deletions build/Xenko.build
Expand Up @@ -16,7 +16,7 @@ Example of use:
<NuGetPath>$(MSBuildThisFileDirectory).nuget\NuGet.exe</NuGetPath>
<XunitRunnerConsoleVersion>2.3.1</XunitRunnerConsoleVersion>
<XenkoStoreUrl Condition="'$(XenkoStoreUrl)' == ''">https://xenko-packages.azurewebsites.net/api/v2/package</XenkoStoreUrl>
<AdvancedInstallerPath Condition="'$(AdvancedInstallerPath)' == '' And Exists('$(MSBuildProgramFiles32)\Caphyon\Advanced Installer 14.4.2\bin\x86\advinst.exe')">$(MSBuildProgramFiles32)\Caphyon\Advanced Installer 14.4.2\bin\x86\advinst.exe</AdvancedInstallerPath>
<AdvancedInstallerPath Condition="'$(AdvancedInstallerPath)' == '' And Exists('$(MSBuildProgramFiles32)\Caphyon\Advanced Installer 15.5.1\bin\x86\advinst.exe')">$(MSBuildProgramFiles32)\Caphyon\Advanced Installer 15.5.1\bin\x86\advinst.exe</AdvancedInstallerPath>
</PropertyGroup>

<UsingTask TaskName="Xenko.GitVersioning.GenerateVersionFile" AssemblyFile="$(XenkoRoot)deps\Xenko.GitVersioning\bin\Debug\net472\Xenko.GitVersioning.dll" />
Expand All @@ -32,13 +32,13 @@ Example of use:
-->
<Target Name="VSIXPlugin" DependsOnTargets="Restore">
<ItemGroup>
<FilesToDeleteVSIX Include="$(MSBuildThisFileDirectory)Xenko.VisualStudio.Package.*.nupkg"/>
<FilesToDeleteVSIX Include="$(XenkoRoot)bin\launcher\*.nupkg"/>
</ItemGroup>

<Delete Files="@(FilesToDeleteVSIX)"/>

<MSBuild Targets="91-VisualStudio\Xenko_VisualStudio_Package;91-VisualStudio\Xenko_VisualStudio_PackageInstall" Projects="$(XenkoSolution).sln" Properties="$(BuildProperties);Platform=Mixed Platforms"/>
<Exec Command='"$(NuGetPath)" pack "$(XenkoRoot)sources\tools\Xenko.VisualStudio.Package\Xenko.VisualStudio.Package.nuspec" -BasePath "$(XenkoRoot)sources\tools\Xenko.VisualStudio.Package"' />
<Exec Command='"$(NuGetPath)" pack "$(XenkoRoot)sources\tools\Xenko.VisualStudio.Package\Xenko.VisualStudio.Package.nuspec" -BasePath "$(XenkoRoot)sources\tools\Xenko.VisualStudio.Package" -OutputDirectory "$(XenkoRoot)bin\launcher"' />
</Target>

<!--
Expand Down Expand Up @@ -107,16 +107,12 @@ Example of use:
<Message Text="Done preparing build for version $(XenkoPackageVersion)"/>
<TeamCitySetBuildNumber BuildNumber="$(XenkoPackageVersion)" Condition="'$(TEAMCITY_BUILD_PROPERTIES_FILE)' != '' " />
</Target>
<Target Name="Package" DependsOnTargets="PreparePackageBuild;Build;BuildEditorShaders;VSIXPlugin;PrerequisitesInstaller"/>
<Target Name="Package" DependsOnTargets="PreparePackageBuild;Build;VSIXPlugin;PrerequisitesInstaller"/>

<Target Name="CopyXenkoKey">
<Copy Condition="'$(XenkoSign)' == 'true' And Exists('$(LOCALAPPDATA)\Xenko\XenkoBuildKey\xenko.snk')" SourceFiles="$(LOCALAPPDATA)\Xenko\XenkoBuildKey\xenko.snk" DestinationFolder="$(MSBuildThisFileDirectory)"/>
</Target>

<Target Name="BuildEditorShaders">
<Exec Command="$(XenkoRoot)sources\editor\Xenko.Assets.Presentation\EditorPackage\generate-editor-package.bat" WorkingDirectory="$(XenkoRoot)sources\editor\Xenko.Assets.Presentation\EditorPackage"/>
</Target>

<Target Name="Restore">
<PropertyGroup>
<RestoreExec><![CDATA[
Expand Down Expand Up @@ -415,24 +411,24 @@ Example of use:
-->
<Target Name="PackageLauncher" DependsOnTargets="LauncherPrerequisitesInstaller">
<ItemGroup>
<FilesToDeleteLauncher Include="$(MSBuildThisFileDirectory)Xenko.Launcher*.nupkg"/>
<FilesToDeleteLauncher Include="$(XenkoRoot)bin\launcher\*.nupkg"/>
</ItemGroup>

<!-- Note: we avoid building again if BuildWindows was already ran just before -->
<Delete Files="@(FilesToDeleteLauncher)"/>

<!-- Generate the nuget package for the launcher application -->
<Exec Command='"$(NuGetPath)" pack "$(XenkoRoot)sources\launcher\Xenko.LauncherApp\Xenko.LauncherApp.nuspec" -BasePath "$(XenkoRoot)sources\launcher\Xenko.LauncherApp\bin\Release"' />
<Exec Command='"$(NuGetPath)" pack "$(XenkoRoot)sources\launcher\Xenko.LauncherApp\Xenko.LauncherApp.nuspec" -BasePath "$(XenkoRoot)sources\launcher\Xenko.LauncherApp\bin\Release" -OutputDirectory "$(XenkoRoot)bin\launcher"' />
</Target>

<!--
Package Installer: XenkoSetup.exe
-->
<Target Name="PackageInstallerSimple" DependsOnTargets="PackageLauncher">
<Delete Files="XenkoSetup.exe"/>
<Delete Files="$(XenkoRoot)bin\launcher\XenkoSetup.exe"/>
<!-- Run advanced installer -->
<Exec Command='"$(AdvancedInstallerPath)" /rebuild "$(XenkoRoot)sources\launcher\Setup\setup.aip"'/>
<Copy SourceFiles="$(XenkoRoot)sources\launcher\Setup\setup-SetupFiles\XenkoSetup.exe" DestinationFolder="$(MSBuildThisFileDirectory)"/>
<Copy SourceFiles="$(XenkoRoot)sources\launcher\Setup\setup-SetupFiles\XenkoSetup.exe" DestinationFolder="$(XenkoRoot)bin\launcher"/>
</Target>
<Target Name="PackageInstallerCustom" DependsOnTargets="PackageLauncher">
<Error Condition="'$(CustomInstaller)' == '' Or '$(CustomInstallerStoreUrl)' == ''" Text="When CustomInstaller is set, CustomInstallerStoreUrl also needs to be defined"/>
Expand Down Expand Up @@ -497,7 +493,7 @@ Example of use:

<Target Name="BuildLauncher" DependsOnTargets="CopyXenkoKey">
<Exec Command='"$(NuGetPath)" restore "$(XenkoSolutionLauncher).sln"' />
<MSBuild Targets="Build" Projects="$(XenkoSolutionLauncher).sln" Properties="$(BuildProperties);Platform=Any CPU"/>
<MSBuild Targets="Build" Projects="$(XenkoSolutionLauncher).sln" Properties="$(BuildProperties);XenkoSignTool=true;Platform=Any CPU"/>
</Target>

</Project>
2 changes: 1 addition & 1 deletion sources/launcher/Setup/setup.aip
Expand Up @@ -82,7 +82,7 @@
<COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
<ROW File="Xenko.exe" Component_="Xenko.exe" FileName="Xenko.exe" Attributes="0" SourcePath="..\Xenko.LauncherApp\bin\Release\Xenko.exe" SelfReg="false" NextFile="store.config"/>
<ROW File="Xenko.exe.config" Component_="store.config" FileName="XENKOE~1.CON|Xenko.exe.config" Attributes="0" SourcePath="..\Xenko.LauncherApp\bin\Release\Xenko.exe.config" SelfReg="false" NextFile="launcherprerequisites.exe"/>
<ROW File="launcherprerequisites.exe" Component_="launcherprerequisites.exe" FileName="LAUNCH~1.EXE|launcher-prerequisites.exe" Attributes="0" SourcePath="..\Prerequisites\launcher-prerequisites.exe" SelfReg="false" DigSign="true"/>
<ROW File="launcherprerequisites.exe" Component_="launcherprerequisites.exe" FileName="LAUNCH~1.EXE|launcher-prerequisites.exe" Attributes="0" SourcePath="..\Prerequisites\launcher-prerequisites.exe" SelfReg="false"/>
<ROW File="store.config" Component_="store.config" FileName="STORE~1.CON|store.config" Attributes="0" SourcePath="..\Xenko.LauncherApp\bin\Release\store.config" SelfReg="false" NextFile="Xenko.exe.config"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.AiRemoveFileComponent">
Expand Down
2 changes: 1 addition & 1 deletion sources/launcher/Xenko.Launcher/Xenko.Launcher.csproj
Expand Up @@ -40,7 +40,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;XENKO_LAUNCHER</DefineConstants>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
Expand Down

0 comments on commit 8ab5690

Please sign in to comment.