Commit c9562118 authored by Jörg Frings-Fürst's avatar Jörg Frings-Fürst

Imported Upstream version 120.1.3

parent a956b1b7

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

This diff is collapsed.
#!/bin/sh
# find the cpu type for SDL
sdl_cpu="`uname -p`"
if [ "${sdl_cpu}" == "i386" ]
then
# OSX 10.4 for intel uses ppc SDL
os_version="`/usr/sbin/system_profiler SPSoftwareDataType -detailLevel mini | egrep '(System Version): ' | cut -d: -f2-`"
os_version="${os_version#*10.}"
os_version="${os_version%.*}"
if [ "${os_version}" == "4" ]
then
sdl_cpu="ppc"
fi
fi
framework_path="${0%/*}"
if [ "${framework_path:0:1}" != "/" ]
then
framework_path="`pwd`"
fi
framework_path="${framework_path}/../Frameworks"
# remake the link every time. The bundle might have been moved to a new system.
ln -f -s "${framework_path}/SDL-${sdl_cpu}.framework" "${framework_path}/SDL.framework"
# execute the game
"${0}.`uname -p`"
# open the console if the game crashed
if [ "$?" != "0" ]
then
/usr/bin/osascript <<-EOF
tell application "Console" to activate
EOF
fi
# Makefile to build bundle applications for Mac OS X
# bundle makes a bundle designed to work on the system it was build on
# bundle_dist makes a bundle, which should work on all supported systems (custom config needed)
# Variables:
# CXXHOST CXX for host system. Only used when crosscompiling.
# BINARY_PPC path to the binary for PPC
# BINARY_i386 path to the binary for i386 (default $(PROGDIR)/$(PROG))
# SDL_PPC path to SDL.framwork for PPC
# SDL_i386 path to SDL.framwork for i386 (default ../Frameworks/SDL.framework)
# The name of the project is simutrans => thus we want to build the default bundle under simutrans
PROGNAME = $(PROG)
ifeq ($(PROGNAME),sim)
PROGNAME := "simutrans"
endif
CXXHOST ?= $(CXX)
BINARY_i386 ?= "$(PROGDIR)/$(PROG).app/Contents/MacOS/$(PROG)"
SDL_i386 ?= "../Frameworks/SDL.framework"
.PHONY: bundle bundle_dist
"OSX/getversion": OSX/getversion.cc simversion.h
@echo "===> Building $@"
$(Q)$(CXXHOST) "OSX/getversion.cc" -o $@
bundle: all "OSX/getversion"
@echo "===> Building bundle"
$(Q)rm -fr "$(PROGDIR)/$(PROG).app"
$(Q)mkdir -p "$(PROGDIR)/$(PROG).app/Contents/MacOS"
$(Q)mkdir -p "$(PROGDIR)/$(PROG).app/Contents/Resources"
$(Q)cp "$(PROGDIR)/$(PROG)" "$(PROGDIR)/$(PROG).app/Contents/MacOS/$(PROG)"
$(Q)cp "OSX/simutrans.icns" "$(PROGDIR)/$(PROG).app/Contents/Resources/$(PROG).icns"
$(Q)echo "APPL????" > "$(PROGDIR)/$(PROG).app/Contents/PkgInfo"
$(Q)OSX/plistgen.sh "$(PROGDIR)/$(PROG).app" "$(PROG)"
bundle_dist: bundle
@echo "===> Changing bundle to be distributable"
$(Q)mkdir -p "$(PROGDIR)/$(PROG).app/Contents/Frameworks"
$(Q)cp "$(BINARY_i386)" "$(PROGDIR)/$(PROG).app/Contents/MacOS/$(PROG).i386"
$(Q)cp "$(BINARY_PPC)" "$(PROGDIR)/$(PROG).app/Contents/MacOS/$(PROG).ppc"
$(Q)cp "OSX/binary_picker.sh" "$(PROGDIR)/$(PROG).app/Contents/MacOS/$(PROG)"
$(Q)cp -r "$(SDL_PPC)" "$(PROGDIR)/$(PROG).app/Contents/Frameworks/SDL-ppc.framework"
$(Q)cp -r "$(SDL_i386)" "$(PROGDIR)/$(PROG).app/Contents/Frameworks/SDL-i386.framework"
#!/bin/sh
date=`date +%Y`
PROG="$2"
COPYRIGHT="Copyright 1997-${date} by the simutrans team"
if [ -z "$3" ]; then
VERSION="`OSX/getversion`"
else
VERSION=$3
fi
echo "Executable $PROG"
echo "$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>${PROG}</string>
<key>CFBundleExecutable</key>
<string>${PROG}</string>
<key>CFBundleGetInfoString</key>
<string>${VERSION}, ${COPYRIGHT}</string>
<key>CFBundleIconFile</key>
<string>${PROG}.icns</string>
<key>CFBundleIdentifier</key>
<string>org.${PROG}.${PROG}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PROG}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${VERSION}</string>
<key>CFBundleVersion</key>
<string>${VERSION}</string>
<key>NSHumanReadableCopyright</key>
<string>${COPYRIGHT}</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>" > "$1"/Contents/Info.plist
#!/bin/sh
"${0}.`uname -p`"
if [ "$?" != "0" ]
then
/usr/bin/osascript <<-EOF
tell application "Console" to activate
EOF
fi
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
</application>
</compatibility>
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true/PM</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* Copyright (c) 1997 - 2001 Hansjrg Malthaner
*
* This file is part of the Simutrans project under the artistic licence.
* (see licence.txt)
*/
#ifndef __simtunnel_h
#define __simtunnel_h
#include "../simtypes.h"
#include "../dataobj/koord.h"
#include "../dataobj/koord3d.h"
class karte_ptr_t;
class player_t; // Hajo: 22-Nov-01: Added forward declaration
class tunnel_besch_t;
class weg_besch_t;
class tool_selector_t;
/**
* Baut Tunnel. Tunnel sollten nicht direkt instanziiert werden
* sondern immer vom tunnelbauer_t erzeugt werden.
*
* Es gibt keine Instanz - nur statische Methoden.
*
* @author V. Meyer
*/
class tunnelbauer_t {
private:
static karte_ptr_t welt;
static bool baue_tunnel(player_t *player, koord3d pos, koord3d end, koord zv, const tunnel_besch_t *besch);
static void baue_einfahrt(player_t *player, koord3d end, koord zv, const tunnel_besch_t *besch, const weg_besch_t *weg_besch, int &cost);
tunnelbauer_t() {} // private -> no instance please
public:
static koord3d finde_ende(player_t *player, koord3d pos, koord zv, const tunnel_besch_t *besch, bool full_tunnel=true, const char** msg=NULL);
static void register_besch(tunnel_besch_t *besch);
static const tunnel_besch_t *get_besch(const char *);
static const tunnel_besch_t *find_tunnel(const waytype_t wtyp, const sint32 min_speed,const uint16 time);
static void fill_menu(tool_selector_t *tool_selector, const waytype_t wtyp, sint16 sound_ok);
static const char *baue( player_t *player, koord pos, const tunnel_besch_t *besch, bool full_tunnel );
static const char *remove(player_t *player, koord3d pos, waytype_t wegtyp, bool all);
};
#endif
/*
* Copyright (c) 1997 - 2001 Hansjrg Malthaner
*
* This file is part of the Simutrans project under the artistic licence.
* (see licence.txt)
*/
#ifndef __simtunnel_h
#define __simtunnel_h
#include "../simtypes.h"
#include "../dataobj/koord.h"
#include "../dataobj/koord3d.h"
class karte_ptr_t;
class player_t; // Hajo: 22-Nov-01: Added forward declaration
class tunnel_besch_t;
class weg_besch_t;
class tool_selector_t;
/**
* Baut Tunnel. Tunnel sollten nicht direkt instanziiert werden
* sondern immer vom tunnelbauer_t erzeugt werden.
*
* Es gibt keine Instanz - nur statische Methoden.
*
* @author V. Meyer
*/
class tunnelbauer_t {
private:
static karte_ptr_t welt;
static bool baue_tunnel(player_t *player, koord3d pos, koord3d end, koord zv, const tunnel_besch_t *besch);
static void baue_einfahrt(player_t *player, koord3d end, koord zv, const tunnel_besch_t *besch, const weg_besch_t *weg_besch, int &cost);
tunnelbauer_t() {} // private -> no instance please
public:
static koord3d finde_ende(player_t *player, koord3d pos, koord zv, const tunnel_besch_t *besch, bool full_tunnel=true, const char** msg=NULL);
static void register_besch(tunnel_besch_t *besch);
static const tunnel_besch_t *get_besch(const char *);
static const tunnel_besch_t *find_tunnel(const waytype_t wtyp, const sint32 min_speed,const uint16 time);
static void fill_menu(tool_selector_t *tool_selector, const waytype_t wtyp, sint16 sound_ok);