Changeset - r1694:bc9f40673fbc
[Not reviewed]
master
7 3 7
bjarni - 19 years ago 2005-04-14 20:42:30
bjarni@openttd.org
(svn r2198) renamed MacOS to MacOSX where it was written wrong. Made myself MacOSX porter as well as coder
17 files changed with 115 insertions and 115 deletions:
0 comments (0 inline, 0 general)
Makefile
Show inline comments
 
@@ -487,25 +487,25 @@ endif
 
endif
 

	
 
ifdef TRANSLATOR
 
STRGEN_FLAGS=-t
 
else
 
STRGEN_FLAGS=
 
endif
 

	
 

	
 
# MIDI setup
 
ifdef OSX
 
ifndef MIDI
 
MIDI:=$(OSXAPP)/contents/macos/track_starter
 
MIDI:=$(OSXAPP)/contents/macosx/track_starter
 
endif
 
ifndef SECOND_DATA_PATH
 
SECOND_DATA_PATH:="$(OSXAPP)/contents/data/"
 
endif
 
ifndef CUSTOM_LANG_DIR
 
CUSTOM_LANG_DIR:="$(OSXAPP)/contents/lang/"
 
endif
 
endif
 

	
 
ifdef MIDI
 
CDEFS += -DEXTERNAL_PLAYER=\"$(MIDI)\"
 
ifdef MIDI_ARG
 
@@ -765,54 +765,54 @@ quiet_cmd_cxx_compile = '===> Compiling 
 

	
 
##############################################################################
 
#
 
# Targets
 
#
 

	
 

	
 
### Normal build rules
 

	
 

	
 
ifdef OSX
 
OSX:=OSX
 
OSX_MIDI_PLAYER_FILE:=os/macos/OpenTTDMidi.class
 
OSX_MIDI_PLAYER_FILE:=os/macosx/OpenTTDMidi.class
 
endif
 

	
 

	
 
all: endian.h $(UPDATECONFIG) $(LANGS) $(TTD) $(OSX) $(endwarnings)
 

	
 
endian.h: $(ENDIAN_CHECK)
 
	@echo '===> Testing endianness'
 
	$(Q)./$(ENDIAN_CHECK) $(ENDIAN_FORCE) > $@
 

	
 
$(ENDIAN_CHECK): endian_check.c
 
	$(call cmd,compile_link)
 

	
 

	
 
$(TTD): table/strings.h $(OBJS) $(MAKE_CONFIG)
 
	$(call cmd,ttd_link)
 

	
 
$(OSX): $(TTD)
 
	$(Q)rm -fr "$(OSXAPP)"
 
	$(Q)mkdir -p "$(OSXAPP)"/Contents/MacOS
 
	$(Q)mkdir -p "$(OSXAPP)"/Contents/Resources
 
	$(Q)mkdir -p "$(OSXAPP)"/Contents/Data
 
	$(Q)mkdir -p "$(OSXAPP)"/Contents/Lang
 
	$(Q)echo "APPL????" > "$(OSXAPP)"/Contents/PkgInfo
 
	$(Q)cp os/macos/openttd.icns "$(OSXAPP)"/Contents/Resources/openttd.icns
 
	$(Q)os/macos/plistgen.sh "$(OSXAPP)" "$(REV)"
 
	$(Q)cp os/macos/track_starter "$(OSXAPP)"/contents/macos
 
	$(Q)ls os/macos | grep -q "\.class" || \
 
	       javac os/macos/OpenTTDMidi.java
 
	$(Q)cp os/macos/OpenTTDMidi.class "$(OSXAPP)"/contents/macos
 
	$(Q)cp os/macosx/openttd.icns "$(OSXAPP)"/Contents/Resources/openttd.icns
 
	$(Q)os/macosx/plistgen.sh "$(OSXAPP)" "$(REV)"
 
	$(Q)cp os/macosx/track_starter "$(OSXAPP)"/contents/macos
 
	$(Q)ls os/macosx | grep -q "\.class" || \
 
	       javac os/macosx/OpenTTDMidi.java
 
	$(Q)cp os/macosx/OpenTTDMidi.class "$(OSXAPP)"/contents/macos
 
	$(Q)cp data/* "$(OSXAPP)"/Contents/data/
 
	$(Q)cp lang/*.lng "$(OSXAPP)"/Contents/lang/
 
	$(Q)cp $(TTD) "$(OSXAPP)"/Contents/MacOS/$(TTD)
 

	
 
$(endwarnings): $(64_bit_warnings)
 

	
 
$(64_bit_warnings):
 
	$(warning 64 bit CPUs will get some 64 bit specific bugs!)
 
	$(warning If you see any bugs, include in your bug report that you use a 64 bit CPU)
 

	
 
$(STRGEN): strgen/strgen.c endian.h
 
	$(call cmd,compile_link)
 
@@ -868,42 +868,42 @@ ifdef OSX
 
release: all
 
	$(Q)mkdir -p "OpenTTD $(RELEASE)"
 
	$(Q)mkdir -p "OpenTTD $(RELEASE)"/docs
 
	$(Q)mkdir -p "OpenTTD $(RELEASE)"/scenario
 
	$(Q)cp -R $(OSXAPP) "OpenTTD $(RELEASE)"/
 
	$(Q)cp docs/OSX_where_did_the_package_go.txt "OpenTTD $(RELEASE)"/Where\ did\ the\ package\ go.txt
 
	$(Q)cp readme.txt "OpenTTD $(RELEASE)"/docs/
 
	$(Q)cp docs/README_if_game_crashed_on_OSX.txt "OpenTTD $(RELEASE)"/docs/readme\ if\ crashed\ on\ OSX.txt
 
	$(Q)cp docs/console.txt "OpenTTD $(RELEASE)"/docs/
 
	$(Q)cp COPYING "OpenTTD $(RELEASE)"/docs/
 
	$(Q)cp changelog.txt "OpenTTD $(RELEASE)"/docs/
 
	$(Q)cp docs/README_if_game_crashed_on_OSX.txt "OpenTTD $(RELEASE)"/docs/
 
	$(Q)cp os/macos/*.webloc "OpenTTD $(RELEASE)"
 
	$(Q)cp os/macosx/*.webloc "OpenTTD $(RELEASE)"
 
	$(Q)cp known-bugs.txt "OpenTTD $(RELEASE)"/known-bugs.txt
 
	$(Q)cp scenario/* "OpenTTD $(RELEASE)"/scenario/
 
	$(Q)/usr/bin/hdiutil create -ov -format UDZO -srcfolder "OpenTTD $(RELEASE)" openttd-"$(RELEASE)"-osx.dmg
 
	$(Q)rm -fr "OpenTTD $(RELEASE)"
 

	
 
nightly_build: all
 
	$(Q)mkdir -p "OpenTTD_nightly_$(DATE)"
 
	$(Q)mkdir -p "OpenTTD_nightly_$(DATE)"/docs
 
	$(Q)cp -R $(OSXAPP) "OpenTTD_nightly_$(DATE)"/
 
	$(Q)cp docs/OSX_where_did_the_package_go.txt "OpenTTD_nightly_$(DATE)"/Where\ did\ the\ package\ go.txt
 
	$(Q)cp readme.txt "OpenTTD_nightly_$(DATE)"/docs/
 
	$(Q)cp docs/README_if_game_crashed_on_OSX.txt "OpenTTD_nightly_$(DATE)"/docs/readme\ if\ crashed\ on\ OSX.txt
 
	$(Q)cp docs/console.txt "OpenTTD_nightly_$(DATE)"/docs/
 
	$(Q)cp COPYING "OpenTTD_nightly_$(DATE)"/docs/
 
	$(Q)cp revisionlog.txt "OpenTTD_nightly_$(DATE)"/revisionlog.txt
 
	$(Q)cp docs/README_if_game_crashed_on_OSX.txt "OpenTTD_nightly_$(DATE)"/docs/
 
	$(Q)cp os/macos/*.webloc "OpenTTD_nightly_$(DATE)"/
 
	$(Q)cp os/macosx/*.webloc "OpenTTD_nightly_$(DATE)"/
 
	$(Q)/usr/bin/hdiutil create -ov -format UDZO -srcfolder "OpenTTD_nightly_$(DATE)" openttd-nightly-"$(DATE)".dmg
 
	$(Q)rm -fr "OpenTTD_nightly_$(DATE)"
 

	
 
.PHONY: release nightly_build
 
endif
 

	
 
rev.c: FORCE
 
	@# setting the revision number in a place, there the binary can read it
 
	@echo 'const char _openttd_revision[] = "$(REV)";' >>rev.c.new
 
	@echo 'const int _revision_number = $(REV_NUMBER);' >>rev.c.new
 
	@# some additions for MorphOS versions tag
 
	@echo '#ifdef __MORPHOS__'  >>rev.c.new
misc_gui.c
Show inline comments
 
@@ -166,25 +166,25 @@ void PlaceLandBlockInfo(void)
 
		_place_proc = Place_LandInfo;
 
		SetObjectToPlace(0x2CF, 1, 1, 0);
 
	}
 
}
 

	
 
static const char *credits[] = {
 
	/*************************************************************************
 
	 *                      maximum length of string which fits in window   -^*/
 
	"Original design by Chris Sawyer",
 
	"Original graphics by Simon Foster",
 
	"",
 
	"The OpenTTD team (in alphabetical order):",
 
	"  Bjarni Corfitzen (Bjarni) - MacOS port",
 
	"  Bjarni Corfitzen (Bjarni) - MacOSX port, coder",
 
	"  Victor Fischer (Celestar) - Programming everywhere you need him to",
 
	"  Tamas Faragó (Darkvater) - Lead coder",
 
	"  Dominik Scherer (dominik81) - Lead coder",
 
	"  Kerekes Miham (MiHaMiX) - Translator system, and Nightlies host",
 
	"  Owen Rudge (orudge) - Forum- and masterserver host, OS/2 port",
 
	"  Christoph Mallon (Tron) - Programmer, code correctness police",
 
	"  Patric Stout (TrueLight) - Coder, network guru, SVN- and website host",
 
	"",
 
	"Retired Developers:",
 
	"  Ludvig Strigeus (ludde) - OpenTTD author, main coder (0.1 - 0.3.3)",
 
	"  Serge Paquet (vurlix) - Assistant project manager, coder (0.1 - 0.3.3)",
 
	"",
os/macos/Open_Transport_Tycoon_Forum.webloc
Show inline comments
 
deleted file
os/macos/Open_Transport_Tycoon_Homepage.webloc
Show inline comments
 
deleted file
os/macos/SourceForge_OpenTTD_project_homepage.webloc
Show inline comments
 
deleted file
os/macos/openttd.icns
Show inline comments
 
deleted file
 
binary diff not shown
os/macos/openttdmidi.java
Show inline comments
 
deleted file
os/macos/plistgen.sh
Show inline comments
 
deleted file
os/macos/track_starter
Show inline comments
 
deleted file
os/macosx/Open_Transport_Tycoon_Forum.webloc
Show inline comments
 
new file 100644
os/macosx/Open_Transport_Tycoon_Homepage.webloc
Show inline comments
 
new file 100644
os/macosx/SourceForge_OpenTTD_project_homepage.webloc
Show inline comments
 
new file 100644
os/macosx/openttd.icns
Show inline comments
 
new file 100644
 
binary diff not shown
os/macosx/openttdmidi.java
Show inline comments
 
new file 100644
 
//
 
//  OpenTTDMidi.java
 
//  OpenTTDMidi
 
//
 
//  Created by Joshua King on Sun Apr 25 2004.
 
//  Copyright (c) 2004 __MyCompanyName__. All rights reserved.
 
//
 
import java.io.*;
 
import java.util.*;
 
import javax.sound.midi.*;
 

	
 
public class OpenTTDMidi {
 

	
 
    public static void main (String args[]) {
 
        // Currently command line is the MIDI file
 
		if (args.length == 1) {
 
			Sequencer s2 = null;
 
			
 
			try {
 
				s2 = MidiSystem.getSequencer();
 
				s2.open();
 
			} catch (MidiUnavailableException mue) {
 
				System.exit(1);
 
			}
 
			
 
			Sequence s = null;
 
			
 
			try {
 
				s = MidiSystem.getSequence(new File(args[0]));
 
			} catch (InvalidMidiDataException imde) {
 
				System.exit(2);
 
			} catch (IOException ioe) {
 
				System.exit(3);
 
			}
 
			
 
			try {
 
				s2.setSequence(s);
 
				s2.setMicrosecondPosition(0);
 
				s2.start();
 
				for (long l = 0; l < (s.getMicrosecondLength() / 1000000); l++) {
 
					try {
 
						//System.out.print(".");
 
						Thread.currentThread().sleep(1000);
 
					} catch (InterruptedException ie) {}
 
				}
 
				System.out.println();
 
			} catch (InvalidMidiDataException imde) {
 
			}
 
			
 
			s2.stop();
 
			s2.close();
 
			System.exit(0);
 
		}	
 
    }
 
}
os/macosx/plistgen.sh
Show inline comments
 
new file 100755
 
#!/bin/sh
 

	
 
# sets VERSION to the value if RELEASE if there are any,
 
# otherwise it sets VERSION to revision number
 
if [ "$3" ]; then
 
VERSION="$3"
 
else
 
VERSION="$2"
 
fi
 
date=`date +%Y`
 

	
 
# Generates Info.plist while applying $VERSION
 

	
 
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
 
<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" 
 
\"http://www.apple.com/DTDs/Prop$
 
<plist version=\"1.0\">
 
<dict>
 
        <key>CFBundleDevelopmentRegion</key>
 
        <string>English</string>
 
        <key>CFBundleDisplayName</key>
 
        <string>Open Transport Tycoon</string>
 
        <key>CFBundleExecutable</key>
 
        <string>openttd</string>
 
        <key>CFBundleGetInfoString</key>
 
        <string>$VERSION, Copyright 2004-$date The Open Transport Tycoon team</string>
 
        <key>CFBundleIconFile</key>
 
        <string>openttd.icns</string>
 
        <key>CFBundleIdentifier</key>
 
        <string>org.ludde-ottd.ludde-ottd</string>
 
        <key>CFBundleInfoDictionaryVersion</key>
 
        <string>6.0</string>
 
        <key>CFBundleName</key>
 
        <string>ottd</string>
 
        <key>CFBundlePackageType</key>
 
        <string>APPL</string>
 
        <key>CFBundleShortVersionString</key>
 
        <string>$VERSION</string>
 
        <key>CFBundleVersion</key>
 
        <string>$VERSION</string>
 
        <key>NSHumanReadableCopyright</key>
 
        <string>Copyright 2004-$date The Open Transport Tycoon team</string>
 
        <key>NSPrincipalClass</key>
 
        <string>NSApplication</string>
 
</dict>
 
</plist>" > "$1"/contents/Info.plist
os/macosx/track_starter
Show inline comments
 
new file 100755
 
#!/bin/bash
 
exec /usr/bin/java -cp OpenTTD.app/contents/macos OpenTTDMidi "$1"
readme.txt
Show inline comments
 
@@ -203,25 +203,25 @@ Example:
 
strgen lang/german.txt
 

	
 
This results in compiling german.txt and produces another file named german.lng.
 
Any missing strings are replaced with the english strings. Note that it looks for english.txt
 
in the lang subdirectory, which is where your language file should also be.
 

	
 
That's all! You should now be able to select the language in the game options.
 

	
 

	
 
X.X) Credits:
 
---- --------
 
The OpenTTD team (in alphabetical order):
 
  Bjarni Corfitzen (Bjarni)      - MacOS port
 
  Bjarni Corfitzen (Bjarni)      - MacOSX port, coder
 
  Victor Fischer (Celestar)      - Programming everywhere you need him to
 
  Tamas Faragó (Darkvater)       - Lead programmer
 
  Dominik Scherer (dominik81)    - Lead programmer
 
  Kerekes Miham (MiHaMiX)        - Maintainer of translator service, and host of nightlies
 
  Owen Rudge (orudge)            - Contributor, forum host, masterserver host
 
  Christoph Mallon (Tron)        - Programmer, code correctness police
 
  Patric Stout (TrueLight)       - Programmer, network guru, SVN-repository and website host
 

	
 
Retired Developers:
 
  Ludvig Strigeus (ludde)        - OpenTTD author, main coder (0.1 - 0.3.3)
 
  Serge Paquet (vurlix)          - Assistant project manager, coder (0.1 - 0.3.3)
 

	
0 comments (0 inline, 0 general)