From 68cbac96aff990afc92daa8a18f4dafea4335179 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Mon, 5 Dec 2022 17:24:11 +0200 Subject: [PATCH 1/2] Fixed data extraction from gog.com installer --- vcmibuilder | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vcmibuilder b/vcmibuilder index 919878814..c3f5b3ef3 100755 --- a/vcmibuilder +++ b/vcmibuilder @@ -168,13 +168,19 @@ mkdir -p "$temp_dir" if [[ -n "$gog_file" ]] then - data_dir="$temp_dir"/app + data_dir="$temp_dir"/gog mkdir -p "$data_dir" # innoextract always reports error (iconv 84 error). Just test file for presence test -f "$gog_file" || fail "Error: gog.com executable was not found!" gog_file="$(cd "$(dirname "$gog_file")"; pwd)/$(basename "$gog_file")" cd "$data_dir" && innoextract "$gog_file" + + # some versions of gog.com installer (or innoextract tool?) place game files inside /app directory + if [[ -d "$data_dir"/app ]] + then + data_dir="$data_dir"/app + fi fi if [[ -n "$cd1_dir" ]] From 96caceba79adb6e73b1a09f1a7b0134134b983ae Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Mon, 5 Dec 2022 17:34:05 +0200 Subject: [PATCH 2/2] Fixed validation of extracted data --- vcmibuilder | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vcmibuilder b/vcmibuilder index c3f5b3ef3..08b78ab31 100755 --- a/vcmibuilder +++ b/vcmibuilder @@ -254,10 +254,10 @@ fi if [[ -n "$validate" ]] then - test -f "$dest_dir"/Data/H3bitmap.lod || fail "Error: Heroes 3 data files are missing!" - test -f "$dest_dir"/Data/H3sprite.lod || fail "Error: Heroes 3 data files are missing!" - test -f "$dest_dir"/Data/VIDEO.VID || fail "Error: Heroes 3 data files (CD2) are missing!" - test -d "$dest_dir"/Mods/vcmi/Data || fail "Error: VCMI data files are missing!" + test -f "$dest_dir"/[Dd][Aa][Tt][Aa]/H3bitmap.lod || fail "Error: Heroes 3 data files are missing!" + test -f "$dest_dir"/[Dd][Aa][Tt][Aa]/H3sprite.lod || fail "Error: Heroes 3 data files are missing!" + test -f "$dest_dir"/[Dd][Aa][Tt][Aa]/VIDEO.VID || fail "Error: Heroes 3 data files (CD2) are missing!" + #test -d "$dest_dir"/Mods/vcmi/Data || fail "Error: VCMI data files are missing!" fi rm -rf "$temp_dir"