1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-07 14:55:30 +02:00

fix(build): clean up temporary files and update surfer dependency to 1.11.7

This commit is contained in:
Mr. M 2025-04-13 18:04:47 +02:00
parent 3932ec21f5
commit 897932f954
6 changed files with 58 additions and 12 deletions

View file

@ -281,6 +281,11 @@ jobs:
run: |
set -x
mkdir obj-${{ matrix.arch }}-pc-windows-msvc/
rm -rf engine/obj-${{ matrix.arch }}-pc-windows-msvc/_tests
rm -rf engine/obj-${{ matrix.arch }}-pc-windows-msvc/config/autoconf.mk
rm -rf engine/obj-${{ matrix.arch }}-pc-windows-msvc/config.statusd/substs/
cp -r --no-dereference engine/obj-${{ matrix.arch }}-pc-windows-msvc/* obj-${{ matrix.arch }}-pc-windows-msvc/ || true
- name: Upload dist object

View file

@ -0,0 +1,7 @@
(New-Object System.Net.WebClient).DownloadFile("https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe", "C:\MozillaBuildSetup-Latest.exe")
C:\MozillaBuildSetup-Latest.exe /S | out-null
rustup target add aarch64-pc-windows-msvc
rustup target add x86_64-pc-windows-msvc
cp -r tests engine/browser/base/zen-components/

View file

@ -27,17 +27,20 @@ Start-Job -Name "DownloadGitl10n" -ScriptBlock {
echo "Fetched l10n and firefox's one"
} -Verbose -ArgumentList $PWD -Debug
Start-Job -Name "SurferInit" -ScriptBlock {
param($PWD)
cd $PWD
surfer -- ci --brand release
npm run import
} -Verbose -ArgumentList $PWD -Debug
gh run download $GithubRunId --name windows-x64-obj-arm64 -D windsign-temp\windows-x64-obj-arm64
echo "Downloaded arm64 artifacts"
gh run download $GithubRunId --name windows-x64-obj-x86_64 -D windsign-temp\windows-x64-obj-x86_64
echo "Downloaded x86_64 artifacts"
Wait-Job -Name "DownloadGitl10n"
mkdir engine\obj-x86_64-pc-windows-msvc\ -ErrorAction SilentlyContinue
surfer -- ci --brand release
# Collect all .exe and .dll files into a list
$files = Get-ChildItem windsign-temp\windows-x64-obj-x86_64\ -Recurse -Include *.exe
$files += Get-ChildItem windsign-temp\windows-x64-obj-x86_64\ -Recurse -Include *.dll
@ -47,12 +50,23 @@ $files += Get-ChildItem windsign-temp\windows-x64-obj-arm64\ -Recurse -Include *
signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha256 /v $files
$env:ZEN_RELEASE="true"
$env:SURFER_SIGNING_MODE="true"
Wait-Job -Name "SurferInit"
Wait-Job -Name "DownloadGitl10n"
function SignAndPackage($name) {
echo "Executing on $name"
rmdir .\dist -Recurse -ErrorAction SilentlyContinue
rmdir engine\obj-x86_64-pc-windows-msvc\ -Recurse -ErrorAction SilentlyContinue
cp windsign-temp\windows-x64-obj-$name engine\obj-x86_64-pc-windows-msvc\ -Recurse
echo "Signing $name"
# Configure each time since we are cloning from a linux environment into
# a windows environment, and the build system is not smart enough to detect that
# we are on a different platform.
cd .\engine
.\mach configure
cd ..
echo "Packaging $name"
$env:MAR="..\\build\\winsign\\mar.exe"

9
package-lock.json generated
View file

@ -9,7 +9,7 @@
"version": "1.0.0",
"license": "MPL-2.0",
"dependencies": {
"@zen-browser/surfer": "^1.11.6"
"@zen-browser/surfer": "^1.11.7"
},
"devDependencies": {
"husky": "^9.1.7",
@ -288,9 +288,10 @@
"license": "MIT"
},
"node_modules/@zen-browser/surfer": {
"version": "1.11.6",
"resolved": "https://registry.npmjs.org/@zen-browser/surfer/-/surfer-1.11.6.tgz",
"integrity": "sha512-oKYjpNTPZV3vRxDf7r7pkvYlyNwL8cpsVbVzlb57xCwn7lamXsUioh1mLCSounJ+8cl8bWXhezrnXKXbVjyGww==",
"version": "1.11.7",
"resolved": "https://registry.npmjs.org/@zen-browser/surfer/-/surfer-1.11.7.tgz",
"integrity": "sha512-ltIjDwPiSKmnKYjlTtD307t5h9+igi7YZu3pNlFl0SgvmTGRv9Ayit6CPllN5HGaMoI9jftOSeAaeFX2uRG4Yg==",
"license": "MPL-2.0",
"dependencies": {
"@resvg/resvg-js": "^1.4.0",
"async-icns": "^1.0.2",

View file

@ -40,7 +40,7 @@
},
"homepage": "https://github.com/zen-browser/desktop#readme",
"dependencies": {
"@zen-browser/surfer": "^1.11.6"
"@zen-browser/surfer": "^1.11.7"
},
"devDependencies": {
"husky": "^9.1.7",

View file

@ -1,4 +1,4 @@
set -ex
set -x
if ! [ -z "$ZEN_L10N_CURR_DIR" ]; then
cd $ZEN_L10N_CURR_DIR
@ -21,6 +21,16 @@ cd firefox-l10n
git checkout $LAST_FIREFOX_L10N_COMMIT
cd $CURRENT_DIR
rsyncExists=$(command -v rsync)
if [ -z "$rsyncExists" ]; then
echo "rsync not found, using cp instead"
else
echo "rsync found!"
fi
set -e
update_language() {
langId=$1
cd ./l10n
@ -28,11 +38,20 @@ update_language() {
echo "Updating $langId"
# move the contents from ../firefox-l10n/$langId to ./l10n/$langId
rsync -av --progress ../firefox-l10n/$langId/ . --exclude .git
# if rsync exists, use it
# if not, use cp
if [ -z "$rsyncExists" ]; then
cp -r $CURRENT_DIR/l10n/firefox-l10n/$langId/* .
else
rsync -av --progress ../firefox-l10n/$langId/ . --exclude .git
fi
cd $CURRENT_DIR
}
# remove "\r" from ./l10n/supported-languages
sed -i 's/\r$//' ./l10n/supported-languages
export PATH=~/tools/git-cinnabar:$PATH
for lang in $(cat ./l10n/supported-languages); do
update_language $lang