MCPcopy
hub / github.com/desktop/desktop / packageWindows

Function packageWindows

script/package.ts:63–152  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61}
62
63function packageWindows() {
64 const iconSource = join(getIconDirectory(), 'icon-logo.ico')
65
66 if (!existsSync(iconSource)) {
67 console.error(`expected setup icon not found at location: ${iconSource}`)
68 process.exit(1)
69 }
70
71 const splashScreenPath = path.resolve(
72 __dirname,
73 '../app/static/logos/win32-installer-splash.gif'
74 )
75
76 if (!existsSync(splashScreenPath)) {
77 console.error(
78 `expected setup splash screen gif not found at location: ${splashScreenPath}`
79 )
80 process.exit(1)
81 }
82
83 const iconUrl = 'https://desktop.githubusercontent.com/app-icon.ico'
84
85 const nugetPkgName = getWindowsIdentifierName()
86 const options: electronInstaller.Options = {
87 name: nugetPkgName,
88 appDirectory: distPath,
89 outputDirectory: outputDir,
90 authors: getCompanyName(),
91 iconUrl: iconUrl,
92 setupIcon: iconSource,
93 loadingGif: splashScreenPath,
94 exe: `${nugetPkgName}.exe`,
95 title: productName,
96 setupExe: getWindowsStandaloneName(),
97 setupMsi: getWindowsInstallerName(),
98 }
99
100 if (shouldMakeDelta()) {
101 const url = new URL(getUpdatesURL())
102 // Make sure Squirrel.Windows isn't affected by partially or completely
103 // disabled releases.
104 url.searchParams.set('bypassStaggeredRelease', '1')
105 options.remoteReleases = url.toString()
106 }
107
108 if (isGitHubActions() && isPublishable()) {
109 assertNonNullable(process.env.RUNNER_TEMP, 'Missing RUNNER_TEMP env var')
110
111 const acsPath = join(process.env.RUNNER_TEMP, 'acs')
112 const dlibPath = join(acsPath, 'bin', 'x64', 'Azure.CodeSigning.Dlib.dll')
113
114 assertExistsSync(dlibPath)
115
116 const metadataPath = join(acsPath, 'metadata.json')
117 const acsMetadata = {
118 Endpoint: 'https://wus3.codesigning.azure.net/',
119 CodeSigningAccountName: 'GitHubInc',
120 CertificateProfileName: 'GitHubInc',

Callers 1

package.tsFile · 0.85

Calls 15

getIconDirectoryFunction · 0.90
getWindowsIdentifierNameFunction · 0.90
getCompanyNameFunction · 0.90
getWindowsStandaloneNameFunction · 0.90
getWindowsInstallerNameFunction · 0.90
shouldMakeDeltaFunction · 0.90
getUpdatesURLFunction · 0.90
isGitHubActionsFunction · 0.90
isPublishableFunction · 0.90
assertNonNullableFunction · 0.90
getDistArchitectureFunction · 0.90
getVersionFunction · 0.90

Tested by

no test coverage detected