Changeset - r6168:ff75f9d34777
[Not reviewed]
master
3 12 5
Darkvater - 17 years ago 2007-02-27 16:51:49
darkvater@openttd.org
(svn r8926) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, etc.
20 files changed with 426 insertions and 624 deletions:
0 comments (0 inline, 0 general)
COPYING
Show inline comments
 
		    GNU GENERAL PUBLIC LICENSE
 
		       Version 2, June 1991
 
                    GNU GENERAL PUBLIC LICENSE
 
                       Version 2, June 1991
 

	
 
 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
 
                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
 
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
 Everyone is permitted to copy and distribute verbatim copies
 
 of this license document, but changing it is not allowed.
 

	
 
			    Preamble
 
                            Preamble
 

	
 
  The licenses for most software are designed to take away your
 
freedom to share and change it.  By contrast, the GNU General Public
 
@@ -15,7 +15,7 @@ software--to make sure the software is f
 
General Public License applies to most of the Free Software
 
Foundation's software and to any other program whose authors commit to
 
using it.  (Some other Free Software Foundation software is covered by
 
the GNU Library General Public License instead.)  You can apply it to
 
the GNU Lesser General Public License instead.)  You can apply it to
 
your programs, too.
 

	
 
  When we speak of free software, we are referring to freedom, not
 
@@ -55,8 +55,8 @@ patent must be licensed for everyone's f
 

	
 
  The precise terms and conditions for copying, distribution and
 
modification follow.
 

 
		    GNU GENERAL PUBLIC LICENSE
 

	
 
                    GNU GENERAL PUBLIC LICENSE
 
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 

	
 
  0. This License applies to any program or other work which contains
 
@@ -110,7 +110,7 @@ above, provided that you also meet all o
 
    License.  (Exception: if the Program itself is interactive but
 
    does not normally print such an announcement, your work based on
 
    the Program is not required to print an announcement.)
 

 

	
 
These requirements apply to the modified work as a whole.  If
 
identifiable sections of that work are not derived from the Program,
 
and can be reasonably considered independent and separate works in
 
@@ -168,7 +168,7 @@ access to copy from a designated place, 
 
access to copy the source code from the same place counts as
 
distribution of the source code, even though third parties are not
 
compelled to copy the source along with the object code.
 

 

	
 
  4. You may not copy, modify, sublicense, or distribute the Program
 
except as expressly provided under this License.  Any attempt
 
otherwise to copy, modify, sublicense or distribute the Program is
 
@@ -225,7 +225,7 @@ impose that choice.
 

	
 
This section is intended to make thoroughly clear what is believed to
 
be a consequence of the rest of this License.
 

 

	
 
  8. If the distribution and/or use of the Program is restricted in
 
certain countries either by patents or by copyrighted interfaces, the
 
original copyright holder who places the Program under this License
 
@@ -255,7 +255,7 @@ make exceptions for this.  Our decision 
 
of preserving the free status of all derivatives of our free software and
 
of promoting the sharing and reuse of software generally.
 

	
 
			    NO WARRANTY
 
                            NO WARRANTY
 

	
 
  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
 
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
 
@@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE
 
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
 
POSSIBILITY OF SUCH DAMAGES.
 

	
 
		     END OF TERMS AND CONDITIONS
 

 
	    How to Apply These Terms to Your New Programs
 
                     END OF TERMS AND CONDITIONS
 

	
 
            How to Apply These Terms to Your New Programs
 

	
 
  If you develop a new program, and you want it to be of the greatest
 
possible use to the public, the best way to achieve this is to make it
 
@@ -303,10 +303,9 @@ the "copyright" line and a pointer to wh
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
    GNU General Public License for more details.
 

	
 
    You should have received a copy of the GNU General Public License
 
    along with this program; if not, write to the Free Software
 
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 

	
 
    You should have received a copy of the GNU General Public License along
 
    with this program; if not, write to the Free Software Foundation, Inc.,
 
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 

	
 
Also add information on how to contact you by electronic and paper mail.
 

	
 
@@ -336,5 +335,5 @@ necessary.  Here is a sample; alter the 
 
This General Public License does not permit incorporating your program into
 
proprietary programs.  If your program is a subroutine library, you may
 
consider it more useful to permit linking proprietary applications with the
 
library.  If this is what you want to do, use the GNU Library General
 
library.  If this is what you want to do, use the GNU Lesser General
 
Public License instead of this License.
changelog.txt
Show inline comments
 
0.5.0 (2007-02-27)
 
------------------------------------------------------------------------
 
- Feature: Add the ability to load newer TTDP games (the tile information for coasts has changed) (r8738)
 
- Feature: Selecting "end of orders" and deleting will delete all the vehicle's orders (shared mode unchanged) (r8685)
 
- Codechange: Call GetFirstVehicleInChain only for trains thus increasing performance in large games (r8744)
 
- Fix: Possible crashes, problems with aircraft and airport removal (r8921)
 
- Fix: Do not show the 'edit sign' window for spectators (r8808)
 
- Fix: Adhere order types for ship order insertion to determine destination type (r8802)
 
- Fix: It was possible to take over buoys by building a station next to them (r8794)
 
- Fix: Cloning unaware of articulated locomotives that could refit without refitting the front unit (r8777)
 
- Fix: Loading times for overhanging trains are miscomputed (r8709)
 

	
 

	
 
0.5.0-RC5 (2007-02-08)
 
------------------------------------------------------------------------
 
- Feature: requery gameservers that did not respond to their first query (r8520, r8542)
 
- Feature: check for NewGRF compatability before actually downloading the map from a game server when connecting from the command prompt and internal console (r8459, r8461)
 
- Feature: logging of the IP address and port of invalid/illegal UDP packets (r8490)
 
- Feature: Requery gameservers that did not respond to their first query (r8520, r8542)
 
- Feature: Logging of the IP address and port of invalid/illegal UDP packets (r8490)
 
- Codechange: Replace missing sprites with a red question mark (r8634)
 
- Codechange: Add Korean, Simplified Chinese and Traditional Chinese languages as an official translation (r8286, r8324, r8616)
 
- Codechange: Increase the size of the sound/video/music-drivers to 32 bytes (instead of 16) so their actual parameters can be passed. Sound has for example bufsize' and 'hz' (r8497)
 
- Codechange: Be more strict about language generation and fail any languages not having the mandatory ##name, ##ownname and ##isocode pragma's (r8253)
 
- Codechange: Rename the 'New <vehtype>' button of the global vehicle lists to 'Available <vehtype>' as it is a view-only list, not one from which you can purchase (rolling) stock. (r8420, r8421)
 
- Codechange: replace missing sprites with a red question mark (8634)
 
- Regression: Help window was empty for UNICODE builds (r8239)
 
- Regression: When the latest news was deleted, the news queue wrapped back to the oldest item, showing all news again (r8409)
 
- Regression: ShowLastNewsMessage could show an out-of-bounds news item because it did not checked if a previous item actually existed the first time it is called (forced news is INVALID_NEWS) [FS#573] (r8409)
 
- Fix: deleting a vehicle with shared orders, but no orders would fail to reset prev_shared and next_shared (r8294)
 
- Fix: GenerateVehicleSortList()/CmdMassStartStopVehicle() tried to put a TileIndex into an uint16 (r8296)
 
- Fix: [YAPF] Assert when buoy is placed on NE or NW map edge (r8540)
 
- Fix: a road vehicle that is very close after another (slower) road vehicle gets its speed reset to 0 when entering a tunnel, which causes a traffic jam outside of the tunnel (r8609)
 
- Fix: Draw canal edges under buoys that are in a canal (r8635)
 
- Fix: Buoys on canal tiles do not flood anymore (r8620)
 
- Fix: Store the ownership of a water tile in the buoy tile and set the ownership of the water tile when the buoy is removed. Prevents certain abuses (r8619)
 
- Fix: When the currently selected player in the performance details window is no longer active, choose the first active player instead of the first player as that may also be inactive  [FS#582] (r8612)
 
- Fix: Road vehicle very close after another (slower) road vehicle gets its speed reset to 0 when entering a tunnel, which causes a traffic jam outside of the tunnel (r8609)
 
- Fix: Bridges do not get destroyed when the bridge head gets flooded and there is a vehicle on the bridge [FS#564] (r8593)
 
- Fix: Road Vehicles now can obtain a slot even if the station is very spread out [FS#577] (r8536)
 
- Fix: bridges do not get destroyed when the bridge head gets flooded and there is a vehicle on the bridge [FS#564] (r8593)
 
- Fix: you were unable to build roads in the scenario editor when there is no town 0, even though there are other towns (r8608)
 
- Fix: store the ownership of a water tile in the buoy tile and set the ownership of the water tile when the buoy is removed. This solves the issue of removing ownership from canal tiles thus making is possible for other players to remove the canal tile (r8619)
 
- Fix: buoys on canal tiles do not flood anymore (r8620)
 
- Fix: Put the output of -h to stdout and not to stderr (through ShowInfo) (r8240)
 
- Fix: use ShowInfo over fprintf(stderr, as Windows doesn't always have a stderr visible/available (r8315)
 
- Fix: return value from clamp was ignored (r8273)
 
- Fix: When the currently selected player in the performance details window is no longer active, choose the first active player instead of the first player as that may also be inactive  [FS#582] (r8612)
 
- Fix: segmentation fault when the toolbar gets removed and you have selected one of the items in a submenu of the toolbar (r8533)
 
- Fix: [OSX] freetype and fontconfig detection (r8500)
 
- Fix: draw canal edges under buoys that are in a canal (8635)
 
- Fix: CTRL-clicking on a hangar in the order list segfaulted as hangars are part of a station instead of real depots (8637)
 
- Fix: Segmentation fault when the toolbar gets removed and you have selected one of the items in a submenu of the toolbar (r8533)
 
- Fix: Deleting a vehicle with shared orders, but no orders would fail to reset prev_shared and next_shared (r8294)
 

	
 

	
 
0.5.0-RC4 (2007-01-18)
 
------------------------------------------------------------------------
docs/openttd.6
Show inline comments
 
.\"                                      Hey, EMACS: -*- nroff -*-
 
.\" Please adjust this date whenever revising the manpage.
 
.Dd February 8, 2007
 
.Dd February 27, 2007
 
.Dt OPENTTD 6
 
.Sh NAME
 
.Nm openttd
 
@@ -11,14 +11,14 @@
 
.Op Fl G Ar seed
 
.Op Fl d Ar [level | cat=lvl[, ...]]
 
.Op Fl g Ar [savegame]
 
.Op Fl n Ar [host[#player][:port]]
 
.Op Fl n Ar host[:port][#player]
 
.Op Fl r Ar widthxheight
 
.Op Fl t Ar date
 
.Op Fl m Ar driver
 
.Op Fl s Ar driver
 
.Op Fl v Ar driver
 
.Sh OPTIONS
 
.Bl -tag -width ".Fl n Ar host[#player][:port]"
 
.Bl -tag -width ".Fl n Ar host[:port][#player]"
 
.It Fl D
 
Start a dedicated server
 
.It Fl G Ar seed
 
@@ -45,9 +45,7 @@ Force to use the DOS palette (use this i
 
.It Fl m Ar driver
 
Set the music driver, see
 
.Fl h
 
.It Fl n
 
Start a network server
 
.It Fl n Ar host[#player][:port]
 
.It Fl n Ar host[:port][#player]
 
Join a network game, optionally specify player to play as and port to connect to
 
.It Fl r Ar widthxheight
 
Set the resolution
known-bugs.txt
Show inline comments
 
@@ -21,30 +21,24 @@ URL: http://bugs.openttd.org
 

	
 
-601	airports can't get flooded when they have planes in them
 
-599	reloaded game lost company passwords
 
-596	Cloning Maglev in UKRS forgets Mail refit
 
-595	Sort by max cargo rating does not sort correctly
 
-594	terraforming wipes out canals
 
-591	Autorenew fails under certain conditions
 
-585	Huge losses with transfer
 
-583	Fatal fault or crash during startup
 
-578	No loading at my industrial centre
 
-574	Open TTD overiding Power Warnings
 
-571	Problems with vehicle purchase lists with NewGRFs
 
-569	'Game Load Failed' when trying to open scenarios
 
-559	Front-/Rear-facing engines don't line up with each other
 
-553	Autorenew doesn't warn when replacement isn't available
 
-546	[0.5.0 RC3] Inflation overflow
 
-542	Assertion with Vehicle list
 
-540	Planes vanished when offered exclusive
 
-539	Trains can cash the same cargo multiple times
 
-529	newairport's sprite issue
 
-522	overflow on vehicle costs
 
-519	Bridge building results in 'missing' pieces
 
-508	Destroying trees and replanting => raised rating
 
-502	OSX can incorrectly print "dbg: [sl] Cannot open savegame 'data/opntitle.dat' for saving/loading."
 
-501	Mouse pointer gets hidden, when draging out of window and back again. Only affects Wacom etc.
 
-494	Get free money abusing a stock bug
 
-489	[0.5.0rc1] Sound choppy on Vista
 
-474	Overtaking car doesn't hit the against-riding car.
 
-459	Merging is buggy
 
-458	Crash when changing Resolution on Mac OS X (x86)
 
@@ -52,7 +46,6 @@ URL: http://bugs.openttd.org
 
-442	Alt-tab behaviour flawed whilst full screen (win32)
 
-441	Transparent stuff
 
-435	Assertion window doesn't show when in fullscreen on Mac OS X
 
-431	failure to autorenew (core/GUI desync)
 
-423	Improved loading causes high CPU use with long trains
 
-410	Openttd in dedicated mode don't run without data files
 
-404	Cargo never delivered to station after bribe and before first pickup
 
@@ -64,7 +57,7 @@ URL: http://bugs.openttd.org
 
-339	Crash in Quicktime when exiting game
 
-299	disable 90 deg turns patch - AI builds 90 deg turns
 
-290	NPF - no path to depot from tunnel
 
-282	layers do not clear loans as soon as they could
 
-282	AI Players do not clear loans as soon as they could
 
-274	Autoclean ignores any share holdings
 
-265	Subsidy awarded detection bug
 
-259	AIs start unnamed companies that do nothing
 
@@ -72,7 +65,6 @@ URL: http://bugs.openttd.org
 
-202	2 Locomotives in 1 Train - Selling one results in Age of the other one Being 0
 
-193	Inconsistent directory usage on Mac OS X
 
-165	vehicle length not taken into account
 
-163	Cargo: Station destroyed / High payment
 
-153	Language crash with app renaming OSX
 
-119	Clipping problems with vehicles on slopes
 
-115	inactive logins do not get auto kicked
 
@@ -105,7 +97,6 @@ URL: http://sourceforge.net/tracker/?ati
 
-1382782	Loan interest calculated 'wrong'
 
-1201284	permanent hilight in a depot
 
-1185852	Scrollbars get arbitrarily small
 
-1184634	Replace vehicles window bug
 
-1160732	little bug with transparency
 
-1117731	Editor-StartingDate
 
-1108046	game freezes
 
@@ -113,7 +104,6 @@ URL: http://sourceforge.net/tracker/?ati
 
-1084620	Minor bug considering buses/trucks
 
-1034310	color mauve in diagrams
 
-1030661	It's possible to build a tunnel under oil wells
 
- 993516	Canal + bouy -> wrong graphics.
 
- 987891	Large UFO destruction bug
 
- 987883	Aircraft landing/taking off
 
- 987880	company league table updating
os/debian/README.Debian
Show inline comments
 
@@ -23,10 +23,10 @@ You should copy the data files from the 
 
	mixing. My VIA AC97 device cannot do hardware mixing, for example.
 

	
 
-Scenarios
 
	There are a few scenarios included in this release. When you start openttd
 
	it will look for scenarios in ~/.openttd/scenario, while the premade
 
	scenarios are in /usr/share/games/openttd/data/scenario. You have two
 
	options to use the scenarios.
 
	There are a few scenarios included in this release. When you start
 
	openttd it will look for scenarios in ~/.openttd/scenario, while the
 
	premade scenarios are in /usr/share/games/openttd/data/scenario. You
 
	have two options to use the scenarios.
 
	* Navigate to /usr/share/games/openttd/data/scenario within openttd.
 
	* Copy scenarios from /usr/share/games/openttd/data/scenario to
 
	  ~/.openttd/scenario. We are looking into a better solution for this.
os/debian/changelog
Show inline comments
 
@@ -2,7 +2,52 @@ openttd (0.6~svn) unstable; urgency=low
 

	
 
  * Unreleased SVN version. Versioned to allow normal upgrades to released versions.
 

	
 
 -- Matthijs Kooijman <m.kooijman@student.utwente.nl>  Thu, 21 Dec 2006 14:54:35 +0100
 
 -- Matthijs Kooijman <m.kooijman@student.utwente.nl>  Mon, 26 Feb 2007 21:07:05 +0100
 

	
 
openttd (0.5.0-1) unstable; urgency=low
 

	
 
  * New upstream release
 

	
 
 -- Matthijs Kooijman <m.kooijman@student.utwente.nl>  Mon, 26 Feb 2007 21:07:05 +0100
 

	
 
openttd (0.5.0~rc5-1) unstable; urgency=low
 

	
 
  [ Matthijs Kooijman ]
 
  * New upstream release
 
  * Compile with freetype and fontconfig support.
 

	
 
  [ Jordi Mallach ]
 
  * Convert debconf templates to podebconf.
 
  * Add a Catalan translation.
 
  * Minor packaging cleanups.
 

	
 
 -- Matthijs Kooijman <m.kooijman@student.utwente.nl>  Mon, 12 Feb 2007 09:25:41 +0100
 

	
 
openttd (0.5.0~rc4-1) unstable; urgency=low
 

	
 
  * New upstream release
 

	
 
 -- Matthijs Kooijman <m.kooijman@student.utwente.nl>  Thu, 18 Jan 2007 21:17:28 +0100
 

	
 
openttd (0.5.0~rc3-1) unstable; urgency=low
 

	
 
  * New upstream release
 

	
 
 -- Matthijs Kooijman <m.kooijman@student.utwente.nl>  Thu, 18 Jan 2007 20:21:04 +0100
 

	
 
openttd (0.5.0~rc2-1) unstable; urgency=low
 

	
 
  * New upstream release
 
  * Removed fix for empty scenarios dir, openttd Makefile now properly handles
 
    this.
 

	
 
 -- Matthijs Kooijman <m.kooijman@student.utwente.nl>  Sun, 31 Dec 2006 12:24:37 +0100
 

	
 
openttd (0.5.0~rc1-1) unstable; urgency=low
 

	
 
  * New upstream release.
 

	
 
 -- Matthijs Kooijman <m.kooijman@student.utwente.nl>  Fri, 22 Dec 2006 11:03:46 +0100
 

	
 
openttd (0.4.8-1) unstable; urgency=low
 

	
os/debian/control
Show inline comments
 
@@ -2,7 +2,8 @@ Source: openttd
 
Section: contrib/games
 
Priority: optional
 
Maintainer: Matthijs Kooijman <m.kooijman@student.utwente.nl>
 
Build-Depends: debhelper (>= 4.0.0), dpatch, libsdl-dev, zlib1g-dev, libpng-dev
 
Uploaders: Jordi Mallach <jordi@debian.org>
 
Build-Depends: debhelper (>= 4.0.0), dpatch, libsdl-dev, zlib1g-dev, libpng-dev, libfreetype6-dev, libfontconfig-dev
 
Standards-Version: 3.7.2
 

	
 
Package: openttd
os/debian/copyright
Show inline comments
 
This package was debianized by Matthijs Kooijman <m.kooijman@student.utwente.nl> on
 
Wed, 15 Sep 2004 00:24:01 +0200.
 
This package was debianized by Matthijs Kooijman <m.kooijman@student.utwente.nl>
 
on Wed, 15 Sep 2004 00:24:01 +0200.
 

	
 
It was downloaded from http://sourceforge.net/projects/openttd
 

	
 
Upstream Author: Ludvig Strigeus (ludde) and many others
 
Upstream author: Ludvig Strigeus (ludde) and many others.
 

	
 
License:
 

	
 
@@ -19,7 +19,7 @@ License:
 

	
 
   You should have received a copy of the GNU General Public License
 
   along with this package; if not, write to the Free Software
 
	 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 

	
 
On Debian systems, the complete text of the GNU General
 
Public License can be found in `/usr/share/common-licenses/GPL'.
os/debian/po/POTFILES.in
Show inline comments
 
new file 100644
 
[type: gettext/rfc822deb] templates
os/debian/po/ca.po
Show inline comments
 
new file 100644
 
# Catalan translation of openttd's Debconf templates.
 
# Copyright © 2007 Software in the Public Interest
 
# This file is distributed under the same license as the openttd package.
 
# Jordi Mallach <jordi@debian.org>, 2007.
 
#
 
msgid ""
 
msgstr ""
 
"Project-Id-Version: openttd 0.5.0-1\n"
 
"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n"
 
"POT-Creation-Date: 2007-02-01 12:25+0100\n"
 
"PO-Revision-Date: 2007-02-01 12:16+0100\n"
 
"Last-Translator: Jordi Mallach <jordi@debian.org>\n"
 
"Language-Team: Catalan <debian-l10n-catalan@lists.debian.org>\n"
 
"MIME-Version: 1.0\n"
 
"Content-Type: text/plain; charset=UTF-8\n"
 
"Content-Transfer-Encoding: 8bit\n"
 

	
 
#. Type: note
 
#. Description
 
#: ../templates:1001
 
msgid "You need to install data files"
 
msgstr "Heu d'instal·lar els fitxers de dades"
 

	
 
#. Type: note
 
#. Description
 
#: ../templates:1001
 
msgid ""
 
"OpenTTD needs the data files from the original TTD game to run. You should "
 
"install these data files before you can play the game. See README.Debian for "
 
"more details on which files need to be copied where."
 
msgstr ""
 
"OpenTTD necessita els fitxers de dades del joc TTD original per a funcionar. "
 
"Haureu d'instal·lar aquests fitxers de dades abans de poder jugar al joc. "
 
"Llegiu el document README.Debian per a obtindre més detalls sobre quins "
 
"fitxers s'han de copiar i a quina ubicació."
os/debian/po/templates.pot
Show inline comments
 
new file 100644
 
# SOME DESCRIPTIVE TITLE.
 
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 
# This file is distributed under the same license as the PACKAGE package.
 
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
 
#
 
#, fuzzy
 
msgid ""
 
msgstr ""
 
"Project-Id-Version: PACKAGE VERSION\n"
 
"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n"
 
"POT-Creation-Date: 2007-02-01 12:25+0100\n"
 
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 
"Language-Team: LANGUAGE <LL@li.org>\n"
 
"MIME-Version: 1.0\n"
 
"Content-Type: text/plain; charset=CHARSET\n"
 
"Content-Transfer-Encoding: 8bit\n"
 

	
 
#. Type: note
 
#. Description
 
#: ../templates:1001
 
msgid "You need to install data files"
 
msgstr ""
 

	
 
#. Type: note
 
#. Description
 
#: ../templates:1001
 
msgid ""
 
"OpenTTD needs the data files from the original TTD game to run. You should "
 
"install these data files before you can play the game. See README.Debian for "
 
"more details on which files need to be copied where."
 
msgstr ""
os/debian/postinst
Show inline comments
 
#! /bin/sh
 
# postinst script for openttd
 
#
 
# see: dh_installdeb(1)
 

	
 
set -e
 

	
 

	
 
# summary of how this script can be called:
 
#        * <postinst> `configure' <most-recently-configured-version>
 
#        * <old-postinst> `abort-upgrade' <new version>
 
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
 
#          <new-version>
 
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
 
#          <failed-install-package> <version> `removing'
 
#          <conflicting-package> <version>
 
# for details, see http://www.debian.org/doc/debian-policy/ or
 
# the debian-policy package
 
#
 

	
 
. /usr/share/debconf/confmodule
 

	
 
case "$1" in
 
    configure)
 
    ;;
 

	
 
    abort-upgrade|abort-remove|abort-deconfigure)
 

	
 
    ;;
 

	
 
    *)
 
        echo "postinst called with unknown argument \`$1'" >&2
 
        exit 1
 
    ;;
 
esac
 

	
 
# dh_installdeb will replace this with shell code automatically
 
# generated by other debhelper scripts.
 

	
 
#DEBHELPER#
 

	
 
exit 0
 

	
 

	
os/debian/postrm
Show inline comments
 
deleted file
os/debian/templates
Show inline comments
 
Template: openttd/datafiles
 
Type: note
 
Description: You need to install data files
 
 OpenTTD needs the datafiles from the original TTD game to run. You should
 
 install these datafiles before you can play the game. See README.Debian for
 
 more details on which files need to be copied where.
 
_Description: You need to install data files
 
 OpenTTD needs the data files from the original TTD game to run. You should
 
 install these data files before you can play the game. See README.Debian
 
 for more details on which files need to be copied where.
os/win32/installer/CDFinder.ini
Show inline comments
 
deleted file
os/win32/installer/cdfinder.ini
Show inline comments
 
new file 100644
 
; Ini file generated by the HM NIS Edit IO designer.
 
[Settings]
 
NumFields=3
 

	
 
[Field 1]
 
Type=Groupbox
 
Text=Transport Tycoon Deluxe Installation location
 
Left=6
 
Right=294
 
Top=68
 
Bottom=100
 

	
 
[Field 2]
 
Type=DirRequest
 
Left=10
 
Right=290
 
Top=80
 
Bottom=92
 

	
 
[Field 3]
 
Type=Label
 
Left=17
 
Right=282
 
Top=6
 
Bottom=64
 

	
os/win32/installer/gpl.txt
Show inline comments
 
deleted file
os/win32/installer/install.nsi
Show inline comments
 
; Define your application name
 
!define APPNAME "OpenTTD"
 
!define APPNAMEANDVERSION "OpenTTD 0.5.0.0"
 
!define APPVERSION "0.5.0.0"
 
!define INSTALLERVERSION 27 ;NEED TO UPDATE THIS FOR EVERY RELEASE!!!
 
!define APPNAME "OpenTTD"   ; Define application name
 
!define APPVERSION "0.5.0"  ; Define application version
 
!define INSTALLERVERSION 28 ; NEED TO UPDATE THIS FOR EVERY RELEASE!!!
 

	
 
!define APPURLLINK "http://www.openttd.org"
 
!define APPNAMEANDVERSION "${APPNAME} ${APPVERSION}"
 
!define APPVERSIONINTERNAL "${APPVERSION}.0" ; Needs to be of the format X.X.X.X
 

	
 
!define MUI_ICON "..\..\..\openttd.ico"
 
!define MUI_UNICON "..\..\..\openttd.ico"
 
!define MUI_WELCOMEFINISHPAGE_BITMAP "welcome.bmp"
 
@@ -14,7 +17,7 @@ SetCompressor LZMA
 

	
 
; Version Info
 
Var AddWinPrePopulate
 
VIProductVersion "${APPVERSION}"
 
VIProductVersion "${APPVERSIONINTERNAL}"
 
VIAddVersionKey "ProductName" "OpenTTD Installer"
 
VIAddVersionKey "Comments" "Installs ${APPNAMEANDVERSION}"
 
VIAddVersionKey "CompanyName" "OpenTTD Developers"
 
@@ -44,18 +47,17 @@ Var CDDRIVE
 
!define MUI_ABORTWARNING
 

	
 
!insertmacro MUI_PAGE_WELCOME
 
LicenseForceSelection radiobuttons "I &accept this Agreement" "I &do not accept this agreement"
 

	
 
!define MUI_LICENSEPAGE_RADIOBUTTONS
 
!insertmacro MUI_DEFAULT MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT "I &accept this agreement"
 
!insertmacro MUI_DEFAULT MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE "I &do not accept this agreement"
 
!insertmacro MUI_PAGE_LICENSE "..\..\..\COPYING"
 

	
 
;--------------------------------
 
; Rest of pages
 
!insertmacro MUI_PAGE_COMPONENTS
 

	
 

	
 
;--------------------------------
 
; New custom page for finding CD
 
Page custom SelectCD SelectCD2 ": TTD folder"
 
;---------------------------------
 
; Custom page for finding TTDLX CD
 
Page custom SelectCDEnter SelectCDExit ": TTD folder"
 

	
 
!insertmacro MUI_PAGE_DIRECTORY
 

	
 
@@ -69,9 +71,13 @@ Page custom SelectCD SelectCD2 ": TTD fo
 

	
 
!insertmacro MUI_PAGE_INSTFILES
 

	
 
!define MUI_FINISHPAGE_RUN "$INSTDIR\OpenTTD.exe"
 
;-----------------------------------------------------
 
; New custom page to show UNICODE and MSLU information
 
Page custom ShowWarningsPage
 

	
 
!define MUI_FINISHPAGE_RUN "$INSTDIR\openttd.exe"
 
!define MUI_FINISHPAGE_LINK "Visit OpenTTD's homepage"
 
!define MUI_FINISHPAGE_LINK_LOCATION "http://www.openttd.org/"
 
!define MUI_FINISHPAGE_LINK_LOCATION "${APPURLLINK}"
 
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
 
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\readme.txt"
 
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
 
@@ -84,64 +90,63 @@ Page custom SelectCD SelectCD2 ": TTD fo
 
!insertmacro MUI_LANGUAGE "English"
 
!insertmacro MUI_RESERVEFILE_LANGDLL
 

	
 
;--------------------------------
 
; Sections
 
;--------------------------------------------------------------
 
; (Core) OpenTTD install section. Copies all internal game data
 
Section "!OpenTTD" Section1
 

	
 
	; Set Section properties
 
	; Overwrite files by default, but don't complain on failure
 
	SetOverwrite try
 

	
 
	; Make savegame folder
 
	SetOutPath "$INSTDIR\save"
 
	; define root variable relative to installer
 
	; Define root variable relative to installer
 
	!define PATH_ROOT "..\..\..\"
 

	
 
	; Copy language files
 
  SetOutPath "$INSTDIR\lang\"
 
  File ${PATH_ROOT}lang\*.lng
 
  File ${PATH_ROOT}lang\english.txt
 
	SetOutPath "$INSTDIR\lang\"
 
	File ${PATH_ROOT}lang\*.lng
 
	File ${PATH_ROOT}lang\english.txt
 

	
 
	; Copy data files
 
	SetOutPath "$INSTDIR\data\"
 
	File ${PATH_ROOT}data\*.grf
 
	File ${PATH_ROOT}data\opntitle.dat
 
  ; Copy scenario files
 
	; Copy scenario files (don't choke if they don't exist)
 
	SetOutPath "$INSTDIR\scenario\"
 
  File ${PATH_ROOT}scenario\*.scn
 
	File /nonfatal ${PATH_ROOT}scenario\*.scn
 

	
 
	; Copy the rest of the stuff
 
	SetOutPath "$INSTDIR\"
 

	
 
	;Copy text files
 
  File ${PATH_ROOT}changelog.txt
 
  File ${PATH_ROOT}COPYING
 
  File ${PATH_ROOT}readme.txt
 
  File ${PATH_ROOT}known-bugs.txt
 
	; Copy text files
 
	File ${PATH_ROOT}changelog.txt
 
	File ${PATH_ROOT}COPYING
 
	File ${PATH_ROOT}readme.txt
 
	File ${PATH_ROOT}known-bugs.txt
 

	
 
	; Copy executable
 
	File /oname=OpenTTD.exe        ${PATH_ROOT}Release\openttd.exe
 
	File /oname=openttd.exe ${PATH_ROOT}Release\openttd.exe
 
	File ${PATH_ROOT}strgen\Debug\strgen.exe
 

	
 

	
 
  ; Delete old files from the main dir. they are now placed in data/ and lang/
 
	; Delete old files from the main dir. they are now placed in data/ and lang/
 
	Delete "$INSTDIR\*.lng"
 
	Delete "$INSTDIR\*.grf"
 
	Delete "$INSTDIR\sample.cat"
 
	Delete "$INSTDIR\ttd.exe"
 

	
 

	
 
	;Creates the Registry Entries
 
	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Comments" "Visit http://www.openttd.org"
 
	; Create the Registry Entries
 
	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Comments" "Visit ${APPURLLINK}"
 
	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "DisplayIcon" "$INSTDIR\openttd.exe,0"
 
	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "DisplayName" "OpenTTD ${APPVERSION}"
 
	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "DisplayVersion" "${APPVERSION}"
 
	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "HelpLink" "http://www.openttd.org"
 
	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "HelpLink" "${APPURLLINK}"
 
	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Install Folder" "$INSTDIR"
 
	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Publisher" "OpenTTD"
 
	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Shortcut Folder" "$SHORTCUTS"
 
	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "UninstallString" "$INSTDIR\uninstall.exe"
 
	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "URLInfoAbout" "http://www.openttd.org"
 
	;This key sets the Version DWORD that patches will check against
 
	WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "URLInfoAbout" "${APPURLLINK}"
 
	; This key sets the Version DWORD that new installers will check against
 
	WriteRegDWORD HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Version" ${INSTALLERVERSION}
 

	
 
	!insertmacro MUI_STARTMENU_WRITE_BEGIN "OpenTTD"
 
@@ -155,13 +160,15 @@ Section "!OpenTTD" Section1
 
	!insertmacro MUI_STARTMENU_WRITE_END
 
SectionEnd
 

	
 
;----------------------------------------------------------------------------------
 
; TTDLX files install section. Copies all needed TTDLX files from CD or install dir
 
Section "Copy Game Graphics" Section2
 
	; Include files from CD
 
	;Let's copy the files from the CD
 
	; Let's copy the files with size approximation
 
	SetOutPath "$INSTDIR\gm"
 
	CopyFiles "$CDDRIVE\gm\*.gm" "$INSTDIR\gm\"
 
	CopyFiles "$CDDRIVE\gm\*.gm" "$INSTDIR\gm\" 1028
 
	SetOutPath "$INSTDIR\data\"
 
	CopyFiles "$CDDRIVE\sample.cat" "$INSTDIR\data\sample.cat" 1566
 
	; Copy Windows files
 
	CopyFiles "$CDDRIVE\trg1r.grf" "$INSTDIR\data\trg1r.grf" 2365
 
	CopyFiles "$CDDRIVE\trgcr.grf" "$INSTDIR\data\trgcr.grf" 260
 
	CopyFiles "$CDDRIVE\trghr.grf" "$INSTDIR\data\trghr.grf" 400
 
@@ -176,7 +183,8 @@ Section "Copy Game Graphics" Section2
 
	SetOutPath "$INSTDIR\"
 
SectionEnd
 

	
 
;----------------------
 
;-------------------------------------------
 
; Install the uninstaller (option is hidden)
 
Section -FinishSection
 
	WriteUninstaller "$INSTDIR\uninstall.exe"
 
SectionEnd
 
@@ -184,28 +192,33 @@ SectionEnd
 
; Modern install component descriptions
 
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
 
	!insertmacro MUI_DESCRIPTION_TEXT ${Section1} "OpenTTD is a fully functional clone of TTD and is very playable."
 
	!insertmacro MUI_DESCRIPTION_TEXT ${Section2} "Copies the game graphics. Requires TTD for Windows."
 
	!insertmacro MUI_DESCRIPTION_TEXT ${Section2} "Copies the game graphics. Requires TTD (for Windows)."
 
!insertmacro MUI_FUNCTION_DESCRIPTION_END
 

	
 
;!undef SHORTCUTS
 
;Uninstall section
 

	
 
Section Uninstall
 
	MessageBox MB_YESNOCANCEL|MB_ICONQUESTION "Would you like to remove the Saved Game Folders located at '$INSTDIR\Save?'  If you choose Yes, your Saved Games will be removed." IDYES RemoveSavedGames IDNO NoRemoveSavedGames
 
;-----------------------------------------------
 
; Uninstall section, deletes all installed files
 
Section "Uninstall"
 
	MessageBox MB_YESNO|MB_ICONQUESTION \
 
		"Remove the save game folders located at $\"$INSTDIR\save?$\"$\n \
 
		If you choose Yes, your saved games will be deleted." \
 
		IDYES RemoveSavedGames IDNO NoRemoveSavedGames
 
	RemoveSavedGames:
 
		Delete "$INSTDIR\Save\AutoSave\*"
 
		RMDir "$INSTDIR\Save\AutoSave"
 
		Delete "$INSTDIR\Save\*"
 
		RMDir "$INSTDIR\Save"
 
		Delete "$INSTDIR\save\autosave\*"
 
		RMDir "$INSTDIR\save\autosave"
 
		Delete "$INSTDIR\save\*"
 
		RMDir "$INSTDIR\save"
 
	NoRemoveSavedGames:
 

	
 
	MessageBox MB_YESNOCANCEL|MB_ICONQUESTION "Would you like to remove the Scenario Folders located at '$INSTDIR\Scenario?'  If you choose Yes, your Scenarios will be removed." IDYES RemoveScen IDNO NoRemoveScen
 
	MessageBox MB_YESNO|MB_ICONQUESTION \
 
		"Remove the scenario folders located at $\"$INSTDIR\scenario?$\"$\n \
 
		If you choose Yes, your scenarios will be deleted." \
 
		IDYES RemoveScen IDNO NoRemoveScen
 
	RemoveScen:
 
		Delete "$INSTDIR\Scenario\*"
 
		RMDir "$INSTDIR\Scenario"
 
		Delete "$INSTDIR\scenario\*"
 
		RMDir "$INSTDIR\scenario"
 
	NoRemoveScen:
 

	
 
	;Remove from registry...
 
	; Remove from registry...
 
	!insertmacro MUI_STARTMENU_GETFOLDER "OpenTTD" $SHORTCUTS
 
	ReadRegStr $SHORTCUTS HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Shortcut Folder"
 

	
 
@@ -238,13 +251,19 @@ Section Uninstall
 

	
 
	; Data files
 
	Delete "$INSTDIR\data\opntitle.dat"
 

	
 
	Delete "$INSTDIR\data\2ccmap.grf"
 
	Delete "$INSTDIR\data\airports.grf"
 
	Delete "$INSTDIR\data\autorail.grf"
 
	Delete "$INSTDIR\data\canalsw.grf"
 
	Delete "$INSTDIR\data\dosdummy.grf"
 
	Delete "$INSTDIR\data\elrailsw.grf"
 
	Delete "$INSTDIR\data\nsignalsw.grf"
 
	Delete "$INSTDIR\data\openttd.grf"
 
	Delete "$INSTDIR\data\canalsw.grf"
 
	Delete "$INSTDIR\data\trkfoundw.grf"
 
	Delete "$INSTDIR\data\autorail.grf"
 
	Delete "$INSTDIR\data\dosdummy.grf"
 

	
 
	Delete "$INSTDIR\data\sample.cat"
 
	; Windows Data files
 
	Delete "$INSTDIR\data\trg1r.grf"
 
	Delete "$INSTDIR\data\trghr.grf"
 
	Delete "$INSTDIR\data\trgtr.grf"
 
@@ -257,10 +276,10 @@ Section Uninstall
 
	Delete "$INSTDIR\data\trgc.grf"
 
	Delete "$INSTDIR\data\trgi.grf"
 

	
 
	;Music
 
	; Music
 
	Delete "$INSTDIR\gm\*.gm"
 

	
 
	;Language files
 
	; Language files
 
	Delete "$INSTDIR\lang\*.lng"
 
	Delete "$INSTDIR\lang\english.txt"
 

	
 
@@ -271,104 +290,148 @@ Section Uninstall
 
	RMDir "$INSTDIR\lang"
 
	RMDir "$INSTDIR\data"
 
	RMDir "$INSTDIR"
 

	
 
SectionEnd
 

	
 
Function SelectCD
 
;------------------------------------------------------------
 
; Custom page function to find the TTDLX CD/install location
 
Function SelectCDEnter
 
	SectionGetFlags ${Section2} $0
 
	IntOp $1 $0 & 0x80 ; bit 7 set by upgrade, no need to copy files
 
	IntCmp $1 1 DoneCD ;upgrade doesn't need copy files
 
	IntCmp $1 1 DoneCD ; Upgrade doesn't need copy files
 

	
 
	IntOp $0 $0 & 1
 
	IntCmp $0 1 NoAbort
 
		Abort
 
	Abort
 
NoAbort:
 

	
 
	GetTempFileName $R0
 
	!insertmacro MUI_HEADER_TEXT "Locate TTD" "Setup needs the location of Transport Tycoon Deluxe in order to continue."
 
	File /oname=$R0 CDFinder.ini
 
	!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "CDFinder.ini" "CDFinder"
 

	
 
	ClearErrors
 
	;Now, let's populate $CDDRIVE
 
	ReadRegStr $CDDRIVE HKLM "SOFTWARE\Fish Technology Group\Transport Tycoon Deluxe" "HDPath"
 
	; Now, let's populate $CDDRIVE
 
	ReadRegStr $R0 HKLM "SOFTWARE\Fish Technology Group\Transport Tycoon Deluxe" "HDPath"
 
	IfErrors NoTTD
 
	StrCpy $AddWinPrePopulate "Setup has detected your TTD folder.  Don't change the folder.  Simply press Next."
 
	StrCmp $CDDRIVE "" 0 Populated
 
	StrCpy $CDDRIVE $R0
 
Populated:
 
	StrCpy $AddWinPrePopulate "Setup has detected your TTD folder. Don't change the folder. Simply press Next."
 
	Goto TruFinish
 
NoTTD:
 
	StrCpy $CDDRIVE ""
 
	StrCpy $AddWinPrePopulate "Setup couldn't find TTD.  Please enter the path where the graphics files from TTD are stored and press Next to continue."
 
	StrCpy $AddWinPrePopulate "Setup couldn't find TTD. Please enter the path where the graphics files from TTD are stored and press Next to continue."
 
TruFinish:
 
	ClearErrors
 
	WriteINIStr $R0 "Field 2" "State" $CDDRIVE
 
	WriteINIStr $R0 "Field 3" "Text" $AddWinPrePopulate
 
	!insertmacro MUI_INSTALLOPTIONS_WRITE "CDFinder" "Field 2" "State" $CDDRIVE          ; TTDLX path
 
	!insertmacro MUI_INSTALLOPTIONS_WRITE "CDFinder" "Field 3" "Text" $AddWinPrePopulate ; Caption
 
DoneCD:
 
	InstallOptions::dialog $R0
 
	Pop $R1
 
	; Initialize the dialog *AFTER* we've changed the text otherwise we won't see the changes
 
	!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "CDFinder"
 
	!insertmacro MUI_INSTALLOPTIONS_SHOW
 
FunctionEnd
 

	
 
; Exit from page function
 
Function SelectCD2
 
	ReadINIStr $CDDRIVE $R0 "Field 2" "State"
 
	IfFileExists $CDDRIVE\trg1r.grf "" NoCD
 
	IfFileExists $CDDRIVE\sample.cat "" NoCD
 
	IfFileExists $CDDRIVE\trgir.grf hasCD ""
 
;----------------------------------------------------------------
 
; Custom page function when 'next' is selected for the TTDLX path
 
Function SelectCDExit
 
	!insertmacro MUI_INSTALLOPTIONS_READ $CDDRIVE "CDFinder" "Field 2" "State"
 
	; If trg1r.grf does not exist at the path, retry with DOS version
 
	IfFileExists $CDDRIVE\trg1r.grf "" DosCD
 
	IfFileExists $CDDRIVE\trgir.grf "" NoCD
 
	IfFileExists $CDDRIVE\sample.cat hasCD NoCD
 
DosCD:
 
	IfFileExists $CDDRIVE\TRG1.GRF "" NoCD
 
	IfFileExists $CDDRIVE\TRGI.GRF "" NoCD
 
	IfFileExists $CDDRIVE\SAMPLE.CAT hasCD NoCD
 
NoCD:
 
  MessageBox MB_OK "Setup cannot continue without the Transport Tycoon Deluxe Location!"
 
  Abort
 
	MessageBox MB_OK "Setup cannot continue without the Transport Tycoon Deluxe Location!"
 
	Abort
 
hasCD:
 
FunctionEnd
 

	
 
;---------------------------------------------------------------------
 
; Custom page function to show notices for running OpenTTD
 
; We have extracted this custom page as Notice in the .onInit function
 
Function ShowWarningsPage
 
	!insertmacro MUI_HEADER_TEXT "Installation Complete" "Important notices for OpenTTD usage."
 
	!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "notice.ini" "Notice"
 
	!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "Notice"
 

	
 
	Call GetWindowsVersion
 
	Pop $R0
 

	
 
	; Hide the MSLU text if the installer is not run on Win9x systems
 
	StrCmp $R0 "winnt" 0 Win9x
 
	!insertmacro MUI_INSTALLOPTIONS_READ $R1 "Notice" "Field 1" "HWND" ; MSLU groupbox
 
	ShowWindow $R1 0
 
	!insertmacro MUI_INSTALLOPTIONS_READ $R1 "Notice" "Field 2" "HWND" ; MSLU text
 
	ShowWindow $R1 0
 
	!insertmacro MUI_INSTALLOPTIONS_READ $R1 "Notice" "Field 3" "HWND" ; MSLU link
 
	ShowWindow $R1 0
 
Win9x:
 
	ClearErrors
 
	!insertmacro MUI_INSTALLOPTIONS_SHOW
 
FunctionEnd
 

	
 
;-------------------------------------------------------------------------------
 
; Determine windows version, returns "win9x" if Win9x/Me or "winnt" on the stack
 
Function GetWindowsVersion
 
	ClearErrors
 
	StrCpy $R0 "winnt"
 

	
 
	ReadRegStr $R1 HKLM "SOFTWARE\MICROSOFT\WINDOWS NT\CurrentVersion" CurrentVersion
 
	IfErrors 0 WinNT
 
	StrCpy $R0 "win9x"
 
WinNT:
 
	ClearErrors
 
	Push $R0
 
FunctionEnd
 

	
 
Var OLDVERSION
 
Var UninstallString
 

	
 
;-----------------------------------------------------------------------------------
 
; NSIS Initialize function, determin if we are going to install/upgrade or uninstall
 
Function .onInit
 
	StrCpy $SHORTCUTS "OpenTTD"
 

	
 
	SectionSetFlags 0 17
 

	
 
	;Want to have a splash BMP?  Uncomment these lines - CAREFUL WITH FILE SIZE
 

	
 
;	        # the plugins dir is automatically deleted when the installer exits
 
;        InitPluginsDir
 
;				File /oname=$PLUGINSDIR\splash.bmp "C:\Documents and Settings\Administrator\My Documents\My Pictures\OpenTTD Splash.bmp"
 
;        #optional
 
;        #File /oname=$PLUGINSDIR\splash.wav "C:\myprog\sound.wav"
 
;
 
;        ;MessageBox MB_OK "Fading"
 
;
 
;       advsplash::show 3000 600 400 -1 $PLUGINSDIR\splash
 
;
 
;      Pop $0          ; $0 has '1' if the user closed the splash screen early,
 
;                        ; '0' if everything closed normal, and '-1' if some error occured.
 
;End Splash Area
 
		;Starts Setup - let's look for an older version of OpenTTD
 
	; Starts Setup - let's look for an older version of OpenTTD
 
	ReadRegDWORD $R8 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Version"
 

	
 
	IfErrors ShowWelcomeMessage ShowUpgradeMessage
 
ShowWelcomeMessage:
 
	ReadRegStr $R8 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "Version"
 
	;In the event someone still has OpenTTD 0.1, this will detect that (that installer used a string instead of dword entry)
 
	; In the event someone still has OpenTTD 0.1, this will detect that (that installer used a string instead of dword entry)
 
	IfErrors FinishCallback
 

	
 
ShowUpgradeMessage:
 
	IntCmp ${INSTALLERVERSION} $R8 VersionsAreEqual InstallerIsOlder  WelcomeToSetup
 
WelcomeToSetup:
 
	;An older version was found.  Let's let the user know there's an upgrade that will take plce.
 
	; An older version was found.  Let's let the user know there's an upgrade that will take place.
 
	ReadRegStr $OLDVERSION HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "DisplayVersion"
 
	;Gets the older version then displays it in a message box
 
	MessageBox MB_OK|MB_ICONINFORMATION "Welcome to ${APPNAMEANDVERSION} Setup.$\n$\nThis will allow you to upgrade from version $OLDVERSION."
 
	; Gets the older version then displays it in a message box
 
	MessageBox MB_OK|MB_ICONINFORMATION \
 
		"Welcome to ${APPNAMEANDVERSION} Setup.$\n \
 
		This will allow you to upgrade from version $OLDVERSION."
 
	SectionSetFlags ${Section2} 0x80 ; set bit 7
 
	Goto FinishCallback
 

	
 
VersionsAreEqual:
 
	ReadRegStr $UninstallString HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "UninstallString"
 
	IfFileExists "$UninstallString" "" FinishCallback
 
	MessageBox MB_YESNO|MB_ICONQUESTION "Setup detected ${APPNAMEANDVERSION} on your system. That's the version this program will install.$\n$\nAre you trying to uninstall it?" IDYES DoUninstall IDNO FinishCallback
 
DoUninstall: ;You have the same version as this installer.  This allows you to uninstall.
 
	MessageBox MB_YESNO|MB_ICONQUESTION \
 
		"Setup detected ${APPNAMEANDVERSION} on your system. That's the version this program will install.$\n \
 
		Are you trying to uninstall it?" \
 
		IDYES DoUninstall IDNO FinishCallback
 
DoUninstall: ; You have the same version as this installer.  This allows you to uninstall.
 
	Exec "$UninstallString"
 
	Quit
 

	
 
InstallerIsOlder:
 
	MessageBox MB_OK|MB_ICONSTOP "You have a newer version of ${APPNAME}.$\n$\nSetup will now exit."
 
	MessageBox MB_OK|MB_ICONSTOP \
 
		"You have a newer version of ${APPNAME}.$\n \
 
		Setup will now exit."
 
	Quit
 

	
 
FinishCallback:
os/win32/installer/notice.ini
Show inline comments
 
new file 100644
 
; Ini file generated by the HM NIS Edit IO designer.
 
[Settings]
 
NumFields=6
 

	
 
[Field 1]
 
Type=Groupbox
 
Text=Notice for Windows 9x/ME users!
 
Left=8
 
Right=292
 
Top=80
 
Bottom=138
 

	
 
[Field 2]
 
Type=Label
 
Text=OpenTTD will not work without the Microsoft Layer for Unicode installed.\r\nDue to licensing issues we cannot bundle this file with the installer. Please download MSLU from the Microsoft website and extract UnicoWS.dll to the same directory as the openttd executabe.
 
Left=13
 
Right=284
 
Top=91
 
Bottom=127
 

	
 
[Field 3]
 
Type=Link
 
Text=Microsoft Layer for Unicode
 
State=http://www.microsoft.com/downloads/details.aspx?FamilyId=73BA7BD7-ED06-4F0D-80A4-2A7EEAEE17E2&displaylang=en
 
Left=197
 
Right=284
 
Top=127
 
Bottom=135
 

	
 
[Field 4]
 
Type=Groupbox
 
Text=UNICODE support
 
Left=8
 
Right=292
 
Top=0
 
Bottom=75
 

	
 
[Field 5]
 
Type=Label
 
Text=This version of OpenTTD has support for UNICODE, allowing users to use non-ASCII character sets such as Russian or Japanese.\r\nSelecting such a language will result in an unusable and garbled interface. You will need to specify a font that has support for these characters in openttd.cfg, or alternatively use an appropiate grf file.\r\n\r\nFor more information please refer to the readme or the wiki.
 
Left=13
 
Right=284
 
Top=9
 
Bottom=65
 

	
 
[Field 6]
 
Type=Link
 
Text=OpenTTD wiki
 
Left=238
 
Right=284
 
Top=64
 
Bottom=72
 
State=http://wiki.openttd.org/index.php/Unicode
 

	
readme.txt
Show inline comments
 
OpenTTD README
 
Last updated:    2007-02-08
 
Release version: 0.5.0-RC5
 
Last updated:    2007-02-27
 
Release version: 0.5.0
 
------------------------------------------------------------------------
 

	
 

	
0 comments (0 inline, 0 general)