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
 
@@ -496,7 +496,7 @@ 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/"
 
@@ -774,7 +774,7 @@ quiet_cmd_cxx_compile = '===> Compiling 
 

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

	
 

	
 
@@ -798,12 +798,12 @@ endian.h: $(ENDIAN_CHECK)
 
	$(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)
 
@@ -877,7 +877,7 @@ release: all
 
	$(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
 
@@ -894,7 +894,7 @@ nightly_build: all
 
	$(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)"
 

	
misc_gui.c
Show inline comments
 
@@ -175,7 +175,7 @@ static const char *credits[] = {
 
	"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",
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
 
@@ -212,7 +212,7 @@ That's all! You should now be able to se
 
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
0 comments (0 inline, 0 general)