Skip to content

Conversation

@mirage335
Copy link
Member

Summary

  • compress the ubcp Cygwin environment into a single archive when building the installer
  • expand the archive during installation rather than copying individual files

Testing

  • bash -n _prog/build-special.sh

https://chatgpt.com/codex/tasks/task_e_687b62bf77c8832c85eae0f3959bc915

Copilot AI review requested due to automatic review settings July 19, 2025 09:32
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR optimizes the installer build process by compressing the ubcp Cygwin environment folder into a ZIP archive during build time and extracting it during installation, rather than copying individual files. This approach should reduce installer size and potentially improve installation performance.

  • Adds compression of the ubcp folder using 7za with maximum compression during build
  • Updates NSIS installer script to extract the ZIP archive instead of copying individual files
  • Removes the ZIP file after extraction to clean up temporary installation artifacts

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
_prog/build-special.sh Adds 7za compression command to create ubcp.zip archive during build
_lib/nsis/ubDistBuild.nsi Updates installer to copy and extract ZIP instead of individual files


(
cd "$currentAccessoriesDir"/parts/ubcp/package_ubcp-core
7za a -tzip -mx=9 ubcp.zip ubcp
Copy link

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 7za command should include error handling. If compression fails, the build should fail rather than continue with a potentially corrupted or missing archive.

Suggested change
7za a -tzip -mx=9 ubcp.zip ubcp
if ! 7za a -tzip -mx=9 ubcp.zip ubcp; then
echo "Error: Failed to create archive with 7za. Exiting build process." >&2
exit 1
fi

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants