From b1f8915f1db6bfaabb720dad841c9565b8dcb6e1 Mon Sep 17 00:00:00 2001 From: orudge Date: Wed, 30 Dec 2009 02:23:10 +0000 Subject: [PATCH] (svn r18662) -Feature: Add WarpIN-based installer for OS/2 --- os/os2/installer/download_nosound.cmd | 21 +++++ os/os2/installer/download_opengfx.cmd | 21 +++++ os/os2/installer/download_opensfx.cmd | 21 +++++ os/os2/installer/make_installer.cmd | 85 +++++++++++++++++++++ os/os2/installer/openttd.wis | 106 ++++++++++++++++++++++++++ os/os2/installer/remove_nosound.cmd | 15 ++++ os/os2/installer/remove_opengfx.cmd | 15 ++++ os/os2/installer/remove_opensfx.cmd | 15 ++++ 8 files changed, 299 insertions(+) create mode 100644 os/os2/installer/download_nosound.cmd create mode 100644 os/os2/installer/download_opengfx.cmd create mode 100644 os/os2/installer/download_opensfx.cmd create mode 100644 os/os2/installer/make_installer.cmd create mode 100644 os/os2/installer/openttd.wis create mode 100644 os/os2/installer/remove_nosound.cmd create mode 100644 os/os2/installer/remove_opengfx.cmd create mode 100644 os/os2/installer/remove_opensfx.cmd diff --git a/os/os2/installer/download_nosound.cmd b/os/os2/installer/download_nosound.cmd new file mode 100644 index 0000000000..296becf3cc --- /dev/null +++ b/os/os2/installer/download_nosound.cmd @@ -0,0 +1,21 @@ +@echo off +if "%1" == "" goto err +if "%2" == "" goto err + +echo Downloading NoSound... + +%1\wget http://binaries.openttd.org/installer/nosound-NOSOUND_VERSION.7z -O %2/data/nosound.7z + +echo Extracting NoSound... + +%1\7za x -y -O%2/data %2/data/nosound.7z +del %1\data\nosound.7z /n + +echo NoSound has been installed. +goto end + +:err +echo This batch file is only intended for use by the OpenTTD installer. +echo Please visit www.openttd.org for details on downloading NoSound. + +:end \ No newline at end of file diff --git a/os/os2/installer/download_opengfx.cmd b/os/os2/installer/download_opengfx.cmd new file mode 100644 index 0000000000..5fb0a32bc8 --- /dev/null +++ b/os/os2/installer/download_opengfx.cmd @@ -0,0 +1,21 @@ +@echo off +if "%1" == "" goto err +if "%2" == "" goto err + +echo Downloading OpenGFX... + +%1\wget http://binaries.openttd.org/installer/opengfx-OPENGFX_VERSION.7z -O %2/data/opengfx.7z + +echo Extracting OpenGFX... + +%1\7za x -y -O%2/data %2/data/opengfx.7z +del %1\data\opengfx.7z /n + +echo OpenGFX has been installed. +goto end + +:err +echo This batch file is only intended for use by the OpenTTD installer. +echo Please visit www.openttd.org for details on downloading OpenGFX. + +:end diff --git a/os/os2/installer/download_opensfx.cmd b/os/os2/installer/download_opensfx.cmd new file mode 100644 index 0000000000..0a918b95f3 --- /dev/null +++ b/os/os2/installer/download_opensfx.cmd @@ -0,0 +1,21 @@ +@echo off +if "%1" == "" goto err +if "%2" == "" goto err + +echo Downloading OpenSFX... + +%1\wget http://binaries.openttd.org/installer/opensfx-OPENSFX_VERSION.7z -O %2/data/opensfx.7z + +echo Extracting OpenSFX... + +%1\7za x -y -O%2/data %2/data/opensfx.7z +del %1\data\opensfx.7z /n + +echo OpenSFX has been installed. +goto end + +:err +echo This batch file is only intended for use by the OpenTTD installer. +echo Please visit www.openttd.org for details on downloading OpenSFX. + +:end diff --git a/os/os2/installer/make_installer.cmd b/os/os2/installer/make_installer.cmd new file mode 100644 index 0000000000..ced86094a7 --- /dev/null +++ b/os/os2/installer/make_installer.cmd @@ -0,0 +1,85 @@ +@echo off + +set OPENTTD_VERSION=1.0.0-beta1 +set OPENSFX_VERSION=0.8.0 +set NOSOUND_VERSION=0.8.0 +set OPENGFX_VERSION=0.7.0 + +echo To make the installer, you must have the WarpIN compiler (wic) installed and in +echo your path, as well as wget and unzip. This file will download the various DLLs +echo to be distributed with the installer. If you do not want to continue, please +echo press CTRL-C now. +echo. +pause + +cd ..\..\..\bundle + +if not exist SDL12.dll goto getsdl +if not exist FSLib.dll goto getsdl +goto libc + +:getsdl + +wget http://www.os2site.com/sw/dev/sdl/sdl-1.2.10-bin-20080804.zip -O dl.zip +unzip -j dl.zip SDL/FSLib.dll SDL/SDL12.dll +del dl.zip + +:libc + +if exist libc063.dll goto gcc + +wget ftp://ftp.netlabs.org/pub/gcc/libc-0.6.3-csd3.zip -O dl.zip +unzip -j dl.zip libc063.dll +del dl.zip + +:gcc + +if exist gcc442.dll goto tools + +wget http://www.owenrudge.net/various/gcc442.zip -O dl.zip +unzip -j dl.zip gcc442.dll +del dl.zip + +:tools + +cd ..\os\os2\installer +if exist tools goto opengfx + +mkdir tools +cd tools + +wget http://download.smedley.info/wget-1.11.4-os2-20090315.zip -O dl.zip +unzip -j dl.zip wget/bin/wget.exe +del dl.zip + +wget ftp://ftp.os4.su/moveton/p7zip-9.04-bin-os2.zip -O dl.zip +unzip -j dl.zip bin/7za.exe dll/ilibca.dll +del dl.zip + +cd .. + +:opengfx + +if exist opengfx goto opensfx + +mkdir opengfx +sed s/OPENGFX_VERSION/%OPENGFX_VERSION%/ < download_opengfx.cmd > opengfx\download_opengfx.cmd +copy remove_opengfx.cmd opengfx + +:opensfx +if exist opensfx goto nosound + +mkdir opensfx +sed s/OPENSFX_VERSION/%OPENSFX_VERSION%/ < download_opensfx.cmd > opensfx\download_opensfx.cmd +copy remove_opensfx.cmd opensfx + +:nosound + +mkdir nosound +sed s/NOSOUND_VERSION/%NOSOUND_VERSION%/ < download_nosound.cmd > nosound\download_nosound.cmd +copy remove_nosound.cmd nosound + +:end + +if exist openttd-%OPENTTD_VERSION%-os2.exe del openttd-%OPENTTD_VERSION%-os2.exe +wic -a openttd-%OPENTTD_VERSION%-os2.exe 1 -c../../../bundle -r * 2 -ctools -r * 3 -copengfx -r * 4 -copensfx -r * 5 -cnosound -r * -U -s openttd.wis diff --git a/os/os2/installer/openttd.wis b/os/os2/installer/openttd.wis new file mode 100644 index 0000000000..e580e565cf --- /dev/null +++ b/os/os2/installer/openttd.wis @@ -0,0 +1,106 @@ + + +OpenTTD + + + +OpenTTD is an open source transport simulation game + +Tools required for downloading the OpenGFX/SFX packs + +Downloads the OpenGFX graphics pack for OpenTTD + +Downloads the OpenSFX sound effects pack for OpenTTD + +Downloads the NoSound pack for OpenTTD, to disable sound effects + + + + + + +~Next +README.TXT +Welcome to the OpenTTD installer. This program will install OpenTTD 1.0 on your system. Before we begin the installation process, please take a moment to read the following document. + +Select "Next" to continue, or "Cancel" to abort installation. + + + + +~Next +COPYING +OpenTTD is licenced under the GNU General Public License. The text of the licence is below. + +Select "Next" if you agree to this licence. +Select "Cancel" to abort installation. + + + + +~Next +On this page, you may choose which components to install. If you don't own Transport Tycoon Deluxe, you will need to download OpenGFX (3MiB) and OpenSFX (10MiB). + + + + + +I~nstall + +Press "Install" to begin installing OpenTTD. + + + diff --git a/os/os2/installer/remove_nosound.cmd b/os/os2/installer/remove_nosound.cmd new file mode 100644 index 0000000000..6959fbf29c --- /dev/null +++ b/os/os2/installer/remove_nosound.cmd @@ -0,0 +1,15 @@ +@echo off +if "%1" == "" goto err + +echo Removing NoSound... + +del %1\data\nosound\*.* /n +rmdir %1\data\nosound + +echo NoSound has been removed. +goto end + +:err +echo This batch file is only intended for use by the OpenTTD installer. + +:end diff --git a/os/os2/installer/remove_opengfx.cmd b/os/os2/installer/remove_opengfx.cmd new file mode 100644 index 0000000000..3efe7a7d52 --- /dev/null +++ b/os/os2/installer/remove_opengfx.cmd @@ -0,0 +1,15 @@ +@echo off +if "%1" == "" goto err + +echo Removing OpenGFX... + +del %1\data\opengfx\*.* /n +rmdir %1\data\opengfx + +echo OpenGFX has been removed. +goto end + +:err +echo This batch file is only intended for use by the OpenTTD installer. + +:end diff --git a/os/os2/installer/remove_opensfx.cmd b/os/os2/installer/remove_opensfx.cmd new file mode 100644 index 0000000000..fdd88b9de5 --- /dev/null +++ b/os/os2/installer/remove_opensfx.cmd @@ -0,0 +1,15 @@ +@echo off +if "%1" == "" goto err + +echo Removing OpenSFX... + +del %1\data\opensfx\*.* /n +rmdir %1\data\opensfx + +echo OpenSFX has been removed. +goto end + +:err +echo This batch file is only intended for use by the OpenTTD installer. + +:end