Ver Fonte

Updated vcmibuilder:
- disabled download command (will re-enable near release)
- removed no longer necessary vcmi package handling
- removed wog installation since it can be installed from Launcher

Ivan Savenko há 11 anos atrás
pai
commit
0b6d94f113
1 ficheiros alterados com 8 adições e 48 exclusões
  1. 8 48
      vcmibuilder

+ 8 - 48
vcmibuilder

@@ -28,10 +28,8 @@ do
 		--gog) gog_file=$2          ; shift 2 ;;
 		--gog) gog_file=$2          ; shift 2 ;;
 		--data) data_dir=$2         ; shift 2 ;;
 		--data) data_dir=$2         ; shift 2 ;;
 		--dest) dest_dir=$2         ; shift 2 ;;
 		--dest) dest_dir=$2         ; shift 2 ;;
-		--wog) wog_archive=$2       ; shift 2 ;;
-		--vcmi) vcmi_archive=$2     ; shift 2 ;;
 		--convertMP3) useffmpeg=true; shift 1 ;;
 		--convertMP3) useffmpeg=true; shift 1 ;;
-		--download) download=true   ; shift 1 ;;
+#		--download) download=true   ; shift 1 ;;
 		--validate) validate=true   ; shift 1 ;;
 		--validate) validate=true   ; shift 1 ;;
 		*) print_help=true          ; shift 1 ;;
 		*) print_help=true          ; shift 1 ;;
 	esac
 	esac
@@ -52,18 +50,12 @@ then
 	echo
 	echo
 	echo " --data DIRECTORY " "Path to installed Heroes 3 data"
 	echo " --data DIRECTORY " "Path to installed Heroes 3 data"
 	echo
 	echo
-	echo " --wog ARCHIVE    " "Path to manually downloaded WoG archive"
-	echo "                  " "Requires unzip"
-	echo
-	echo " --vcmi ARCHIVE   " "Path to manually downloaded VCMI data package"
-	echo "                  " "Requires unzip"
-	echo
 	echo " --convertMP3     " "Convert all mp3 files into ogg/vorbis"
 	echo " --convertMP3     " "Convert all mp3 files into ogg/vorbis"
 	echo "                  " "Requires ffmpeg or avconv"
 	echo "                  " "Requires ffmpeg or avconv"
 	echo
 	echo
-	echo " --download       " "Automatically download requied packages using wget"
-	echo "                  " "Requires wget and Internet connection"
-	echo
+#	echo " --download       " "Automatically download optional package using wget"
+#	echo "                  " "Requires wget and Internet connection"
+#	echo
 	echo " --dest DIRECTORY " "Path where resulting data will be placed. Default is ~/.vcmi"
 	echo " --dest DIRECTORY " "Path where resulting data will be placed. Default is ~/.vcmi"
 	echo
 	echo
 	echo " --validate       " "Run basic validness checks"
 	echo " --validate       " "Run basic validness checks"
@@ -129,18 +121,7 @@ then
 	test_utility "unshield" "-V"
 	test_utility "unshield" "-V"
 fi
 fi
 
 
-if [[ -n "$download" ]] 
-then
-	if [[ -n "$wog_archive" ]] && [[ -n "$vcmi_archive" ]]
-	then
-		warning "Warning: Both wog and vcmi archives were specified. Download option will not be used"
-		unset download
-	else
-		test_utility "wget" "-V"
-	fi
-fi
-
-if [[ -n "$download" ]] || [[ -n "$wog_archive" ]] || [[ -n "$vcmi_archive" ]]
+if [[ -n "$download" ]]
 then
 then
 	test_utility "unzip"
 	test_utility "unzip"
 fi
 fi
@@ -150,11 +131,6 @@ then
 	warning "Warning: Selected options will not create complete Heroes 3 data!"
 	warning "Warning: Selected options will not create complete Heroes 3 data!"
 fi
 fi
 
 
-if [[ -z "$download" ]] && ( [[ -z "$wog_archive" ]] || [[ -z "$vcmi_archive" ]])
-then
-	warning "Warning: Selected options will not create complete VCMI data!"
-fi
-
 # if at least one warning has been printed - ask for confirmation
 # if at least one warning has been printed - ask for confirmation
 if [[ -n "$warn_user" ]]
 if [[ -n "$warn_user" ]]
 then
 then
@@ -245,23 +221,8 @@ fi
 
 
 if [[ -n "$download" ]]
 if [[ -n "$download" ]]
 then
 then
-	if [[ -z "$wog_archive" ]]
-	then
-		wget "http://download.vcmi.eu/WoG/wog.zip" -O "$temp_dir"/wog.zip || fail "Error: failed to download WoG archive!" "rm -f wog.zip"
-		wog_archive="$temp_dir"/wog.zip
-	fi
-
-	if [[ -z "$vcmi_archive" ]]
-	then
-		wget "http://download.vcmi.eu/core.zip" -O "$temp_dir"/core.zip || fail "Error: failed to download VCMI archive!" "rm -f core.zip"
-		vcmi_archive="$temp_dir"/core.zip
-	fi
-fi
-
-if [[ -n "$wog_archive" ]]
-then
-	echo "decompressing $wog_archive"
-	unzip -qo "$wog_archive" -d "$dest_dir" || fail "Error: failed to extract WoG archive!"
+	wget "http://download.vcmi.eu/core.zip" -O "$temp_dir"/core.zip || fail "Error: failed to download VCMI archive!" "rm -f core.zip"
+	vcmi_archive="$temp_dir"/core.zip
 fi
 fi
 
 
 if [[ -n "$vcmi_archive" ]]
 if [[ -n "$vcmi_archive" ]]
@@ -272,7 +233,7 @@ fi
 
 
 if [[ -n "$useffmpeg" ]]
 if [[ -n "$useffmpeg" ]]
 then
 then
-	# now when all music files (including WoG theme) were installed convert them to ogg
+	# now when all music files were installed convert them to ogg
 	echo "Converting mp3 files..."
 	echo "Converting mp3 files..."
 
 
 	OIFS="$IFS"
 	OIFS="$IFS"
@@ -294,7 +255,6 @@ then
 	test -f "$dest_dir"/Data/H3bitmap.lod || fail "Error: Heroes 3 data files are missing!"
 	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/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 -f "$dest_dir"/Data/VIDEO.VID    || fail "Error: Heroes 3 data files (CD2) are missing!"
-	test -d "$dest_dir"/Mods/WoG/Data     || fail "Error: WoG data files are missing!"
 	test -d "$dest_dir"/Mods/vcmi/Data    || fail "Error: VCMI data files are missing!"
 	test -d "$dest_dir"/Mods/vcmi/Data    || fail "Error: VCMI data files are missing!"
 fi
 fi