Skip to content

Commit 02f59a4

Browse files
author
Codesphere Developer
committed
fix(ci): patch branding scripts to fix silent windows installer failure
This commit ensures .iss files are correctly branded by enforcing 'Codesphere' over 'VSCodium' and 'Microsoft Corporation', and prevents prepare_vscode.sh from overwriting code.iss configuration.
1 parent cb217da commit 02f59a4

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

ci/ci-branding.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ if [ -f "$VSCODIUM_DIR/prepare_vscode.sh" ]; then
5858
# Comment out hardcoded VSCodium branding in the stable block
5959
# We use a broad replacement to ensure all setpaths for branding are neutralized
6060
perl -pi -e 's/setpath "product" "(nameShort|nameLong|applicationName|linuxIconName|urlProtocol|serverApplicationName|serverDataFolderName|darwinBundleIdentifier|win32AppUserModelId|win32DirName|win32MutexName|win32NameVersion|win32RegValueName|win32ShellNameShort)" ".*"/# branding parameter suppressed by Codesphere patch/' "$VSCODIUM_DIR/prepare_vscode.sh"
61+
62+
# Prevent prepare_vscode.sh from messing with code.iss (we handle it in enforce-branding.sh)
63+
echo "🔧 Patching prepare_vscode.sh to leave code.iss alone..."
64+
perl -pi -e 's/sed -i .s\|Microsoft Corporation\|VSCodium\|. build\/win32\/code.iss/# code.iss modification suppressed/' "$VSCODIUM_DIR/prepare_vscode.sh"
65+
perl -pi -e 's/sed -i .s\|https:\/\/code.visualstudio.com\|https:\/\/vscodium.com\|. build\/win32\/code.iss/# code.iss modification suppressed/' "$VSCODIUM_DIR/prepare_vscode.sh"
6166

6267
# Ensure the product.json merge at the end doesn't overwrite our product.json if we want to be safe,
6368
# but our product.json IS the one we want to merge with anyway.

ci/enforce-branding.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,33 @@ cd "$VSCODE_DIR" || exit 1
2828
# though we already updated product.json to point to Codesphere's own URLs.
2929

3030
echo " Replacing 'VSCodium' -> 'Codesphere'..."
31-
find . -type f \( -name "*.ts" -o -name "*.js" -o -name "*.html" -o -name "*.json" -o -name "*.md" \) \
31+
find . -type f \( -name "*.ts" -o -name "*.js" -o -name "*.html" -o -name "*.json" -o -name "*.md" -o -name "*.iss" -o -name "*.xml" -o -name "*.spec.template" -o -name "*.yaml" -o -name "*.template" \) \
3232
-not -path "*/node_modules/*" -not -path "*/.git/*" \
3333
-exec perl -pi -e 's/(?<!github.com\/)(?<!\@)VSCodium/Codesphere/g' {} +
3434

3535
echo " Replacing 'vscodium' -> 'codesphere'..."
36-
find . -type f \( -name "*.ts" -o -name "*.js" -o -name "*.html" -o -name "*.json" -o -name "*.md" \) \
36+
find . -type f \( -name "*.ts" -o -name "*.js" -o -name "*.html" -o -name "*.json" -o -name "*.md" -o -name "*.iss" -o -name "*.xml" -o -name "*.spec.template" -o -name "*.yaml" -o -name "*.template" \) \
3737
-not -path "*/node_modules/*" -not -path "*/.git/*" \
3838
-exec perl -pi -e 's/(?<!github.com\/)(?<!\@)vscodium/codesphere/g' {} +
3939

4040
echo " Replacing 'Visual Studio Code' -> 'Codesphere IDE'..."
41-
find . -type f \( -name "*.ts" -o -name "*.js" -o -name "*.html" -o -name "*.json" -o -name "*.md" \) \
41+
find . -type f \( -name "*.ts" -o -name "*.js" -o -name "*.html" -o -name "*.json" -o -name "*.md" -o -name "*.iss" -o -name "*.xml" -o -name "*.spec.template" -o -name "*.yaml" -o -name "*.template" \) \
4242
-not -path "*/node_modules/*" -not -path "*/.git/*" \
4343
-exec perl -pi -e 's/Visual Studio Code/Codesphere IDE/g' {} +
4444

4545
echo " Replacing 'VS Code' -> 'Codesphere'..."
46-
find . -type f \( -name "*.ts" -o -name "*.js" -o -name "*.html" -o -name "*.json" -o -name "*.md" \) \
46+
find . -type f \( -name "*.ts" -o -name "*.js" -o -name "*.html" -o -name "*.json" -o -name "*.md" -o -name "*.iss" -o -name "*.xml" -o -name "*.spec.template" -o -name "*.yaml" -o -name "*.template" \) \
4747
-not -path "*/node_modules/*" -not -path "*/.git/*" \
4848
-exec perl -pi -e 's/VS Code/Codesphere/g' {} +
4949

50+
echo " Replacing 'Microsoft Corporation' -> 'Codesphere'..."
51+
find . -type f \( -name "*.ts" -o -name "*.js" -o -name "*.html" -o -name "*.json" -o -name "*.md" -o -name "*.iss" -o -name "*.xml" -o -name "*.spec.template" -o -name "*.yaml" -o -name "*.template" \) \
52+
-not -path "*/node_modules/*" -not -path "*/.git/*" \
53+
-exec perl -pi -e 's/Microsoft Corporation/Codesphere/g' {} +
54+
55+
echo " Replacing 'code.visualstudio.com' -> 'codesphere.com'..."
56+
find . -type f \( -name "*.ts" -o -name "*.js" -o -name "*.html" -o -name "*.json" -o -name "*.md" -o -name "*.iss" -o -name "*.xml" -o -name "*.spec.template" -o -name "*.yaml" -o -name "*.template" \) \
57+
-not -path "*/node_modules/*" -not -path "*/.git/*" \
58+
-exec perl -pi -e 's/code.visualstudio.com/codesphere.com/g' {} +
59+
5060
echo "✅ Source code branding enforcement complete!"

0 commit comments

Comments
 (0)