From dce3ee440b975692dcbffc96a69c69c332800940 Mon Sep 17 00:00:00 2001 From: Andrey Nekrasov Date: Wed, 5 Aug 2020 17:20:50 +0300 Subject: [PATCH] bootstrapper: use a dedicated solution (#5318) --- .pipelines/build-bootstrapper.cmd | 2 +- .pipelines/pipeline.user.windows.yml | 2 +- PowerToys.sln | 4 -- .../PowerToysBootstrapper.sln | 37 +++++++++++++++++ .../bootstrapper/bootstrapper.cpp | 11 +---- .../bootstrapper/bootstrapper.rc | 6 +-- .../bootstrapper/bootstrapper.vcxproj | 41 +++++++++++-------- .../bootstrapper/packages.config | 1 - .../bootstrapper/pch.cpp | 1 + .../PowerToysBootstrapper/bootstrapper/pch.h | 11 +++++ .../bootstrapper/resource.h | 0 11 files changed, 79 insertions(+), 37 deletions(-) create mode 100644 installer/PowerToysBootstrapper/PowerToysBootstrapper.sln rename {src => installer/PowerToysBootstrapper}/bootstrapper/bootstrapper.cpp (97%) rename {src => installer/PowerToysBootstrapper}/bootstrapper/bootstrapper.rc (89%) rename {src => installer/PowerToysBootstrapper}/bootstrapper/bootstrapper.vcxproj (74%) rename {src => installer/PowerToysBootstrapper}/bootstrapper/packages.config (64%) create mode 100644 installer/PowerToysBootstrapper/bootstrapper/pch.cpp create mode 100644 installer/PowerToysBootstrapper/bootstrapper/pch.h rename {src => installer/PowerToysBootstrapper}/bootstrapper/resource.h (100%) diff --git a/.pipelines/build-bootstrapper.cmd b/.pipelines/build-bootstrapper.cmd index e738c7b190..3d788226b7 100644 --- a/.pipelines/build-bootstrapper.cmd +++ b/.pipelines/build-bootstrapper.cmd @@ -6,5 +6,5 @@ cd .. set SolutionDir=%cd% popd SET IsPipeline=1 -call msbuild ../src/bootstrapper/bootstrapper.vcxproj /p:Configuration=Release /p:Platform=x64 /p:CIBuild=true /p:BuildProjectReferences=false /p:SolutionDir=%SolutionDir%\ || exit /b 1 +call msbuild ../installer/PowerToysBootstrapper/PowerToysBootstrapper.sln /p:Configuration=Release /p:Platform=x64 /p:CIBuild=true || exit /b 1 diff --git a/.pipelines/pipeline.user.windows.yml b/.pipelines/pipeline.user.windows.yml index 9a16fd5149..0ee9147d52 100644 --- a/.pipelines/pipeline.user.windows.yml +++ b/.pipelines/pipeline.user.windows.yml @@ -139,7 +139,7 @@ build: name: 'Build Power Toys Bootstrapper' command: '.pipelines\build-bootstrapper.cmd' artifacts: - - from: 'x64/Release' + - from: 'installer\PowerToysBootstrapper\x64\Release' to: 'Build_Installer_Output' include: - 'PowerToysSetup-*.exe' diff --git a/PowerToys.sln b/PowerToys.sln index d2b3b290c4..ca9bb2e58c 100644 --- a/PowerToys.sln +++ b/PowerToys.sln @@ -263,8 +263,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ColorPickerUI", "src\module EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "colorpicker", "colorpicker", "{1D78B84B-CA39-406C-98F4-71F7EC266CC0}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bootstrapper", "src\bootstrapper\bootstrapper.vcxproj", "{D194E3AA-F824-4CA9-9A58-034DD6B7D022}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -523,8 +521,6 @@ Global {BA58206B-1493-4C75-BFEA-A85768A1E156}.Debug|x64.Build.0 = Debug|x64 {BA58206B-1493-4C75-BFEA-A85768A1E156}.Release|x64.ActiveCfg = Release|x64 {BA58206B-1493-4C75-BFEA-A85768A1E156}.Release|x64.Build.0 = Release|x64 - {D194E3AA-F824-4CA9-9A58-034DD6B7D022}.Debug|x64.ActiveCfg = Debug|x64 - {D194E3AA-F824-4CA9-9A58-034DD6B7D022}.Release|x64.ActiveCfg = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/installer/PowerToysBootstrapper/PowerToysBootstrapper.sln b/installer/PowerToysBootstrapper/PowerToysBootstrapper.sln new file mode 100644 index 0000000000..f935a035e8 --- /dev/null +++ b/installer/PowerToysBootstrapper/PowerToysBootstrapper.sln @@ -0,0 +1,37 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30320.27 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "updating", "..\..\src\common\updating\updating.vcxproj", "{17DA04DF-E393-4397-9CF0-84DABE11032E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "..\..\src\common\common.vcxproj", "{74485049-C722-400F-ABE5-86AC52D929B3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bootstrapper", "bootstrapper\bootstrapper.vcxproj", "{D194E3AA-F824-4CA9-9A58-034DD6B7D022}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {17DA04DF-E393-4397-9CF0-84DABE11032E}.Debug|x64.ActiveCfg = Debug|x64 + {17DA04DF-E393-4397-9CF0-84DABE11032E}.Debug|x64.Build.0 = Debug|x64 + {17DA04DF-E393-4397-9CF0-84DABE11032E}.Release|x64.ActiveCfg = Release|x64 + {17DA04DF-E393-4397-9CF0-84DABE11032E}.Release|x64.Build.0 = Release|x64 + {74485049-C722-400F-ABE5-86AC52D929B3}.Debug|x64.ActiveCfg = Debug|x64 + {74485049-C722-400F-ABE5-86AC52D929B3}.Debug|x64.Build.0 = Debug|x64 + {74485049-C722-400F-ABE5-86AC52D929B3}.Release|x64.ActiveCfg = Release|x64 + {74485049-C722-400F-ABE5-86AC52D929B3}.Release|x64.Build.0 = Release|x64 + {D194E3AA-F824-4CA9-9A58-034DD6B7D022}.Debug|x64.ActiveCfg = Debug|x64 + {D194E3AA-F824-4CA9-9A58-034DD6B7D022}.Debug|x64.Build.0 = Debug|x64 + {D194E3AA-F824-4CA9-9A58-034DD6B7D022}.Release|x64.ActiveCfg = Release|x64 + {D194E3AA-F824-4CA9-9A58-034DD6B7D022}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B288A538-1B79-4782-A737-14CD9CF07F58} + EndGlobalSection +EndGlobal diff --git a/src/bootstrapper/bootstrapper.cpp b/installer/PowerToysBootstrapper/bootstrapper/bootstrapper.cpp similarity index 97% rename from src/bootstrapper/bootstrapper.cpp rename to installer/PowerToysBootstrapper/bootstrapper/bootstrapper.cpp index a951edcd74..36ef3943d9 100644 --- a/src/bootstrapper/bootstrapper.cpp +++ b/installer/PowerToysBootstrapper/bootstrapper/bootstrapper.cpp @@ -1,10 +1,4 @@ -#define WIN32_LEAN_AND_MEAN -#include -#include - -#include -#include -#include +#include "pch.h" #include #include @@ -15,11 +9,8 @@ #include #include -#include -#include #include "resource.h" -#include #include diff --git a/src/bootstrapper/bootstrapper.rc b/installer/PowerToysBootstrapper/bootstrapper/bootstrapper.rc similarity index 89% rename from src/bootstrapper/bootstrapper.rc rename to installer/PowerToysBootstrapper/bootstrapper/bootstrapper.rc index 44885243e8..37e90abfe8 100644 --- a/src/bootstrapper/bootstrapper.rc +++ b/installer/PowerToysBootstrapper/bootstrapper/bootstrapper.rc @@ -1,9 +1,9 @@ #include #include "resource.h" -#include "../common/version.h" +#include "../../../src/common/version.h" -MAINICON ICON "../runner/svgs/icon.ico" -IDR_BIN_ICON BIN "../runner/svgs/icon.ico" +MAINICON ICON "../../../src/runner/svgs/icon.ico" +IDR_BIN_ICON BIN "../../../src/runner/svgs/icon.ico" STRINGTABLE diff --git a/src/bootstrapper/bootstrapper.vcxproj b/installer/PowerToysBootstrapper/bootstrapper/bootstrapper.vcxproj similarity index 74% rename from src/bootstrapper/bootstrapper.vcxproj rename to installer/PowerToysBootstrapper/bootstrapper/bootstrapper.vcxproj index a38ecfdd4c..79293a6be3 100644 --- a/src/bootstrapper/bootstrapper.vcxproj +++ b/installer/PowerToysBootstrapper/bootstrapper/bootstrapper.vcxproj @@ -1,10 +1,9 @@ - - + - + @@ -76,6 +75,9 @@ true MultiThreaded true + ../../../src/ + Use + pch.h Windows @@ -94,6 +96,9 @@ true MultiThreadedDebug true + ../../../src/ + Use + pch.h Windows @@ -103,17 +108,14 @@ - - - - {74485049-c722-400f-abe5-86ac52d929b3} - - - {17da04df-e393-4397-9cf0-84dabe11032e} - + + Create + Create + + @@ -125,17 +127,22 @@ + + + {74485049-c722-400f-abe5-86ac52d929b3} + + + {17da04df-e393-4397-9cf0-84dabe11032e} + + - - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - + - \ No newline at end of file + diff --git a/src/bootstrapper/packages.config b/installer/PowerToysBootstrapper/bootstrapper/packages.config similarity index 64% rename from src/bootstrapper/packages.config rename to installer/PowerToysBootstrapper/bootstrapper/packages.config index 20da4fefa3..bac888e145 100644 --- a/src/bootstrapper/packages.config +++ b/installer/PowerToysBootstrapper/bootstrapper/packages.config @@ -1,5 +1,4 @@  - \ No newline at end of file diff --git a/installer/PowerToysBootstrapper/bootstrapper/pch.cpp b/installer/PowerToysBootstrapper/bootstrapper/pch.cpp new file mode 100644 index 0000000000..17305716aa --- /dev/null +++ b/installer/PowerToysBootstrapper/bootstrapper/pch.cpp @@ -0,0 +1 @@ +#include "pch.h" \ No newline at end of file diff --git a/installer/PowerToysBootstrapper/bootstrapper/pch.h b/installer/PowerToysBootstrapper/bootstrapper/pch.h new file mode 100644 index 0000000000..1310b95792 --- /dev/null +++ b/installer/PowerToysBootstrapper/bootstrapper/pch.h @@ -0,0 +1,11 @@ +#pragma once + +#define WIN32_LEAN_AND_MEAN +#include +#include + +#include +#include +#include +#include +#include \ No newline at end of file diff --git a/src/bootstrapper/resource.h b/installer/PowerToysBootstrapper/bootstrapper/resource.h similarity index 100% rename from src/bootstrapper/resource.h rename to installer/PowerToysBootstrapper/bootstrapper/resource.h