Skip to content

Commit

Permalink
implement disabling extension installation
Browse files Browse the repository at this point in the history
  • Loading branch information
MishaProductions committed Nov 28, 2023
1 parent 5893c12 commit c8fcb8f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
6 changes: 4 additions & 2 deletions Setup/Cosmos.iss
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ FlatComponentsList=False
AlwaysShowComponentsList=False
ShowComponentSizes=False
LicenseFile=LICENSE.txt
DisableDirPage=no
DisableDirPage=no
WizardStyle=modern

[Messages]
SelectDirDesc=If the user installing the Cosmos User Kit is not the admin, please choose the users AppData/Roaming directory
Expand Down Expand Up @@ -143,12 +144,13 @@ UseRelativePaths=True
Filename: "{app}\Build\Tools\nuget.exe"; Parameters: "sources Remove -Name ""Cosmos Local Package Feed"""; WorkingDir: "{app}"; Description: "Uninstall Kernel Packages"; StatusMsg: "Uninstalling Kernel Packages"
Filename: "{app}\Build\Tools\nuget.exe"; Parameters: "sources Add -Name ""Cosmos Local Package Feed"" -Source ""{app}\packages\\"""; WorkingDir: "{app}"; Description: "Install Kernel Packages"; StatusMsg: "Installing Kernel Packages"
Filename: "{app}\Build\Tools\nuget.exe"; Parameters: "nuget locals all -Clear"; WorkingDir: "{app}"; Description: "Install Kernel Packages"; StatusMsg: "Clearing nuget cache"

#ifndef DoNotInstallExtensions
Filename: "{app}\Build\Tools\VSIXBootstrapper.exe"; Parameters: "/q /u:Cosmos.VS.ProjectSystem"; Description: "Remove Cosmos Project System"; StatusMsg: "Removing Visual Studio Extension: Cosmos Project System"
Filename: "{app}\Build\Tools\VSIXBootstrapper.exe"; Parameters: "/q /u:Cosmos.VS.DebugEngine"; Description: "Remove Cosmos Debug Engine"; StatusMsg: "Removing Visual Studio Extension: Cosmos Debug Engine"

Filename: "{app}\Build\Tools\VSIXBootstrapper.exe"; Parameters: "/q Cosmos.VS.DebugEngine.vsix"; WorkingDir: "{app}\VSIX\"; Description: "Install Cosmos Debug Engine"; StatusMsg: "Installing Visual Studio Extension: Cosmos Debug Engine"
Filename: "{app}\Build\Tools\VSIXBootstrapper.exe"; Parameters: "/q Cosmos.VS.ProjectSystem.vsix"; WorkingDir: "{app}\VSIX\"; Description: "Install Cosmos Project System"; StatusMsg: "Installing Visual Studio Extension: Cosmos Project System"
#endif

[UninstallRun]
Filename: "{app}\Build\Tools\nuget.exe"; Parameters: "sources Remove -Name ""Cosmos Local Package Feed"""; WorkingDir: "{app}"; StatusMsg: "Uninstalling Kernel Packages"
Expand Down
10 changes: 8 additions & 2 deletions source/Cosmos.Build.Builder/BuildTasks/CreateSetupTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public CreateSetupTask(
IInnoSetupService innoSetupService,
string scriptFilePath,
string configuration,
string releaseVersion)
string releaseVersion,
bool InstallExtensions)
: base(true, false)
{
_innoSetupService = innoSetupService;
Expand All @@ -30,7 +31,12 @@ public CreateSetupTask(
{
["BuildConfiguration"] = configuration,
["ChangeSetVersion"] = releaseVersion,
};
};

if(!InstallExtensions)
{
_defines.Add("DoNotInstallExtensions", "1");
}

// when building the userkit we want to let innosetup determine the installation location
// see https://github.com/CosmosOS/Cosmos/issues/2329
Expand Down
3 changes: 2 additions & 1 deletion source/Cosmos.Build.Builder/CosmosBuildDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ void CleanPackage(string aPackage)
_innoSetupService,
innoSetupScriptPath,
App.BuilderConfiguration.UserKit ? "UserKit" : "DevKit",
cosmosSetupVersion);
cosmosSetupVersion,
App.BuilderConfiguration.BuildExtensions);

if (!App.BuilderConfiguration.UserKit)
{
Expand Down

0 comments on commit c8fcb8f

Please sign in to comment.