Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions _lib/nsis/ubDistBuild.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,12 @@ Section "Install"
SetOutPath "C:\core\infrastructure\ubDistBuild"
File /r "..\..\..\ubDistBuild-accessories\parts\ubDistBuild\*"

SetOutPath "C:\core\infrastructure\ubDistBuild\_local\ubcp"
File /r "..\..\..\ubDistBuild-accessories\parts\ubcp\package_ubcp-core\ubcp\*"
SetOutPath "C:\core\infrastructure\ubDistBuild\_local"
File "..\..\..\ubDistBuild-accessories\integrations\ubcp\package_ubcp-core.7z"
SetOutPath "C:\core\infrastructure\ubDistBuild\_lib\7zip"
File "..\..\..\ubDistBuild-accessories\integrations\7zip\7zr.exe"
nsExec::ExecToLog '"C:\core\infrastructure\ubDistBuild\_lib\7zip\7zr.exe" x "C:\core\infrastructure\ubDistBuild\_local\package_ubcp-core.7z" -o"C:\core\infrastructure\ubDistBuild\_local\ubcp" -y'
Delete "C:\core\infrastructure\ubDistBuild\_local\package_ubcp-core.7z"

;ATTENTION
Rename "C:\core\infrastructure\ubDistBuild-backup-uninstalled\_local\vm.img" "C:\core\infrastructure\ubDistBuild\_local\vm.img"
Expand Down
7 changes: 7 additions & 0 deletions _prog/build-special.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ _build_ubDistBuild-fetch() {
7za -y x "$currentAccessoriesDir"/integrations/ubcp/package_ubcp-core.7z
cd "$functionEntryPWD"

mkdir -p "$currentAccessoriesDir"/integrations/7zip
if [[ ! -e "$currentAccessoriesDir"/integrations/7zip/7zr.exe ]]
then
wget -O "$currentAccessoriesDir"/integrations/7zip/7zr.exe \
'https://www.7-zip.org/a/7zr.exe'
Copy link
Preview

Copilot AI Jul 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wget command lacks error handling. If the download fails, the script will continue and the subsequent NSIS installation will fail. Consider adding error checking after the wget command.

Suggested change
'https://www.7-zip.org/a/7zr.exe'
'https://www.7-zip.org/a/7zr.exe' || { echo "Error: Failed to download 7zr.exe"; exit 1; }

Copilot uses AI. Check for mistakes.

fi


cd "$currentAccessoriesDir"/parts
if [[ "$objectName" == "ubDistBuild" ]]
Expand Down