Skip to content

Commit 70b9204

Browse files
Change in logo and app metadata
1 parent 035e16c commit 70b9204

File tree

5 files changed

+21
-11
lines changed

5 files changed

+21
-11
lines changed

artifacts/SHA256SUMS.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
f40d4385cd950a8840994d4dd5470d46e2bcae6197db3995e82d6d675dd9d2b4 cloudsqlctl-setup.exe
2-
2d60abcf708184f85bd3ac4a7c1fcfaedf6addba0ab70590c78ab3f6855272a0 cloudsqlctl.exe
1+
9c386fc39b15281ee76335079c70397b9efb480cdb147c2facb40d737f2daea9 cloudsqlctl-setup.exe
2+
432227b6c359f810dbd647cdd72ecaa87433c3a8600718ec628bfe10be51c883 cloudsqlctl.exe

bin/cloudsqlctl.exe

270 KB
Binary file not shown.

tools/build-sea.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,18 @@ node --experimental-sea-config dist/sea-config.json
3232
Write-Host "Copying node.exe..."
3333
Copy-Item (Get-Command node).Source "dist/cloudsqlctl-base.exe"
3434

35-
# 5. Inject blob
35+
# 5. Set Icon/Metadata (Before injection to avoid rcedit issues with SEA blobs)
36+
Write-Host "Setting icon and metadata..."
37+
node tools/set-icon.mjs "dist/cloudsqlctl-base.exe"
38+
39+
# 6. Inject blob
3640
Write-Host "Injecting blob..."
3741
npx postject dist/cloudsqlctl-base.exe NODE_SEA_BLOB dist/sea-prep.blob --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2
3842

39-
# 6. Move to bin
43+
# 7. Move to bin
4044
Write-Host "Finalizing..."
4145
Move-Item -Path "dist/cloudsqlctl-base.exe" -Destination "bin/cloudsqlctl.exe" -Force
4246

43-
# 7. Set Icon (if available)
44-
Write-Host "Setting icon..."
45-
node tools/set-icon.mjs
46-
4747
# 8. Sign Executable (Optional)
4848
Write-Host "Attempting to sign executable..."
4949
./tools/sign-exe.ps1

tools/set-icon.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ const packageJsonPath = path.resolve(__dirname, '../package.json');
1111
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
1212
const { version } = packageJson;
1313

14-
const exePath = path.resolve(__dirname, '../bin/cloudsqlctl.exe');
14+
const defaultExePath = path.resolve(__dirname, '../bin/cloudsqlctl.exe');
15+
const targetArg = process.argv[2];
16+
const exePath = targetArg ? path.resolve(process.cwd(), targetArg) : defaultExePath;
17+
1518
const iconPath = path.resolve(__dirname, '../assets/logo.ico');
1619

1720
async function main() {

tools/sign-exe.ps1

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
param(
22
[string]$ExePath = "bin\cloudsqlctl.exe",
33
[string]$CertPath = "$env:CLOUDSQLCTL_SIGN_CERT",
4-
[SecureString]$CertPassword = "$env:CLOUDSQLCTL_SIGN_PWD"
4+
[string]$CertPassword = "$env:CLOUDSQLCTL_SIGN_PWD"
55
)
66

77
$ErrorActionPreference = "Stop"
@@ -20,7 +20,14 @@ if (-not $CertPath -or -not (Test-Path $CertPath)) {
2020
Write-Host "Signing $ExePath with certificate $CertPath..."
2121

2222
try {
23-
$cert = Get-PfxCertificate -FilePath $CertPath
23+
if ($CertPassword) {
24+
$securePass = ConvertTo-SecureString -String $CertPassword -AsPlainText -Force
25+
$cert = Get-PfxCertificate -FilePath $CertPath -Password $securePass
26+
}
27+
else {
28+
$cert = Get-PfxCertificate -FilePath $CertPath
29+
}
30+
2431
Set-AuthenticodeSignature -FilePath $ExePath -Certificate $cert -TimestampServer "http://timestamp.digicert.com"
2532
Write-Host "Successfully signed $ExePath"
2633
}

0 commit comments

Comments
 (0)