feat(unreal): consolidate map compression scripts#4805
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR consolidates Unreal map compression functionality by replacing separate scripts for Unreal and Unreal 2 with a unified, more robust solution that supports broader file types and provides improved user experience.
- Replaces
compress_ut99_maps.shandcompress_unreal2_maps.shwith a singlecompress_unreal_maps.shscript - Updates command definitions to use unified
cmd_map_compressor_unrealfor all Unreal engines - Adds missing
core_exit.shcall toinstall_ut2k4_key.shand disables SC2154 shellcheck warning
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| lgsm/modules/compress_unreal_maps.sh | New unified compression script supporting multiple file types with improved error handling |
| lgsm/modules/compress_ut99_maps.sh | Removed old UT99-specific compression script |
| lgsm/modules/compress_unreal2_maps.sh | Removed old Unreal 2-specific compression script |
| lgsm/modules/core_getopt.sh | Updated to use single unified map compressor command |
| lgsm/modules/core_modules.sh | Removed reference to deleted compress_ut99_maps.sh |
| lgsm/modules/install_ut2k4_key.sh | Added missing core_exit.sh call |
| .shellcheckrc | Added SC2154 disable rule |
25f5b40 to
b92aecb
Compare
* Removed `compress_ut99_maps.sh` and integrated its functionality into `compress_unreal_maps.sh`. * Updated `core_getopt.sh` to reference the new unified compression script. * Cleaned up `core_modules.sh` by removing the obsolete function for `compress_ut99_maps.sh`. * Added `core_exit.sh` call to `install_ut2k4_key.sh` for consistent exit handling.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Updated the loop to iterate over the `exts` array correctly using `"${exts[@]}"` instead of `${exts}`.
* This change ensures proper handling of file extensions during the compression process.
b92aecb to
49f5cd3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request consolidates and improves the Unreal map compression modules in the project. It replaces the previous separate scripts for Unreal and Unreal 2 map compression with a unified and more robust script, updates the command definitions and options accordingly, and removes redundant code. The main benefits are easier maintenance, broader file type support, and improved user experience.
Module Consolidation and Improvements:
compress_unreal_maps.shscript that compresses both Unreal and Unreal 2 maps, supports a wider range of file types, provides better output, and handles old compressed files more robustly.compress_ut99_maps.shandcompress_unreal2_maps.shscripts, as their functionality is now covered by the new unified script. [1] [2]Command and Option Updates:
core_getopt.shto define a singlecmd_map_compressor_unrealcommand for all Unreal engines, replacing the previous separate commands for UT99 and Unreal 2. Also updated the logic that adds this command based on the engine type. [1] [2]Other Improvements:
core_exit.shcall to the end ofinstall_ut2k4_key.shfor consistent script termination..shellcheckrcto avoid false positives about undefined variables.Fixes #3632
Type of change
Checklist
PR will not be merged until all steps are complete.
developbranch as its base.Documentation
If documentation does need updating either update it by creating a PR (preferred) or request a documentation update.
Thank you for your Pull Request!