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

A lot of work

parent 916d32c1
.bzr
.bzrignore
.pc
*.ncb
*.suo
*.vcproj.*
/Debug
/Release
/build
/config.*
/makeobj/makeobj
/makeobj/makeobj.exe
*sim
/sim.exe
*.*~
*~
/.build
*.orig
*.rej
/simutrans/*pak*
/simutrans/pak*
/simutrans/text
*.bdf
*.zip
*.vcxproj
*.vcxproj.*
/ipch/*
*.*sdf
*.diff
*.patch
*.log
/doxygen
......@@ -30,20 +30,16 @@ else
ifneq ($(findstring $(OSTYPE), cygwin mingw),)
ifeq ($(OSTYPE),cygwin)
CFLAGS += -I/usr/include/mingw -mwin32
LDFLAGS += -mno-cygwin
else
ifeq ($(OSTYPE),mingw)
CFLAGS += -DPNG_STATIC -DZLIB_STATIC
ifeq ($(BACKEND),gdi)
LIBS += -lunicows
endif
LDFLAGS += -static-libgcc -static-libstdc++
LDFLAGS += -static-libgcc -static-libstdc++ -Wl,--large-address-aware
LIBS += -lmingw32
endif
endif
SOURCES += simsys_w32_png.cc
CFLAGS += -DNOMINMAX -DWIN32_LEAN_AND_MEAN -DWINVER=0x0501 -D_WIN32_IE=0x0500
LIBS += -lgdi32 -lwinmm -lws2_32
LIBS += -lgdi32 -lwinmm -lws2_32 -limm32
# Disable the console on Windows unless WIN32_CONSOLE is set or graphics are disabled
ifneq ($(WIN32_CONSOLE),)
LDFLAGS += -mconsole
......@@ -77,8 +73,8 @@ SDL_CONFIG ?= sdl-config
SDL2_CONFIG ?= sdl2-config
ifneq ($(OPTIMISE),)
CFLAGS += -O3
ifeq ($(findstring $(OSTYPE), amiga haiku mac),)
CFLAGS += -O3
ifeq ($(findstring $(OSTYPE), amiga),)
CFLAGS += -minline-all-stringops
endif
else
......@@ -331,10 +327,10 @@ SOURCES += gui/sprachen.cc
SOURCES += gui/stadt_info.cc
SOURCES += gui/station_building_select.cc
SOURCES += gui/themeselector.cc
SOURCES += gui/obj_info.cc
SOURCES += gui/tool_selector.cc
SOURCES += gui/trafficlight_info.cc
SOURCES += gui/obj_info.cc
SOURCES += gui/welt.cc
SOURCES += gui/werkzeug_waehler.cc
SOURCES += network/checksum.cc
SOURCES += network/memory_rw.cc
SOURCES += network/network.cc
......@@ -424,9 +420,8 @@ SOURCES += simskin.cc
SOURCES += simsound.cc
SOURCES += simsys.cc
SOURCES += simticker.cc
SOURCES += simtools.cc
SOURCES += simtool.cc
SOURCES += simware.cc
SOURCES += simwerkz.cc
SOURCES += simworld.cc
SOURCES += sucher/platzsucher.cc
SOURCES += unicode.cc
......@@ -435,12 +430,13 @@ SOURCES += utils/csv.cc
SOURCES += utils/log.cc
SOURCES += utils/searchfolder.cc
SOURCES += utils/sha1.cc
SOURCES += utils/simrandom.cc
SOURCES += utils/simstring.cc
SOURCES += utils/simthread.cc
SOURCES += vehicle/movingobj.cc
SOURCES += vehicle/simpeople.cc
SOURCES += vehicle/simvehikel.cc
SOURCES += vehicle/simverkehr.cc
SOURCES += vehicle/simvehicle.cc
SOURCES += vehicle/simroadtraffic.cc
ifeq ($(BACKEND),allegro)
......
This diff is collapsed.
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="Nettool"
ProjectGUID="{F6C54DC9-69F2-4897-87E9-2A4A9FB9F643}"
RootNamespace="Simutrans"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)-nettool"
IntermediateDirectory="$(ConfigurationName)-nettool"
ConfigurationType="1"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="LITTLE_ENDIAN;DEBUG=3;NETTOOL"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
WarningLevel="3"
DebugInformationFormat="3"
DisableSpecificWarnings="4200;4800;4311;4996;4396"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winmm.lib Ws2_32.lib advapi32.lib wsock32.lib $(NOINHERIT)"
AdditionalLibraryDirectories=""
GenerateDebugInformation="true"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;"
PreprocessorDefinitions="LITTLE_ENDIAN;DEBUG=3;NETTOOL"
RuntimeLibrary="2"
WarningLevel="3"
DebugInformationFormat="3"
DisableSpecificWarnings="4200;4800;4311;4996"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winmm.lib advapi32.lib wsock32.lib $(NOINHERIT)"
AdditionalLibraryDirectories="&quot;"
GenerateDebugInformation="true"
OptimizeReferences="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\utils\fetchopt.cc"
>
</File>
<File
RelativePath=".\dataobj\freelist.cc"
>
</File>
<File
RelativePath=".\utils\log.cc"
>
</File>
<File
RelativePath=".\network\memory_rw.cc"
>
</File>
<File
RelativePath=".\nettools\nettool.cc"
>
</File>
<File
RelativePath=".\network\network.cc"
>
</File>
<File
RelativePath=".\network\network_address.cc"
>
</File>
<File
RelativePath=".\network\network_cmd.cc"
>
</File>
<File
RelativePath=".\network\network_file_transfer.cc"
>
</File>
<File
RelativePath=".\network\network_packet.cc"
>
</File>
<File
RelativePath=".\network\network_socket_list.cc"
>
</File>
<File
RelativePath=".\simdebug.cc"
>
</File>
<File
RelativePath=".\simmem.cc"
>
</File>
<File
RelativePath=".\utils\simstring.cc"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\utils\fetchopt.h"
>
</File>
<File
RelativePath=".\dataobj\freelist.h"
>
</File>
<File
RelativePath=".\utils\log.h"
>
</File>
<File
RelativePath=".\network\memory_rw.h"
>
</File>
<File
RelativePath=".\nettools\nettool.h"
>
</File>
<File
RelativePath=".\network\network.h"
>
</File>
<File
RelativePath=".\network\network_address.h"
>
</File>
<File
RelativePath=".\network\network_cmd.h"
>
</File>
<File
RelativePath=".\network\network_file_transfer.h"
>
</File>
<File
RelativePath=".\network\network_packet.h"
>
</File>
<File
RelativePath=".\network\network_socket_list.h"
>
</File>
<File
RelativePath=".\simdebug.h"
>
</File>
<File
RelativePath=".\simmem.h"
>
</File>
<File
RelativePath=".\utils\simstring.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
#!/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"