diff --git a/config.lib b/config.lib index a984b81460..bd72f6aca8 100644 --- a/config.lib +++ b/config.lib @@ -1018,7 +1018,7 @@ check_params() { fi if [ "$personal_dir" = "1" ]; then - if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ] || [ "$os" = "DOS" ] || [ "$os" == "HAIKU" ]; then + if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ] || [ "$os" = "DOS" ] || [ "$os" = "HAIKU" ]; then personal_dir="OpenTTD" elif [ "$os" = "OSX" ]; then personal_dir="Documents/OpenTTD" diff --git a/os/debian/README.Debian b/os/debian/README.Debian index fa06175861..10eee1f9e3 100644 --- a/os/debian/README.Debian +++ b/os/debian/README.Debian @@ -1,15 +1,13 @@ -openttd for Debian +OpenTTD for Debian ------------------ -To properly play this game, original data files are needed. -You should copy the data files from the original TTD into the data directory -(/usr/share/games/openttd/data). You should copy these files: -* trg1r.grf -* trgcr.grf -* trghr.grf -* trgir.grf -* trgtr.grf -* sample.cat +To properly play this game, you need a base graphics and sound set. +Currently, the graphics files from the original Transport Tycoon Deluxe +game (Windows and DOS versions) are supported, as well as the free +graphics replacement set "OpenGFX". + +See readme.txt, section 4.1 for instructions on how to install these +files. -Music For in game music (optional), you should copy all files in the gm/ @@ -19,13 +17,15 @@ You should copy the data files from the original TTD into the data directory Don't forget to use -m extmidi if you want music, and if you have problems, remember that not all audio devices support multiple - audiostreams (music and sound), so you might have to use software - mixing. My VIA AC97 device cannot do hardware mixing, for example. + audiostreams (music and sound), so you might have to use alsa + software mixing or pulseaudio. -Scenarios There are no scenarios included in this release. Scenarios can be - downloaded separately from the OpenTTD website and all over the - internet. Place scenarios in your ~/.openttd/scenario directory to - use them. + downloaded using openttd's content service, which is available from + openttd's main menu. If you have obtained a scenario through other + means, you can place it either in your ~/.openttd/scenario directory + or in the system-wide /usr/share/games/openttd/scenario directory. + + -- Matthijs Kooijman Mon, 01 Feb 2010 10:42:11 +0100 - -- Matthijs Kooijman , Tue, 25 Jan 2004 14:11:01 +0200 diff --git a/os/debian/changelog b/os/debian/changelog index 0c9827c661..8a288afe91 100644 --- a/os/debian/changelog +++ b/os/debian/changelog @@ -1,4 +1,4 @@ -openttd (1.0.0~RC1) UNRELEASED; urgency=low +openttd (1.0.0~RC1) unstable; urgency=low * New upstream release. diff --git a/os/debian/compat b/os/debian/compat index b8626c4cff..7f8f011eb7 100644 --- a/os/debian/compat +++ b/os/debian/compat @@ -1 +1 @@ -4 +7 diff --git a/os/debian/config b/os/debian/config deleted file mode 100755 index a4e1268f65..0000000000 --- a/os/debian/config +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -# Source debconf library. -. /usr/share/debconf/confmodule - -FILES="trg1r.grf trgcr.grf trghr.grf trgir.grf trgtr.grf sample.cat" -DATADIR=/usr/share/games/openttd/data - -MISSING="No" -for FILE in $FILES; do - # Check if all the files needed are here. - if [ ! -e $DATADIR/$FILE ]; then - MISSING="Yes" - break - fi; -done - -if [ $MISSING = "Yes" ]; then - db_input high openttd/datafiles || true - db_go -fi diff --git a/os/debian/control b/os/debian/control index 37a242e493..6c5969f7db 100644 --- a/os/debian/control +++ b/os/debian/control @@ -3,15 +3,17 @@ Section: contrib/games Priority: optional Maintainer: Matthijs Kooijman Uploaders: Jordi Mallach -Build-Depends: debhelper (>= 4.0.0), libsdl-dev, zlib1g-dev, libpng-dev, libfreetype6-dev, libfontconfig-dev, liblzo2-dev -Standards-Version: 3.7.3 -Vcs-Browser: http://svn.debian.org/wsvn/collab-maint/deb-maint/openttd/trunk/ -Vcs-Svn: svn://svn.debian.org/svn/collab-maint/deb-maint/openttd/trunk +Build-Depends: debhelper (>= 7.0.50), libsdl-dev, zlib1g-dev, libpng-dev, libfreetype6-dev, libfontconfig-dev, liblzo2-dev, libicu-dev +Standards-Version: 3.8.4 +Vcs-Browser: http://git.debian.org/?p=collab-maint/openttd.git +Vcs-Git: git://git.debian.org/collab-maint/openttd.git Homepage: http://www.openttd.org/ Package: openttd Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} +Replaces: openttd-data +Conflicts: openttd-data Suggests: timidity, freepats Description: reimplementation of Transport Tycoon Deluxe with enhancements OpenTTD is a reimplementation of the Microprose game "Transport diff --git a/os/debian/copyright b/os/debian/copyright index 7d9cd87bfb..5c58d007a0 100644 --- a/os/debian/copyright +++ b/os/debian/copyright @@ -1,25 +1,61 @@ -This package was debianized by Matthijs Kooijman +This package was debianized by Matthijs Kooijman on Wed, 15 Sep 2004 00:24:01 +0200. -It was downloaded from http://sourceforge.net/projects/openttd +This package is not part of the main Debian GNU/Linux distribution, but +uploaded to the contrib section. This is because the openttd program is +non-functional by itself, it needs (non-free) graphical and sound +resources from the Transport Tycoon Deluxe game to work. Upstream author: Ludvig Strigeus (ludde) and many others. +Upstream homepage: http://www.openttd.org -License: +Copyright © 2004-2009 Ludvig Strigeous and others. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. +OpenTTD License: - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2.0 as + published by the Free Software Foundation; - 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 + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -On Debian systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. + 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 + +On Debian systems, the complete text of the GNU General Public License +version 2 can be found in `/usr/share/common-licenses/GPL-2'. + +This package contains an embedded version of the "Squirrel" programming +language, which is shipped under the following license: + + Copyright (c) 2003-2009 Alberto Demichelis + + This software is provided 'as-is', without any + express or implied warranty. In no event will the + authors be held liable for any damages arising from + the use of this software. + + Permission is granted to anyone to use this software + for any purpose, including commercial applications, + and to alter it and redistribute it freely, subject + to the following restrictions: + + 1. The origin of this software must not be + misrepresented; you must not claim that + you wrote the original software. If you + use this software in a product, an + acknowledgment in the product + documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly + marked as such, and must not be + misrepresented as being the original + software. + + 3. This notice may not be removed or + altered from any source distribution. diff --git a/os/debian/docs b/os/debian/docs deleted file mode 100644 index e51360c63c..0000000000 --- a/os/debian/docs +++ /dev/null @@ -1,2 +0,0 @@ -readme.txt -docs/multiplayer.txt diff --git a/os/debian/menu b/os/debian/menu index 3afa6e08e8..58e23aaa08 100644 --- a/os/debian/menu +++ b/os/debian/menu @@ -1,2 +1,2 @@ ?package(openttd):needs="X11" section="Games/Simulation" title="OpenTTD"\ -command="/usr/games/openttd" icon="/usr/share/pixmaps/openttd.32.xpm" +command="/usr/share/games/openttd/openttd-wrapper" icon="/usr/share/pixmaps/openttd.32.xpm" diff --git a/os/debian/openttd-wrapper b/os/debian/openttd-wrapper new file mode 100644 index 0000000000..3c35f7d365 --- /dev/null +++ b/os/debian/openttd-wrapper @@ -0,0 +1,26 @@ +#!/bin/sh +# This is a wrapper script that checks openttd's exit status and +# displays its stderr output + +# Get a file to capture stderr to +TMPFILE=`mktemp --tmpdir openttd.errout.XXXXXXXXX` + +if [ ! -w "$TMPFILE" ]; then + xmessage "Could not create temporary file for error messages. Not starting OpenTTD." + exit 1; +fi + +# Capture stderr +openttd "$@" 2> "$TMPFILE" +ERRCODE=$? +if [ "$ERRCODE" -ne 0 ]; then + CODEMSG="OpenTTD returned with error code $ERRCODE." + if [ -s "$TMPFILE" ]; then + MESSAGE="$CODEMSG The following error messages were produced:\n\n" + printf "$MESSAGE" | cat - "$TMPFILE" | fold -s | xmessage -file - + else + xmessage "$CODEMSG No error messages were produced." + fi +fi + +rm -f "$TMPFILE" diff --git a/os/debian/po/POTFILES.in b/os/debian/po/POTFILES.in deleted file mode 100644 index cef83a3407..0000000000 --- a/os/debian/po/POTFILES.in +++ /dev/null @@ -1 +0,0 @@ -[type: gettext/rfc822deb] templates diff --git a/os/debian/po/ca.po b/os/debian/po/ca.po deleted file mode 100644 index d0fb63b5d9..0000000000 --- a/os/debian/po/ca.po +++ /dev/null @@ -1,40 +0,0 @@ -# Catalan translation of openttd's Debconf templates. -# Copyright © 2007 Software in the Public Interest, Inc. -# This file is distributed under the same license as the openttd package. -# Jordi Mallach , 2007. -# -msgid "" -msgstr "" -"Project-Id-Version: openttd 0.5.2-1\n" -"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n" -"POT-Creation-Date: 2007-05-08 09:39+0200\n" -"PO-Revision-Date: 2007-06-01 00:45+0200\n" -"Last-Translator: Jordi Mallach \n" -"Language-Team: Catalan \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "Data files needed" -msgstr "Es necessiten els fitxers de dades" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"For its operation, OpenTTD needs the data files from the original Transport " -"Tycoon Deluxe game." -msgstr "" -"Per a funcionar, OpenTTD necessita els fitxers de dades del joc " -"Transport Tycoon Deluxe original." - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"See the /usr/share/doc/openttd/README.Debian file for more details about the " -"needed files and their location." -msgstr "Vegeu el fitxer /usr/share/doc/openttd/README.Debian per a obtenir-ne més detalls sobre els fitxers necessaris i la seua ubicació." diff --git a/os/debian/po/cs.po b/os/debian/po/cs.po deleted file mode 100644 index c87382e1a6..0000000000 --- a/os/debian/po/cs.po +++ /dev/null @@ -1,42 +0,0 @@ -# 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 , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: openttd\n" -"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n" -"POT-Creation-Date: 2007-05-08 09:39+0200\n" -"PO-Revision-Date: 2007-05-08 10:52+0200\n" -"Last-Translator: Miroslav Kure \n" -"Language-Team: Czech \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "Data files needed" -msgstr "Vyžadovány datové soubory" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"For its operation, OpenTTD needs the data files from the original Transport " -"Tycoon Deluxe game." -msgstr "" -"Pro svůj běh vyžaduje OpenTTD datové soubory z původní hry Transport Tycoon " -"Deluxe." - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"See the /usr/share/doc/openttd/README.Debian file for more details about the " -"needed files and their location." -msgstr "" -"Podrobnosti o vyžadovaných souborech a jejich umístění naleznete v souboru /" -"usr/share/doc/openttd/README.Debian." diff --git a/os/debian/po/de.po b/os/debian/po/de.po deleted file mode 100644 index d7b54fba88..0000000000 --- a/os/debian/po/de.po +++ /dev/null @@ -1,55 +0,0 @@ -# Translation of openttd debconf templates to German -# Copyright (C) Helge Kreutzmann , 2007. -# This file is distributed under the same license as the openttd package. -# -msgid "" -msgstr "" -"Project-Id-Version: openttd 0.5.0-2\n" -"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n" -"POT-Creation-Date: 2007-05-08 09:39+0200\n" -"PO-Revision-Date: 2007-05-08 21:21+0200\n" -"Last-Translator: Helge Kreutzmann \n" -"Language-Team: German \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-15\n" -"Content-Transfer-Encoding: 8bit\n" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "Data files needed" -msgstr "Bentigte Datendateien" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"For its operation, OpenTTD needs the data files from the original Transport " -"Tycoon Deluxe game." -msgstr "" -"Zum Betrieb bentigt OpenTTD Datendateien aus dem Originalspiel Transport " -"Tycoon Deluxe." - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"See the /usr/share/doc/openttd/README.Debian file for more details about the " -"needed files and their location." -msgstr "" -"Lesen Sie die Datei /usr/share/doc/openttd/README.Debian fr weitere Details " -"ber die bentigten Dateien und ihren Ort." - -#~ msgid "You need to install data files" -#~ msgstr "Sie mssen Daten-Dateien installieren" - -#~ msgid "" -#~ "OpenTTD needs the data files from the original Transport Tycoon Deluxe " -#~ "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 bentigt zur Ausfhrung Daten-Dateien aus dem Originalspiel " -#~ "Transport Tycoon Deluxe. Sie sollten diese Daten-Dateien installieren, " -#~ "bevor Sie das Spiel spielen knnen. Lesen Sie README.Debian fr weitere " -#~ "Details darber, welche Dateien wohin kopiert werden mssen." diff --git a/os/debian/po/eu.po b/os/debian/po/eu.po deleted file mode 100644 index 1cabc9e410..0000000000 --- a/os/debian/po/eu.po +++ /dev/null @@ -1,42 +0,0 @@ -# OpenTTD debconf template basque translation -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Piarres eobide , 2007. -# -msgid "" -msgstr "" -"Project-Id-Version: OpenTTD Debconf\n" -"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n" -"POT-Creation-Date: 2007-05-08 09:39+0200\n" -"PO-Revision-Date: 2007-05-08 09:55+0200\n" -"Last-Translator: Piarres eobide \n" -"Language-Team: Euskara \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "Data files needed" -msgstr "Datu fitxategiak behar dira" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"For its operation, OpenTTD needs the data files from the original Transport " -"Tycoon Deluxe game." -msgstr "" -"Funtziona dezan, OpenTTD-ek jatorrizko 'Transport Tycoon Deluxe' jokoaren " -"datu fitxategiak behar ditu." - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"See the /usr/share/doc/openttd/README.Debian file for more details about the " -"needed files and their location." -msgstr "" -"/usr/share/doc/openttd/README.Debian fitxategia begiratu beharrezko " -"fitategien eta bere kokapenari buruz xehetasun gehiago ikusteko." diff --git a/os/debian/po/fi.po b/os/debian/po/fi.po deleted file mode 100644 index eede54a210..0000000000 --- a/os/debian/po/fi.po +++ /dev/null @@ -1,32 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: openttd_0.5.3-1\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-09-19 04:33+0200\n" -"PO-Revision-Date: 2007-12-18 20:01+0200\n" -"Last-Translator: Esko Arajärvi \n" -"Language-Team: Finnish \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: Finnish\n" -"X-Poedit-Country: Finland\n" - -#. Type: error -#. Description -#: ../templates:1001 -msgid "Data files needed" -msgstr "Datatiedostoja puuttuu" - -#. Type: error -#. Description -#: ../templates:1001 -msgid "For its operation, OpenTTD needs the data files from the original Transport Tycoon Deluxe game." -msgstr "OpenTTD tarvitsee toimiakseen datatiedostoja alkuperäisestä Transport Tycoon Deluxe -pelistä." - -#. Type: error -#. Description -#: ../templates:1001 -msgid "See the /usr/share/doc/openttd/README.Debian file for more details about the needed files and their location." -msgstr "Tiedostossa /usr/share/doc/openttd/README.Debian on (englanniksi) lisätietoja tarvittavista tiedostoista ja niiden sijainnista." - diff --git a/os/debian/po/fr.po b/os/debian/po/fr.po deleted file mode 100644 index 04bc925df3..0000000000 --- a/os/debian/po/fr.po +++ /dev/null @@ -1,42 +0,0 @@ -# debian-l10n-french translation of 0.5.1-1. -# Copyright (C) 2007 THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Ivan Buresi , 2007. -# -msgid "" -msgstr "" -"Project-Id-Version: 0.5.1-1\n" -"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n" -"POT-Creation-Date: 2007-05-08 09:39+0200\n" -"PO-Revision-Date: 2007-05-08 11:41+0200\n" -"Last-Translator: Ivan Buresi \n" -"Language-Team: debian-l10n-french \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "Data files needed" -msgstr "Fichiers de données indispensables" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"For its operation, OpenTTD needs the data files from the original Transport " -"Tycoon Deluxe game." -msgstr "" -"Pour fonctionner correctement, OpenTTD a besoin des fichiers de données du " -"jeu « Transport Tycoon Deluxe » original." - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"See the /usr/share/doc/openttd/README.Debian file for more details about the " -"needed files and their location." -msgstr "" -"Veuillez lire le fichier /usr/share/doc/openttd/README.Debian pour plus " -"d'informations sur les fichiers requis et leur emplacement." diff --git a/os/debian/po/gl.po b/os/debian/po/gl.po deleted file mode 100644 index 154204e308..0000000000 --- a/os/debian/po/gl.po +++ /dev/null @@ -1,41 +0,0 @@ -# Galician translation of openttd's debconf templates -# This file is distributed under the same license as the openttd package. -# Jacobo Tarrio , 2007. -# -msgid "" -msgstr "" -"Project-Id-Version: openttd\n" -"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n" -"POT-Creation-Date: 2007-05-08 09:39+0200\n" -"PO-Revision-Date: 2007-05-08 13:12+0200\n" -"Last-Translator: Jacobo Tarrio \n" -"Language-Team: Galician \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "Data files needed" -msgstr "Precísase de ficheiros de datos" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"For its operation, OpenTTD needs the data files from the original Transport " -"Tycoon Deluxe game." -msgstr "" -"Para o seu funcionamento, OpenTTD precisa dos ficheiros de datos do xogo " -"Transport Tycoon Deluxe orixinal." - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"See the /usr/share/doc/openttd/README.Debian file for more details about the " -"needed files and their location." -msgstr "" -"Consulte o ficheiro /usr/share/doc/openttd/README.Debian para máis " -"información sobre os ficheiros necesarios e as súas ubicacións." diff --git a/os/debian/po/nl.po b/os/debian/po/nl.po deleted file mode 100644 index 7681410bab..0000000000 --- a/os/debian/po/nl.po +++ /dev/null @@ -1,43 +0,0 @@ -# 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 , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: openttd\n" -"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n" -"POT-Creation-Date: 2007-05-08 09:39+0200\n" -"PO-Revision-Date: 2007-05-16 19:25+0100\n" -"Last-Translator: Bart Cornelis \n" -"Language-Team: debian-l10n-dutch \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: Dutch\n" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "Data files needed" -msgstr "Databestanden zijn vereist" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"For its operation, OpenTTD needs the data files from the original Transport " -"Tycoon Deluxe game." -msgstr "" -"Om te werken heeft OpenTTD de databestanden van het oorspronkelijkee " -"'Transport Tycoon Deluxe'-spel nodig." - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"See the /usr/share/doc/openttd/README.Debian file for more details about the " -"needed files and their location." -msgstr "" -"Meer informatie over de vereiste bestanden en hun locatie vindt u in /usr/" -"share/doc/openttd/README.Debian . " diff --git a/os/debian/po/pt.po b/os/debian/po/pt.po deleted file mode 100644 index d40e189e78..0000000000 --- a/os/debian/po/pt.po +++ /dev/null @@ -1,42 +0,0 @@ -# Portuguese translation of openttd's debconf messages. -# Copyright (C) 2007 -# This file is distributed under the same license as the openttd package. -# Ricardo Silva , 2007 -# -msgid "" -msgstr "" -"Project-Id-Version: openttd\n" -"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n" -"POT-Creation-Date: 2007-05-08 09:39+0200\n" -"PO-Revision-Date: 2007-05-09 09:37+0100\n" -"Last-Translator: Ricardo Silva \n" -"Language-Team: Portuguese \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "Data files needed" -msgstr "São necessários ficheiros de dados" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"For its operation, OpenTTD needs the data files from the original Transport " -"Tycoon Deluxe game." -msgstr "" -"Para esta operação o OpenTTD precisa dos ficheiros de dados do jogo original " -"Transport Tycool Deluxe." - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"See the /usr/share/doc/openttd/README.Debian file for more details about the " -"needed files and their location." -msgstr "" -"Veja o ficheiro /usr/share/doc/openttd/README.Debian para mais detalhes " -"sobre os ficheiros que são necessários e a sua localização." diff --git a/os/debian/po/pt_BR.po b/os/debian/po/pt_BR.po deleted file mode 100644 index 505c1a2446..0000000000 --- a/os/debian/po/pt_BR.po +++ /dev/null @@ -1,43 +0,0 @@ -# openttd Brazilian Portuguese translation -# Copyright (C) 2007, Eder L. Marques -# This file is distributed under the same license as the openttd package. -# Eder L. Marques , 2007. -# -msgid "" -msgstr "" -"Project-Id-Version: openttd 0.5.0-2\n" -"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n" -"POT-Creation-Date: 2007-05-08 09:39+0200\n" -"PO-Revision-Date: 2007-05-08 11:00-0300\n" -"Last-Translator: Eder L. Marques \n" -"Language-Team: l10n Portuguese \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"pt_BR utf-8\n" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "Data files needed" -msgstr "Arquivos de dados necessários" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"For its operation, OpenTTD needs the data files from the original Transport " -"Tycoon Deluxe game." -msgstr "" -"Para sua operação, o OpenTTD necessita dos arquivos de dados do jogo " -"Transport Tycoon Deluxe original." - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"See the /usr/share/doc/openttd/README.Debian file for more details about the " -"needed files and their location." -msgstr "" -"Veja o arquivo /usr/share/doc/openttd/README.Debian para maiores detalhes " -"sobre os arquivos necessários e suas localizações." diff --git a/os/debian/po/ru.po b/os/debian/po/ru.po deleted file mode 100644 index 0c2a7fb81c..0000000000 --- a/os/debian/po/ru.po +++ /dev/null @@ -1,45 +0,0 @@ -# translation of openttd_debconf_ru.po to Russian -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# -# Yuri Kozlov , 2007. -msgid "" -msgstr "" -"Project-Id-Version: 0.5.1-1\n" -"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n" -"POT-Creation-Date: 2007-05-08 09:39+0200\n" -"PO-Revision-Date: 2007-05-10 21:45+0400\n" -"Last-Translator: Yuri Kozlov \n" -"Language-Team: Russian \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.11.4\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" -"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "Data files needed" -msgstr "Необходимы файлы данных" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"For its operation, OpenTTD needs the data files from the original Transport " -"Tycoon Deluxe game." -msgstr "" -"Для работы OpenTTD требуются файлы данных от оригинальной игры Transport " -"Tycoon Deluxe." - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"See the /usr/share/doc/openttd/README.Debian file for more details about the " -"needed files and their location." -msgstr "" -"В файле /usr/share/doc/openttd/README.Debian приведена информация о том, " -"какие файлы нужны и где они лежат." diff --git a/os/debian/po/sv.po b/os/debian/po/sv.po deleted file mode 100644 index 21aa8dea39..0000000000 --- a/os/debian/po/sv.po +++ /dev/null @@ -1,56 +0,0 @@ -# Swedish translation for openttd debconf template. -# Copyright (C) 2007 Free Software Foundation, Inc. -# This file is distributed under the same license as the openttd package. -# Daniel Nylander , 2007. -# -msgid "" -msgstr "" -"Project-Id-Version: openttd\n" -"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n" -"POT-Creation-Date: 2007-05-08 09:39+0200\n" -"PO-Revision-Date: 2007-05-08 09:47+0100\n" -"Last-Translator: Daniel Nylander \n" -"Language-Team: Swedish \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "Data files needed" -msgstr "Datafiler behövs" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"For its operation, OpenTTD needs the data files from the original Transport " -"Tycoon Deluxe game." -msgstr "" -"För att fungera behöva OpenTTD datafilerna från det ursprungliga spelet " -"Transport Tycoon Deluxe." - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"See the /usr/share/doc/openttd/README.Debian file for more details about the " -"needed files and their location." -msgstr "" -"Se filen /usr/share/doc/openttd/README.Debian för mer information om de " -"nödvändiga filera och var de finns någonstans." - -#~ msgid "You need to install data files" -#~ msgstr "Du behöver installera datafilerna" - -#~ msgid "" -#~ "OpenTTD needs the data files from the original Transport Tycoon Deluxe " -#~ "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 behöver datafilerna från det ursprungliga spelet Transport Tycoon " -#~ "Deluxe för att kunna köras. Du måste installera dessa datafiler innan du " -#~ "kan spela spelet. Se README.Debian för fler detaljer om vilka filer som " -#~ "behöver kopieras." diff --git a/os/debian/po/ta.po b/os/debian/po/ta.po deleted file mode 100644 index 2c068805b6..0000000000 --- a/os/debian/po/ta.po +++ /dev/null @@ -1,43 +0,0 @@ -# translation of openttd.po to TAMIL -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# -# Dr.T.Vasudevan , 2007. -msgid "" -msgstr "" -"Project-Id-Version: openttd\n" -"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n" -"POT-Creation-Date: 2007-05-08 09:39+0200\n" -"PO-Revision-Date: 2007-05-08 15:04+0530\n" -"Last-Translator: Dr.T.Vasudevan \n" -"Language-Team: TAMIL \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: KBabel 1.11.4\n" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "Data files needed" -msgstr "தேவையான தரவு கோப்புகள்" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"For its operation, OpenTTD needs the data files from the original Transport " -"Tycoon Deluxe game." -msgstr "" -"இயங்குவதற்கு ஓபன் டிடிடி(OpenTTD) க்கு ட்ரான்ஸ்போர்ட் டைகூன் டீலக்ஸ் விளையாட்டிலிருந்து " -"தரவு கோப்புகள் தேவை." - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"See the /usr/share/doc/openttd/README.Debian file for more details about the " -"needed files and their location." -msgstr "" -"தேவையான கோப்புகள் அவற்றின் இடம் ஆகியவற்றை அறிய /usr/share/doc/openttd/README " -"டெபியன் கோப்பை பார்க்கவும்." diff --git a/os/debian/po/templates.pot b/os/debian/po/templates.pot deleted file mode 100644 index 7f7e0623a8..0000000000 --- a/os/debian/po/templates.pot +++ /dev/null @@ -1,39 +0,0 @@ -# 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 , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: m.kooijman@student.utwente.nl\n" -"POT-Creation-Date: 2007-05-08 09:39+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "Data files needed" -msgstr "" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"For its operation, OpenTTD needs the data files from the original Transport " -"Tycoon Deluxe game." -msgstr "" - -#. Type: error -#. Description -#: ../templates:2001 -msgid "" -"See the /usr/share/doc/openttd/README.Debian file for more details about the " -"needed files and their location." -msgstr "" diff --git a/os/debian/postinst b/os/debian/postinst deleted file mode 100644 index 710d223d67..0000000000 --- a/os/debian/postinst +++ /dev/null @@ -1,8 +0,0 @@ -#! /bin/sh - -set -e - - -. /usr/share/debconf/confmodule - -#DEBHELPER# diff --git a/os/debian/rules b/os/debian/rules index 6bc9868ab2..a8834ed36d 100755 --- a/os/debian/rules +++ b/os/debian/rules @@ -1,88 +1,43 @@ #!/usr/bin/make -f # -*- makefile -*- -# Sample debian/rules that uses debhelper. -# GNU copyright 1997 to 1999 by Joey Hess. +# Makefile to build the openttd debian package. -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +# Use debhelper default for all targets (but some are overridden below). +%: + dh $@ -configure: configure-stamp -configure-stamp: - dh_testdir - # Add here commands to configure the package. +DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) +CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) +endif - touch configure-stamp +# Pass custom options to configure. Since it's not autoconf but a custom +# script, some of the option names are slightly different. We also need +# to be explicit about the dependencies, in case we're not running in a +# clean build root. +override_dh_auto_configure: + ./configure $(CROSS) --prefix-dir=/usr --install-dir=debian/openttd --without-allegro --with-zlib --with-lzo2 --with-sdl --with-png --with-freetype --with-fontconfig --with-icu - -build: configure build-stamp -build-stamp: - dh_testdir - - # Add here commands to compile the package. - - ./configure --prefix-dir=/usr --binary-dir=games --data-dir=share/games/openttd --icon-dir=share/pixmaps --personal-dir=.openttd --install-dir=debian/openttd - $(MAKE) - - #/usr/bin/docbook-to-man debian/openttd.sgml > openttd.1 - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp - - # Add here commands to clean up after the build process. - # We check for Makefile presence, because clean is called at the - # start of the build process (before configure) where we don't - # have a Makefile yet. - [ ! -f Makefile ] || $(MAKE) mrproper - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - # Add here commands to install the package into debian/openttd. +# Do some extra installation +override_dh_auto_install: $(MAKE) install -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. + # Install the wrapper and make it executable + install -d debian/openttd/usr/share/games/openttd/ + install -m755 debian/openttd-wrapper debian/openttd/usr/share/games/openttd/ -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - dh_installchangelogs changelog.txt - dh_installdocs - dh_installexamples -# dh_install - dh_installmenu - dh_installdebconf -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_installinit -# dh_installcron -# dh_installinfo - dh_installman docs/openttd.6 - dh_link - dh_strip - dh_compress - dh_fixperms -# dh_perl -# dh_python -# dh_makeshlibs - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb + # Since 0.7.0, upstream Makefile installs some unwanted stuff. + -rm $(CURDIR)/debian/openttd/usr/share/doc/openttd/COPYING + -rm $(CURDIR)/debian/openttd/usr/share/doc/openttd/changelog.txt + -rm $(CURDIR)/debian/openttd/usr/share/doc/openttd/ob*_format.txt -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure +# Don't do testing. Because the OpenTTD Makefile always does dependency +# generation (even on invalid targets), dh_auto_test thinks there is a +# "test" target, while there isn't. +override_dh_auto_test: + +# Call mrproper. Again, dh_auto_clean thinks there is a distclean +# target, while there isn't. +override_dh_auto_clean: + [ ! -f Makefile ] || $(MAKE) mrproper diff --git a/os/debian/templates b/os/debian/templates deleted file mode 100644 index 90797cdb7f..0000000000 --- a/os/debian/templates +++ /dev/null @@ -1,16 +0,0 @@ -# These templates have been reviewed by the debian-l10n-english -# team -# -# If modifications/additions/rewording are needed, please ask -# for an advice to debian-l10n-english@lists.debian.org -# -# Even minor modifications require translation updates and such -# changes should be coordinated with translators and reviewers. -Template: openttd/datafiles -Type: error -_Description: Data files needed - For its operation, OpenTTD needs the data files from the original - Transport Tycoon Deluxe game. - . - See the /usr/share/doc/openttd/README.Debian file for more details - about the needed files and their location. diff --git a/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp b/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp index e1f93cbf7f..78b8a9c603 100644 --- a/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp +++ b/src/3rdparty/squirrel/sqstdlib/sqstdaux.cpp @@ -2,6 +2,7 @@ #include #include #include +#include void sqstd_printcallstack(HSQUIRRELVM v) { @@ -21,7 +22,19 @@ void sqstd_printcallstack(HSQUIRRELVM v) const SQChar *fn=_SC("unknown"); const SQChar *src=_SC("unknown"); if(si.funcname)fn=si.funcname; - if(si.source)src=si.source; + if(si.source) { + /* We don't want to bother users with absolute paths to all AI files. + * Since the path only reaches NoAI code in a formatted string we have + * to strip it here. Let's hope nobody installs openttd in a subdirectory + * of a directory named /ai/. */ + src = scstrstr(si.source, _SC("\\ai\\")); + if (!src) src = scstrstr(si.source, _SC("/ai/")); + if (src) { + src += 4; + } else { + src = si.source; + } + } pf(v,_SC("*FUNCTION [%s()] %s line [%d]\n"),fn,src,si.line); level++; } diff --git a/src/driver.h b/src/driver.h index cf86051de0..6b4ae7bc6d 100644 --- a/src/driver.h +++ b/src/driver.h @@ -28,12 +28,13 @@ public: virtual ~Driver() { } + /** The type of driver */ enum Type { - DT_BEGIN = 0, - DT_SOUND = 0, - DT_MUSIC, - DT_VIDEO, - DT_END, + DT_BEGIN = 0, ///< Helper for iteration + DT_MUSIC = 0, ///< A music driver, needs to be before sound to properly shut down extmidi forked music players + DT_SOUND, ///< A sound driver + DT_VIDEO, ///< A video driver + DT_END, ///< Helper for iteration }; virtual const char *GetName() const = 0; @@ -64,7 +65,7 @@ private: static const char *GetDriverTypeName(Driver::Type type) { - static const char * const driver_type_name[] = { "sound", "music", "video" }; + static const char * const driver_type_name[] = { "music", "sound", "video" }; return driver_type_name[type]; } diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index d11cc5b95b..7663c5cf95 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1911,7 +1911,7 @@ void GenerateIndustries() for (uint i = 0; i < total_amount; i++) { uint32 r = RandomRange(total_prob); IndustryType it = 0; - while (it < NUM_INDUSTRYTYPES && r > industry_probs[it]) { + while (it < NUM_INDUSTRYTYPES && r >= industry_probs[it]) { r -= industry_probs[it]; it++; } diff --git a/src/music/extmidi.cpp b/src/music/extmidi.cpp index 48ee9d20eb..3842fc50cb 100644 --- a/src/music/extmidi.cpp +++ b/src/music/extmidi.cpp @@ -15,6 +15,7 @@ #include "../string_func.h" #include "../sound/sound_driver.hpp" #include "../video/video_driver.hpp" +#include "../gfx_func.h" #include "extmidi.h" #include #include @@ -108,7 +109,27 @@ void MusicDriver_ExtMidi::DoPlay() void MusicDriver_ExtMidi::DoStop() { - if (this->pid != -1) kill(this->pid, SIGTERM); + if (this->pid <= 0) return; + + /* First try to gracefully stop for about five seconds; + * 5 seconds = 5000 milliseconds, 10 ms per cycle => 500 cycles. */ + for (int i = 0; i < 500; i++) { + kill(this->pid, SIGTERM); + if (waitpid(this->pid, NULL, WNOHANG) == this->pid) { + /* It has shut down, so we are done */ + this->pid = -1; + return; + } + /* Wait 10 milliseconds. */ + CSleep(10); + } + + DEBUG(driver, 0, "extmidi: gracefully stopping failed, trying the hard way"); + /* Gracefully stopping failed. Do it the hard way + * and wait till the process finally died. */ + kill(this->pid, SIGKILL); + waitpid(this->pid, NULL, 0); + this->pid = -1; } #endif /* __MORPHOS__ */ diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 73760fec1a..d591bb4388 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -1001,13 +1001,8 @@ public: switch (ord->GetType()) { case OT_GOTO_WAYPOINT: - if (this->vehicle->type == VEH_TRAIN) { - xy = Waypoint::Get(ord->GetDestination())->xy; - break; - } - /* FALL THROUGH */ case OT_GOTO_STATION: - xy = Station::Get(ord->GetDestination())->xy; + xy = BaseStation::Get(ord->GetDestination())->xy; break; case OT_GOTO_DEPOT: diff --git a/src/string.cpp b/src/string.cpp index a70b484bd3..16e1e7099d 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -253,7 +253,7 @@ int CDECL vsnprintf(char *str, size_t size, const char *format, va_list ap) /* The buffer is too small for _vsnprintf to write the * null-terminator at its end and return size. */ str[size - 1] = '\0'; - return size; + return (int)size; } #endif /* _MSC_VER */ diff --git a/src/table/settings.h b/src/table/settings.h index 8dd38a6356..745c100dcd 100644 --- a/src/table/settings.h +++ b/src/table/settings.h @@ -340,7 +340,7 @@ const SettingDesc _settings[] = { SDT_CONDVAR(GameSettings, difficulty.number_industries, SLE_UINT8, 97, SL_MAX_VERSION, 0,NG, 4, 0, 4, 1, STR_NONE, DifficultyChange), SDT_CONDVAR(GameSettings, difficulty.max_loan, SLE_UINT32, 97, SL_MAX_VERSION, 0,NS|CR,300000,100000,500000,50000,STR_NULL, DifficultyChange), SDT_CONDVAR(GameSettings, difficulty.initial_interest, SLE_UINT8, 97, SL_MAX_VERSION, 0,NS, 2, 2, 4, 1, STR_NULL, DifficultyChange), - SDT_CONDVAR(GameSettings, difficulty.vehicle_costs, SLE_UINT8, 97, SL_MAX_VERSION, 0, 0, 0, 0, 2, 1, STR_SEA_LEVEL_LOW, DifficultyChange), + SDT_CONDVAR(GameSettings, difficulty.vehicle_costs, SLE_UINT8, 97, SL_MAX_VERSION, 0,NS, 0, 0, 2, 1, STR_SEA_LEVEL_LOW, DifficultyChange), SDT_CONDVAR(GameSettings, difficulty.competitor_speed, SLE_UINT8, 97, SL_MAX_VERSION, 0, 0, 2, 0, 4, 1, STR_AI_SPEED_VERY_SLOW, DifficultyChange), SDT_CONDNULL( 1, 97, 109), SDT_CONDVAR(GameSettings, difficulty.vehicle_breakdowns, SLE_UINT8, 97, SL_MAX_VERSION, 0, 0, 1, 0, 2, 1, STR_DISASTER_NONE, DifficultyChange),