Skip to content

Commit

Permalink
Extract resources from Gold CD CAB (#9534)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarev0k authored Feb 7, 2025
1 parent f2642b8 commit ff3f860
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions script/homm2/extract_homm2_resources_from_cd_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,23 @@ function stage_iso_assets {
fi

copy_directory "$HOMM2_DIR" "ANIM"
copy_directory "$HOMM2_DIR" "MAPS"
copy_directory "$HOMM2_DIR" "DATA"

DATA_CAB_PATH=$(find "ROM" -type f -iname data1.cab)
if [[ -n "$DATA_CAB_PATH" ]]; then
if [[ -z "$(command -v unshield)" ]]; then
echo_red "unshield was not found in your system. Unable to extract 'data1.cab'. Installation aborted."
exit 1
fi
unshield -d "CAB" x "$DATA_CAB_PATH" > /dev/null

copy_directory "CAB" "MAPS"
copy_directory "CAB" "DATA"

rm -rf CAB
else
copy_directory "$HOMM2_DIR" "MAPS"
copy_directory "$HOMM2_DIR" "DATA"
fi

fusermount -u ROM
trap - RETURN
Expand Down

0 comments on commit ff3f860

Please sign in to comment.