Switch to version 1 images (#374)

* feat: upgrade to images of version 1 (rolling tag)

* chore: indicate what needs to move out of the input class
This commit is contained in:
Webber Takken
2022-04-03 17:59:14 +02:00
committed by GitHub
parent 1bc7130fea
commit 441be81543
17 changed files with 175 additions and 139 deletions

View File

@@ -4,26 +4,27 @@ import { BuildParameters } from '..';
class SetupWindows {
public static async setup(buildParameters: BuildParameters) {
await SetupWindows.setupWindowsRun(buildParameters.platform);
const { targetPlatform } = buildParameters;
await SetupWindows.setupWindowsRun(targetPlatform);
}
//Setup prerequisite files/folders for a windows-based docker run
private static async setupWindowsRun(platform, silent = false) {
private static async setupWindowsRun(targetPlatform, silent = false) {
if (!fs.existsSync('c:/regkeys')) {
fs.mkdirSync('c:/regkeys');
}
switch (platform) {
switch (targetPlatform) {
//These all need the Windows 10 SDK
case 'StandaloneWindows':
case 'StandaloneWindows64':
case 'WSAPlayer':
this.generateWinSDKRegKeys(silent);
await this.generateWinSDKRegKeys(silent);
break;
}
}
private static async generateWinSDKRegKeys(silent = false) {
// Export registry keys that point to the location of the windows 10 sdk
// Export registry keys that point to the Windows 10 SDK
const exportWinSDKRegKeysCommand =
'reg export "HKLM\\SOFTWARE\\WOW6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0" c:/regkeys/winsdk.reg /y';
await exec(exportWinSDKRegKeysCommand, undefined, { silent });