1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00

Merge pull request #1201 from IvanSavenko/vcmibuilder_fix

[1.1] vcmibuilder script fixes
This commit is contained in:
Ivan Savenko 2022-12-12 00:15:32 +02:00 committed by GitHub
commit 4e41544818
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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" ]]
@ -248,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"