-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+++ cranko-release-info-v1 [[projects]] qnames = ["OculusWrap", "csproj"] version = "2.3.5.0" age = 5 [[projects]] qnames = ["MakeDataCabinetFile", "csproj"] version = "1.0.1.0" age = 4 [[projects]] qnames = ["WWTCoreUWP", "csproj"] version = "6.0.2.0" age = 4 [[projects]] qnames = ["WWTCore", "csproj"] version = "6.0.14.0" age = 4 [[projects]] qnames = ["WWTExplorer", "csproj"] version = "6.0.903.0" age = 0 [[projects]] qnames = ["UwpRenderEngine", "csproj"] version = "6.0.2.0" age = 4 [[projects]] qnames = ["WWTHolographic", "csproj"] version = "6.0.2.0" age = 4 [[projects]] qnames = ["WorldWideTelescope", "csproj"] version = "6.0.2.0" age = 4 +++
- Loading branch information
Showing
6 changed files
with
98 additions
and
71 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
// custom_actions.js <msi-file> | ||
// | ||
// Performs post-build fixups of our MSI. | ||
|
||
// Constant values from Windows Installer: | ||
var msiOpenDatabaseModeTransact = 1; | ||
|
||
var msiViewModifyInsert = 1; | ||
var msiViewModifyUpdate = 2; | ||
var msiViewModifyAssign = 3; | ||
var msiViewModifyReplace = 4; | ||
var msiViewModifyDelete = 6; | ||
|
||
var msidbCustomActionTypeInScript = 0x00000400; | ||
var msidbCustomActionTypeNoImpersonate = 0x00000800; | ||
|
||
if (WScript.Arguments.Length != 1) { | ||
WScript.StdErr.WriteLine(WScript.ScriptName + " file"); | ||
WScript.Quit(1); | ||
} | ||
|
||
var filespec = WScript.Arguments(0); | ||
var installer = WScript.CreateObject("WindowsInstaller.Installer"); | ||
var database = installer.OpenDatabase(filespec, msiOpenDatabaseModeTransact); | ||
|
||
function MakeActionsNoImpersonate() { | ||
var sql = "SELECT `Action`, `Type`, `Source`, `Target` FROM `CustomAction`"; | ||
var view = database.OpenView(sql); | ||
view.Execute(); | ||
|
||
var record = view.Fetch(); | ||
|
||
while (record) { | ||
if (record.IntegerData(2) & msidbCustomActionTypeInScript) { | ||
record.IntegerData(2) = record.IntegerData(2) | msidbCustomActionTypeNoImpersonate; | ||
view.Modify(msiViewModifyReplace, record); | ||
} | ||
|
||
record = view.Fetch(); | ||
} | ||
|
||
view.Close(); | ||
} | ||
|
||
function SetConditionOfAction(action, table, condition) { | ||
var sql = "SELECT `Action`, `Condition`, `Sequence` FROM " + table + " WHERE `Action`='" + action + "'"; | ||
var view = database.OpenView(sql); | ||
view.Execute(); | ||
|
||
var record = view.Fetch(); | ||
|
||
record.StringData(2) = condition; | ||
view.Modify(msiViewModifyReplace, record); | ||
view.Close(); | ||
} | ||
|
||
try { | ||
// Change all deferred custom actions to NoImpersonate: | ||
MakeActionsNoImpersonate(); | ||
|
||
// Don't override AUTOUPDATE if it was specified on the command line: | ||
SetConditionOfAction("CustomCheckA_SetProperty_CHECKBOX1", "InstallExecuteSequence", "NOT(AUTOUPDATE)"); | ||
SetConditionOfAction("CustomCheckA_SetProperty_CHECKBOX1", "InstallUISequence", "NOT(AUTOUPDATE)"); | ||
|
||
database.Commit(); | ||
} catch (e) { | ||
WScript.StdErr.WriteLine(e); | ||
WScript.Quit(1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters