diff options
author | truelight <truelight@openttd.org> | 2004-08-09 17:04:08 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2004-08-09 17:04:08 +0000 |
commit | efaeb275f78e18d594d9ee8ff04eccd2dc59512c (patch) | |
tree | bc8e1f56d77706d14d048cb2d99e53291930b520 /os/macos | |
download | openttd-efaeb275f78e18d594d9ee8ff04eccd2dc59512c.tar.xz |
(svn r1) Import of revision 975 of old (crashed) SVN
Diffstat (limited to 'os/macos')
-rw-r--r-- | os/macos/Crash_Log_Opener.sit | bin | 0 -> 16831 bytes | |||
-rw-r--r-- | os/macos/openttdmidi.java | 55 | ||||
-rw-r--r-- | os/macos/plistgen.sh | 45 | ||||
-rw-r--r-- | os/macos/track_starter | 2 | ||||
-rw-r--r-- | os/macos/ttd.icns | bin | 0 -> 41855 bytes |
5 files changed, 102 insertions, 0 deletions
diff --git a/os/macos/Crash_Log_Opener.sit b/os/macos/Crash_Log_Opener.sit Binary files differnew file mode 100644 index 000000000..29cf89c3a --- /dev/null +++ b/os/macos/Crash_Log_Opener.sit diff --git a/os/macos/openttdmidi.java b/os/macos/openttdmidi.java new file mode 100644 index 000000000..fc4e0b5b8 --- /dev/null +++ b/os/macos/openttdmidi.java @@ -0,0 +1,55 @@ +// +// 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); + } + } +} diff --git a/os/macos/plistgen.sh b/os/macos/plistgen.sh new file mode 100644 index 000000000..5ddb3a4e6 --- /dev/null +++ b/os/macos/plistgen.sh @@ -0,0 +1,45 @@ +#!/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 + +# 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>ttd</string> + <key>CFBundleGetInfoString</key> + <string>$VERSION, Copyright 2004 The Open Transport Tycoon team</string> + <key>CFBundleIconFile</key> + <string>ttd.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 The Open Transport Tycoon team</string> + <key>NSPrincipalClass</key> + <string>NSApplication</string> +</dict> +</plist>" > "$1"/contents/Info.plist diff --git a/os/macos/track_starter b/os/macos/track_starter new file mode 100644 index 000000000..809491181 --- /dev/null +++ b/os/macos/track_starter @@ -0,0 +1,2 @@ +#!/bin/bash +exec /usr/bin/java -cp OpenTTD.app/contents/macos OpenTTDMidi "$1" diff --git a/os/macos/ttd.icns b/os/macos/ttd.icns Binary files differnew file mode 100644 index 000000000..676840df9 --- /dev/null +++ b/os/macos/ttd.icns |