Skip to content

Commit c069280

Browse files
committed
Release v3.8: harden Wine updater packaging and cmd extraction
1 parent 23bbeca commit c069280

5 files changed

Lines changed: 26 additions & 7 deletions

File tree

.github/workflows/build-and-release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
cp rsrc/lin_scripts/enable_*.sh sof_buddy/
6161
cp rsrc/lin_scripts/patch_sof_binary.sh sof_buddy/
6262
cp rsrc/lin_scripts/update_from_zip.sh sof_buddy/
63+
cp rsrc/win_scripts/update_from_zip.cmd sof_buddy/
6364
zip -r release_linux_wine.zip sof_buddy.dll sof_buddy/
6465
6566
make clean

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## v3.8
4+
5+
- Linux/Wine package completeness: `release_linux_wine.zip` now includes `update_from_zip.cmd` in CI packaging, matching the current auto-install launch path.
6+
- Windows updater script hardening: normalized relative zip paths to absolute/backslash form for extraction/deletion reliability under Wine cmd.
7+
- Extraction command robustness: `update_from_zip.cmd` now calls `tar.exe`/`7z.exe` explicitly and hardens VBScript fallback temp-file creation + `cscript.exe` probing.
8+
39
## v3.7
410

511
- Misc tab UX: updated labels to show actual cvar names (matching Profiles tab style) for faster config auditing and copy/paste workflows.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.7
1+
3.8

hdr/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
Increment version using: ./increment_version.sh
88
*/
99

10-
#define SOFBUDDY_VERSION "3.7"
10+
#define SOFBUDDY_VERSION "3.8"

rsrc/win_scripts/update_from_zip.cmd

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ if not defined ZIP_PATH (
3232
pause
3333
exit /b 1
3434
)
35+
set "ZIP_PATH=!ZIP_PATH:/=\!"
36+
if /i not "!ZIP_PATH:~1,1!"==":" set "ZIP_PATH=%ROOT_DIR%\!ZIP_PATH!"
3537
if not exist "!ZIP_PATH!" (
3638
echo Update zip not found: "!ZIP_PATH!"
3739
popd
@@ -84,13 +86,13 @@ set "ZIP=%~1"
8486

8587
where tar.exe >nul 2>&1
8688
if not errorlevel 1 (
87-
tar -xf "%ZIP%" -C "%ROOT_DIR%"
89+
tar.exe -xf "%ZIP%" -C "%ROOT_DIR%"
8890
if not errorlevel 1 exit /b 0
8991
)
9092

9193
where 7z.exe >nul 2>&1
9294
if not errorlevel 1 (
93-
7z x -y "%ZIP%" -o"%ROOT_DIR%"
95+
7z.exe x -y "%ZIP%" -o"%ROOT_DIR%"
9496
if not errorlevel 1 exit /b 0
9597
)
9698

@@ -107,7 +109,11 @@ exit /b 1
107109

108110
:extract_with_vbscript
109111
set "ZIP=%~1"
110-
set "VBS=%TEMP%\sofbuddy_unzip_%RANDOM%%RANDOM%.vbs"
112+
set "VBS_DIR=%TEMP%"
113+
if not defined VBS_DIR set "VBS_DIR=%UPDATE_DIR%"
114+
if not exist "%VBS_DIR%" set "VBS_DIR=%UPDATE_DIR%"
115+
if not exist "%VBS_DIR%" set "VBS_DIR=%ROOT_DIR%"
116+
set "VBS=%VBS_DIR%\sofbuddy_unzip_%RANDOM%%RANDOM%.vbs"
111117
(
112118
echo zipPath = WScript.Arguments(0^)
113119
echo dstPath = WScript.Arguments(1^)
@@ -119,9 +125,15 @@ set "VBS=%TEMP%\sofbuddy_unzip_%RANDOM%%RANDOM%.vbs"
119125
echo dst.CopyHere src.Items, 16
120126
echo WScript.Sleep 3000
121127
echo WScript.Quit 0
122-
) > "%VBS%"
128+
) > "%VBS%" 2>nul
129+
if not exist "%VBS%" exit /b 1
123130

124-
cscript //nologo "%VBS%" "%ZIP%" "%ROOT_DIR%" >nul
131+
where cscript.exe >nul 2>&1
132+
if errorlevel 1 (
133+
del /f /q "%VBS%" >nul 2>&1
134+
exit /b 1
135+
)
136+
cscript.exe //nologo "%VBS%" "%ZIP%" "%ROOT_DIR%" >nul
125137
set "RC=%ERRORLEVEL%"
126138
del /f /q "%VBS%" >nul 2>&1
127139

0 commit comments

Comments
 (0)