Compare commits

..

134 Commits

Author SHA1 Message Date
Günther Brammer 3fe8c353e7 Added tag release-5.1.2 for changeset 231524eaec9a 2011-02-11 15:32:46 +01:00
Günther Brammer 588ba69052 Version 5.1.2 [4] 2011-02-11 15:32:03 +01:00
Julius Michaelis 5ef3991e7b console mode: Make CStdWindow::Init succeed
This solves the problem introduced with "Fix stable branch compile errors".
2011-02-11 15:26:53 +01:00
Günther Brammer 59514d0123 crew: Default Infocores without Physical information to the Clonks defaults
This makes Crews that were used with the 5.2 branch usable with 5.1.x.
2011-02-10 15:33:12 +01:00
Günther Brammer e989553435 sdl: update for refresh rate API changes 2011-01-24 23:32:51 +01:00
Günther Brammer 6e0d2ad391 console mode: Fix compilation without libreadline 2011-02-04 00:16:45 +01:00
Günther Brammer 801cf1b8b3 Flush stdout after every log line even without a terminal 2011-02-04 00:15:52 +01:00
Charles Spurrill d7f01fc0d2 Cannon and lorry don't fall off the sides of the map 2011-02-02 16:08:48 -08:00
Maikel de Vries 066caf1509 Objects: Fixed #554, respawn container does not spawn weapons anymore 2011-01-31 19:09:13 +01:00
Julius Michaelis 1e3dc0fe4d dedicated: fix CMake and object loading (thanks ck and Guenther)
Conflicts:

	CMakeLists.txt
2011-01-30 21:44:54 +01:00
Nicolas Hake d3d5e77f69 Only select display modes with the configured color depth 2011-01-31 14:37:32 +01:00
Nicolas Hake e9d9e7c178 win32: Default to current desktop display settings (#484, #493)
Previously, the graphics code tried to set a refresh rate as close to
85 Hz as possible. This led to black screens when the display driver
would report a refresh rate that was not actually supported by the
monitor.
This change also uses the currently set monitor orientation, instead
of always selecting a non-rotated display mode.

Conflicts:

	src/gui/C4StartupOptionsDlg.cpp
2011-01-20 15:43:19 +01:00
Günther Brammer b3a34fea69 editor/gtk: Save the clipboard on exit
Normally, this is done by gtk_main with a private function. Since Clonk
does not use gtk_main, that function is copied and slightly changed to use
the public API and compile as C++.
2011-01-16 21:30:59 +01:00
Günther Brammer b03f6381fb Script: == works when one side is an object with proplist type label
I don't actually know how to get to that situation in script, but when it
happens, everything else expecting an object would correctly accept it
despite the proplist label.
2011-01-15 23:03:01 +01:00
Charles Spurrill d55609e633 very slightly improved texture for wooden cabin 2011-01-14 17:17:22 -08:00
Maikel de Vries 9b26363e52 Objects: Fixed a possible runtime error in the Parkour goal 2011-01-14 22:32:50 +01:00
Günther Brammer 503172bf99 Fix a mismatched malloc/delete resulting from StdStdBuf::GrabPointer usage 2011-01-12 19:58:33 +01:00
Martin Plicht 7725a9290a C4GamePadCon: Fix some method signatures and a preprocessor directive 2010-12-24 14:18:51 +01:00
Günther Brammer fdcb1dfb19 console mode: Fix all the obvious compile errors
One of them even affected any engine configured without OpenGL support.
2011-02-08 23:12:30 +01:00
Günther Brammer 608b76a44a x11: Restore argc/argv saving accidentally removed two commits ago 2011-01-10 15:52:50 +01:00
Günther Brammer 031345c1ac console mode: Fix stable branch compile errors 2011-02-09 00:16:58 +01:00
Günther Brammer 7dd368086e console mode: Move keyboard input to CStdInProc, make it compile again
Conflicts:

	src/editor/C4Console.cpp
	src/platform/StdMacApp.mm
2011-02-08 22:51:23 +01:00
Günther Brammer 1ce90e97e5 Edge: Remove a stray ActMap.txt 2011-01-04 15:39:26 +01:00
Günther Brammer 654d29120a Script: Add DigFreeMat
So that one can script magical winter services or whatever else that
requires removing just some specific materials.
2011-01-02 02:14:45 +01:00
Günther Brammer 7a63dc8878 scheduler: Only execute one proc per poll call
The Execute callback could create a new proc which made the poll results
and proc list disagree, confusing the loop.
2011-01-07 00:22:44 +01:00
Günther Brammer cf52e9d395 config: Remove General/Definitions 2011-01-04 17:39:52 +01:00
Tobias Zwick 867935d691 make sword work correctly with gamepad controls 2011-01-03 21:20:01 +01:00
Tobias Zwick 957f865cfa fixed pressing use1/use2 on gamepad when no item is selected (#535) 2011-01-03 21:15:19 +01:00
Armin Burgmeier 9a15b99753 Fix crash when both shaders and FoW are enabled (#549)
PerformBlt and BlitLandscape did not clean up the GL state properly as the
texcoord pointer for texture 3 was still set and enabled but pointing to
nowhere anymore.
2011-01-02 20:33:45 +01:00
Maikel de Vries 08ae037534 Objects: Fixed parkour short description
This was due to a false ordering of checkpoints in the cp_list, not that this ordering still doesn´t function if SetCPMode() is used alone.
2011-01-02 12:49:50 +01:00
Nicolas Hake 12f6255453 win32: Do not throw exceptions from WinMain 2011-01-02 03:50:06 +01:00
Nicolas Hake 2f6aaa9133 win32: Do not use SEH in WinMain because it needs stack unwinding 2011-01-02 03:44:07 +01:00
Nicolas Hake 6d6633e576 Correctly specify type of GenerateDump 2011-01-02 03:41:20 +01:00
Armin Burgmeier 651153d814 Add a CMake option for generating mini dumps 2011-01-02 01:20:52 +01:00
Maikel de Vries 34c41dc837 Overcast: Removed double Scenario.txt Sky entry
Caused a warning in the logs.
2011-01-01 22:32:31 +01:00
Sebastian Rühl 1fd6f2f057 Use cmake in the debian build, and add hg as a build dependency
* Mercurial as Build Dependency
  * Switch to cmake as build system
  * Fixed spacing issues in $(CURDIR)
2010-12-31 15:41:41 +01:00
Maikel de Vries dcf8ef75f3 Cool Cavern: Finetuned landscape and TopOpen=0 2010-12-29 22:08:51 +01:00
Armin Burgmeier 69268b2999 Don't reset progress bar when starting to load definitions 2010-12-29 17:00:13 +01:00
Tobias Zwick 1956c37923 fix: Version information from masterserver is correctly parsed
PeterW changed some stuff about the INI parser. I adjusted the parsing of the version info from the masterserver to fit his change
and let the C4Network2RefClient inherit from the C4Network2UpdateClient (as refclient does the same as updateclient only more) while I was at it.
2010-12-27 01:07:59 +01:00
Tobias Zwick 21ccfe946f Clonk client redirects user to download page if new version is available but not as update 2010-12-27 00:31:25 +01:00
Armin Burgmeier 8f8ff33bd9 Add --without-automatic-update when building the Debian package 2010-12-26 22:10:39 +01:00
Sebastian Rühl 1dccd4a5b5 Add icon to Debian package 2010-12-26 17:56:20 +01:00
Sebastian Rühl 40dc82c4aa Introducing Debian files 2010-12-26 00:04:23 +01:00
Armin Burgmeier 745b7d4f20 Add a compile-time option to disable automatic update 2010-12-26 21:39:52 +01:00
Armin Burgmeier f50972a9de Fix update procedure on Windows
by letting c4group wait for the Clonk process to terminate
2010-12-26 20:49:04 +01:00
David Dormagen b471c22204 kill logs fix
-with rant about GetRelaunchCount
2010-12-25 19:06:05 +01:00
Günther Brammer 6650f12696 Remove a debug printf 2010-12-22 02:11:16 +01:00
MimmoO 760c06666e WindScroll: correct killer set 2010-12-20 18:49:45 +01:00
MimmoO 81e4b1e9ab Thunderous Skies: Added to stable branch 2011-01-09 15:56:00 +01:00
Günther Brammer e864c56d10 Added tag release-5.1.1 for changeset 994c87fddebe 2010-12-25 00:51:33 +01:00
Günther Brammer 0023db162a Version 5.1.1 [3] 2010-12-25 00:50:58 +01:00
Maikel de Vries c317842d86 Objects: Fixed error causing variable declaration. 2010-12-21 14:49:32 +01:00
MimmoO e6a576d86b Materials: Lava: replaced texture with a slightly modified one from the forum. replace this with the original one once we have glow. 2010-12-20 15:08:03 +01:00
Richard Gerum e937ced1b9 added shield walking animation 2010-12-19 23:33:36 +01:00
Charles Spurrill 4199cd6ea0 fix sword texture for Molten Monarch 2010-12-19 13:46:32 -08:00
Charles Spurrill 11f1c5a12a clonk chicken-leg fix 2010-12-17 10:24:32 -08:00
Charles Spurrill 1b1ac22903 mushroom doesn't fly at incredible speeds when batted by club 2010-12-17 10:24:01 -08:00
Maikel de Vries 47912aecfa Scenario: KOTHs open weapon menu on game start now
Conflicts:

	planet/BackToTheRocks.c4f/FreeSkies.c4s/Script.c
2010-12-17 16:08:20 +01:00
Maikel de Vries 7ea74f5a07 Parkour: Sensible Short Description, Fixed (#547) 2010-12-16 21:25:42 +01:00
Tobias Zwick 6a21ef5c3d bugfixfix for zooming 2010-12-16 18:18:40 +01:00
Nicolas Hake dfe46deab5 win64: Fix crash when a C4String gets allocated at >4GB 2010-12-16 17:26:52 +01:00
David Dormagen 4e4b55f06c sword damage lowered by 1 2010-12-15 19:00:04 +01:00
MimmoO 9ebf1f3a1a KotH: no regeneration by default 2010-12-15 18:14:20 +01:00
Tobias Zwick 58a143960c fixed #536: Gamepad: zooming with buttons needs several clicking 2010-12-15 02:16:24 +01:00
Armin Burgmeier fec9b5cdcc Add license text for libogg and libvorbis
We use this (indirectly) on linux via SDL_mixer, and we link it statically,
so we need to reproduce the copyright message.
2010-12-15 00:03:59 +01:00
David Dormagen 94f8130ba5 KotH fix 2010-12-14 20:59:08 +01:00
David Dormagen ce8373c5fe KotH punish suiciding non-kings a bit 2010-12-14 19:46:06 +01:00
David Dormagen 260b416aff kill logs uses GameCallEx now 2010-12-14 19:45:32 +01:00
David Dormagen d5dfdf4185 KotH goal now announces new king on the death of the old (log) 2010-12-14 19:10:53 +01:00
David Dormagen 8e51b6ddc9 kill logs cleaned up
the relaunch messages are now also in the kill logs object
2010-12-14 17:59:18 +01:00
MimmoO 4dfaa99988 Tutorial3: Balloon got new texture 2010-12-14 15:04:04 +01:00
David Dormagen bf4b2ca37e kill logs changes
-logs removed from LastManStanding
-additional callbacks added
2010-12-13 23:35:32 +01:00
Maikel de Vries 3c81601719 Objects: Fixed Log message and flag grabbing in CTF. 2010-12-11 13:05:40 +01:00
Maikel de Vries f4011aa5d7 Objects: Added possible exception to KillLogs
and removed Width and Height DefCore entries for goals and rules
2010-12-11 12:30:51 +01:00
MimmoO fbec8430aa FrozenFortress: Frostbolt now only damages clonks. 2010-12-09 14:31:59 +01:00
Maikel de Vries 59a09c3c3c Engine: Removed FIGHT procedure and all related stuff.
This is obsolete with new melee implementation and other authors should either use that or make something unique themselfs. Removed DFA_FIGHT, C4Script FnFightWith, ObjectActionFight, NoFight, OCF_FightReady, Fight Physical
2010-12-07 18:57:27 +01:00
Sven Eberhardt 596bde6c4c increase loam bridge length by 1/3rd 2010-12-08 17:47:12 +01:00
Tobias Zwick c975db93d0 removed hands display in the HUD 2010-12-08 17:13:24 +01:00
Peewee f4d98cdf67 Fixed a typo and some 'code never reached' warnings. 2010-10-10 23:20:42 -04:00
MimmoO 9998ee8795 Flag: Bugfix when dropping flag 2010-12-07 22:03:41 +01:00
MimmoO c3f0635e27 CTF: added visual flag trail 2010-12-07 20:54:06 +01:00
MimmoO bba58e7ebf Removed logs from flag 2010-12-07 18:52:04 +01:00
MimmoO 14915be42f CTF: Flag grabbing mechanism automatized 2010-12-07 18:48:35 +01:00
Maikel de Vries c628de3d73 Objects: CTF - Flag now attached to base
This prevents players from scoring if the other team has already taken the flag but not have cleared the base.
2010-12-07 17:16:18 +01:00
MimmoO 42a1d61351 KillLogs added to all melees and ctfs 2010-12-07 14:44:38 +01:00
David Dormagen a3d27b9911 kill log ignores calls with clonk==nil 2010-12-06 19:32:19 +01:00
Charles Spurrill a33500a3c2 fix musket material for molten monarch 2010-12-04 14:35:49 -08:00
Armin Burgmeier 4badd7d3d9 Order submeshes so that opaque ones are rendered before non-opaque ones 2010-12-04 23:33:05 +01:00
Charles Spurrill 987d5daa0b seperated musket alpha map 2010-12-04 13:52:08 -08:00
MimmoO cd99ed1285 Boomshire: Anti-fail for planes 2010-12-06 16:26:09 +01:00
MimmoO 24104b6a87 Boomshire: Map fix 2010-12-06 15:20:24 +01:00
Tobias Zwick aa66fadf31 default: no runtime join = 1 2010-12-04 00:56:58 +01:00
Armin Burgmeier e7ad0c35ff Possible crash fix: Reset pLast in C4GUI::Container::ClearChildren() 2010-12-12 14:21:18 +01:00
MimmoO ad98b1bf75 Hideout: underground passage made harder to pass through 2010-12-11 18:30:32 +01:00
MimmoO 9e93c339b7 Hideout: added correct friction to the gems 2010-12-09 14:37:31 +01:00
MimmoO 44c98290b1 Hideout: Updated and corrected description. 2010-12-07 22:26:05 +01:00
MimmoO 9457b845b2 Hideout: minor map changes against failing BrickEdges 2010-12-07 14:26:10 +01:00
MimmoO 08bb5b8ea9 PyreGem: now actually works! 2010-12-06 19:31:27 +01:00
MimmoO 9ff39245dd PyreGem: !Fehler!-fix 2010-12-06 19:24:57 +01:00
David Dormagen fc5eb73d6a Added kill logs rule
announces the kills/deaths of the players in the game log. To be tested in Hideout now
2010-12-06 19:09:31 +01:00
MimmoO b51b8e335b Hideout: PyreGem: Transfer thrower for kill-tracing from LifeGem 2010-12-06 18:46:20 +01:00
David Dormagen 82d534e00e Hideout/LifeGem changes
- LifeGem only spawns when killed by enemy team
- cosmetic changes
2010-12-06 17:55:51 +01:00
MimmoO 66f6c0dc88 Hideout: LifeGem cancel on damage fix 2010-12-06 14:53:02 +01:00
MimmoO 18d81e85cd Hideout: Map fix 2010-12-05 21:36:10 +01:00
MimmoO 612a3a5a60 LifeGem: proper description added 2010-12-05 14:36:27 +01:00
MimmoO dc63668210 Hideout: re-opened a blastable way below the hideout, removed cannons 2010-12-04 23:12:50 +01:00
MimmoO b40935c701 PyreGem: target finding bugfix 2010-12-04 21:51:31 +01:00
MimmoO 44aef776db PyreGem: added even more feedback 2010-12-04 20:46:39 +01:00
MimmoO 25aa4f2f70 Hideout: chests dont stuck in material 2010-12-04 20:35:13 +01:00
MimmoO 63dcc5bb0f Hideout: chests adjustments, pyregem range nerf 2010-12-04 20:30:12 +01:00
MimmoO 90d9e3d017 Hideout: Map smaller map, removed tunnel, added ramp to get to the higher entrance 2010-12-04 18:02:14 +01:00
David Dormagen 9f0f2a26ca LifeGem does not fade out anymore 2010-12-04 17:43:52 +01:00
Maikel de Vries e6d56f90a8 IRC: changed default channel to #openclonk
There are no people in #openclonk-lobby at all, therefore we´d rather invite people to a filled channel, if there is too much spam in #openclonk we can always decide to make a special moderated lobby channel.
2010-12-11 16:12:37 +01:00
Maikel de Vries 60d379a4ae Objects: Fixed (#520), only king gets point malus for suicide in koth 2010-12-11 00:47:05 +01:00
Armin Burgmeier cd243fd077 Update XPM icon from CZ to OC 2010-12-10 23:42:00 +01:00
Sven Eberhardt 0e75437d40 reset OnFire status when fire effect is cleared on Clonk death (#222) 2010-12-10 16:00:53 +01:00
Tobias Zwick fb7a327475 if the clonk is stuck, he can't jump 2010-12-08 16:46:54 +01:00
Tobias Zwick 87faf5c0b5 Javelin exits the clonk on throw in the right height now 2010-12-08 16:34:53 +01:00
Tobias Zwick f2018cc4e7 fixed nullpointer exception on death of clonk that is in no crew 2010-12-08 16:34:20 +01:00
Tobias Zwick 8834f9ea54 Resolved #515: Q now closes other menu and opens backpack menu
Before, Q closed any menu if it was open or else opened the backpack menu.
2010-12-08 01:56:48 +01:00
Tobias Zwick 250bd8aa23 Musket: also resume aiming if the mouse was released shortly while reloading 2010-12-08 01:55:18 +01:00
Tobias Zwick 191921520d resolved #508: Continue to aim with musket after musket reloaded
Before, the musket would always stop using the musket after reloading even if the mouse button was held down the whole time during reload.
2010-12-08 01:24:53 +01:00
Martin Plicht 0d00d808f6 C4MaterialMap::Clear: Also set Num to 0 2010-12-04 04:31:25 +01:00
Martin Plicht 059f3f8bbe C4Config: Save & Load -> same file 2010-08-09 14:52:32 +02:00
Günther Brammer 3e5f4deebb Script: FindConstructionSite returns 0 when the search fails 2010-12-04 23:48:17 +01:00
Armin Burgmeier c11f4075f5 Enable custom installer graphics 2010-12-05 17:44:49 +01:00
Richard Gerum 4651341c5f fixed bug with two grapplers. Shooting the second in the air while hanging on the first doesn't disconnect the rope now 2010-12-04 20:38:59 +01:00
Charles Spurrill 959c0d4322 #512: Cannon can't shoot when turning around
Also improved the turning animations a bit
2010-12-04 11:25:03 -08:00
David Dormagen 5164d4a838 name and desc property added to the LifeGem 2010-12-04 17:34:08 +01:00
Maikel de Vries 157fdabf4a Tutorials: Added missing german string in tut3 2010-12-04 17:22:49 +01:00
Maikel de Vries c5f9eb910f Engine: Objects hit only if both speed and and relative speed exceed HitSpeed2
This is bugfix to c1b41a96cdc6, since not moving objects like a fused dynamit could induce a hit.
2010-12-04 17:02:16 +01:00
Charles Spurrill 212fb1c934 Default control rate in network games is 3, not 1 2010-12-03 21:20:23 -08:00
Günther Brammer 3266d56175 Landscape: Hardcode sky transparency directly (#317)
Since "Remove a lot of old obsolete palette code", the landscape palette
does not have a transparent color at position 0 anymore. Instead of
restoring that invariant, stop getting the sky color from the palette.

Since every other color was taken from a texture already, stop using the
palette altogether for ingame landscape display.
2010-12-04 02:24:13 +01:00
Nicolas Hake 6f1cbe27ef Added tag release-5.1.0 for changeset 17141bc63e61 2010-12-04 11:21:47 +01:00
8214 changed files with 322887 additions and 468902 deletions

View File

@ -1,2 +0,0 @@
node: $Format:%H$
date: $Format:%ci$

6
.gitattributes vendored
View File

@ -1,6 +0,0 @@
.git_archival export-subst
.gitattributes export-ignore
.gitignore export-ignore
*.sh text eol=lf
tools/osx_bundle_libs text eol=lf

162
.gitignore vendored
View File

@ -1,162 +0,0 @@
*~
*.bak
.deps
deps
*.o
/openclonk
/openclonk-server
/netpuncher
/c4group
/c4script
*.a
*.c4p
planet/Records.c4f
*.lib
*.dll
config.h
C4Version.h
Makefile
C4Include.h.gch
intermediate
/build*
CMakeScripts
CMakeFiles
CMakeCache.txt
planet/CMakeFiles
planet/CMakeCache.txt
CPackConfig.cmake
CPackSourceConfig.cmake
*.rule
editor-icons.h
oc-icon.h
NativeToolsExport.cmake
engine-resource.c
tests/CTestTestfile.cmake
# Documentation
*.pyc
node_modules
/docs/online
/docs/chm
/docs/sdk-de
/docs/sdk/content.xml
/docs/*.mo
/docs/doku.pot
/docs/Functions.txt
/docs/lunr.js
# Visual studio files
openclonk.opensdf
openclonk.manifest
deps/
planet/Release
planet/RelWithDebInfo
planet/Debug
planet/MinSizeRel
planet/clonk.dir
planet/c4group.dir
planet/ZERO_CHECK.dir
planet/fmod.dll
planet/cmake_install.cmake
planet/clonk.sln
planet/clonk.ilk
*.ipdb
*.iobj
openclonk.VC.db
openclonk.VC.VC.opendb
build
planet/clonk.app
Release
RelWithDebInfo
MinSizeRel
Debug
clonk.dir
c4group.dir
ZERO_CHECK.dir
fmod.dll
cmake_install.cmake
clonk.sln
clonk.ilk
openclonk.sln
openclonk.ilk
*.vcproj
*.vcxproj
*.vcxproj.filters
/ipch
.vs/
c4group_autogen/
c4script_autogen/
libc4script_autogen/
libmisc_autogen/
libopenclonk_autogen/
netpuncher_autogen/
openclonk-server_autogen/
openclonk_autogen/
thirdparty/blake2/blake2_autogen/
# Temporary files created by Microsoft Visual Studio
*.ncb
*.plg
*.opt
*.suo
*.sbr
*.bsc
BuildLog.htm
*.user
*.positions
*.idb
*.pdb
*.ilk
# TortoiseHg loves to generate those
*.orig
# XCode temporary files + Xcode not temporary files
.DS_Store
._*
xcode/build
*.xcodeproj
# Binaries
*.app
*.exe
# Development files explicitely excluded
planet/nohg*
*.nohg*
# Eclipse project file
planet/.project
# Code::Blocks files
openclonk.layout
openclonk.sdf
openclonk.cbp
tests/openclonk_unittest.cbp
tests/openclonk_unittest.sln
# MacOSX saved searches
*.savedSearch
planet/OpenClonk.bat
planet/openclonk.sln
WindowsGamesExplorer.xml
# Mape
./mape
/mape
mape-icons.h
mape-resource.c
# Packed groups created directly in root path
/*.oc*
# QMake stuff
*_automoc.cpp
moc_*.cpp
qrc_resource.cpp
ui_C4ConsoleQt*.h
resource.qrc.depends
*.exp
qt.conf

107
.hgignore 100644
View File

@ -0,0 +1,107 @@
syntax: glob
autom4te.cache
*~
*.bak
.deps
deps
*.o
clonk
c4group
.dirstamp
*.a
*.c4p
planet/Records.c4f
*.lib
*.dll
stamp-h1
config.h
config.log
config.status
C4Version.h
Makefile
C4Include.h.gch
Makefile.in
aclocal.m4
autotools/config.guess
autotools/config.sub
autotools/compile
autotools/depcomp
autotools/install-sh
autotools/missing
configure
intermediate
# Documentation
*.pyc
docs/online
docs/chm
docs/sdk-de
docs/sdk/content.xml
docs/*.mo
docs/doku.pot
docs/Functions.txt
# Visual studio files
deps/
planet/Release
planet/RelWithDebInfo
planet/Debug
planet/MinSizeRel
planet/CMakeFiles
planet/clonk.dir
planet/c4group.dir
planet/ZERO_CHECK.dir
planet/libeay32.dll
planet/fmod.dll
planet/cmake_install.cmake
planet/clonk.sln
planet/clonk.ilk
planet/CMakeCache.txt
Release
RelWithDebInfo
MinSizeRel
Debug
CMakeFiles
clonk.dir
c4group.dir
ZERO_CHECK.dir
libeay32.dll
fmod.dll
cmake_install.cmake
clonk.sln
clonk.ilk
CMakeCache.txt
*.vcproj
# Temporary files created by Microsoft Visual Studio
*.ncb
*.plg
*.opt
*.suo
*.sbr
*.bsc
BuildLog.htm
*.user
*.positions
*.idb
*.pdb
*.ilk
# TortoiseHg loves to generate those
*.orig
# XCode temporary files + Xcode not temporary files
.DS_Store
xcode/build
*.xcodeproj
.anjuta*
# Binaries
planet/Clonk.app
*.exe
# Development files explicitely excluded
planet/nohg*

View File

@ -1,84 +0,0 @@
# thanks to http://stackoverflow.com/questions/29312015/building-with-more-than-one-version-of-a-compiler for the template
language: cpp
dist: trusty
sudo: required # for Qt libraries. Additionally, the virtualization builds are more stable and have better single core performance.
matrix:
include:
- os: linux
compiler: gcc
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-4.9', 'build-essential', 'cmake3', 'libfreetype6-dev', 'libgl1-mesa-dev', 'libglew-dev', 'libgtk-3-dev', 'libjpeg-dev', 'libpng-dev', 'libsdl2-dev', 'libupnp-dev', 'libxrandr-dev', 'x11proto-core-dev', 'zlib1g-dev', 'libalut0', 'libgtest-dev']
env:
- CCOMPILER=gcc-4.9
- CXXCOMPILER=g++-4.9
- TYPE=Debug # somehow, the linking fails for release builds. If someone could fix that, that would be great.
- BSYS="Unix Makefiles#make -k"
- os: linux
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: ppa:beineri/opt-qt596-trusty
packages: ['g++-5', 'build-essential', 'cmake3', 'libpng-dev', 'libjpeg-dev', 'libfreetype6-dev', 'libglew-dev', 'libreadline-dev', 'libsdl2-dev', 'qt59base', 'libalut-dev', 'libvorbis-dev', 'libopenal-dev', 'libdw-dev', 'libgtest-dev', 'ninja-build']
env:
- CCOMPILER=gcc-5
- CXXCOMPILER=g++-5
- TYPE=RelWithDebInfo
- CXX_FLAGS="-fdiagnostics-color -I/usr/include/AL"
- BSYS="Ninja#ninja -k30" PCH=on
- UPLOAD_SNAPSHOT=1
- CMAKE_FLAGS="-DCMAKE_INSTALL_PREFIX=/usr -DWITH_AUTOMATIC_UPDATE=ON -DWITH_APPDIR_INSTALLATION=ON"
- os: linux
compiler: clang
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.8']
packages: ['clang-3.8', 'build-essential', 'cmake3', 'libfreetype6-dev', 'libgl1-mesa-dev', 'libglew-dev', 'libgtk-3-dev', 'libjpeg-dev', 'libpng-dev', 'libsdl2-dev', 'libupnp-dev', 'libxrandr-dev', 'x11proto-core-dev', 'zlib1g-dev', 'libalut0', 'ninja-build', 'libc++-dev', 'libc++1', 'libgtest-dev']
env:
- CCOMPILER=clang-3.8
- CXXCOMPILER=clang++-3.8
- CXX_FLAGS="-stdlib=libc++ -fcolor-diagnostics"
- TYPE=Debug
- BSYS="Ninja#ninja -k30"
before_install:
- for t in test mock; do wget https://github.com/google/google$t/archive/release-1.7.0.tar.gz -Og$t.tgz && tar xvf g$t.tgz; done
install:
- '[ -e /opt/qt59/bin/qt59-env.sh ] && source /opt/qt59/bin/qt59-env.sh || echo building without Qt'
before_script:
- export CXX="$CXXCOMPILER" CC="$CCOMPILER"
- export C4REVISION_BRANCH="$TRAVIS_BRANCH"
- >
cmake
-G"${BSYS/\#*/}"
-DCMAKE_BUILD_TYPE="$TYPE"
-DCMAKE_CXX_FLAGS="$CXX_FLAGS"
-DUSE_GCC_PCH=${PCH:-off}
-DGTEST_ROOT=$PWD/googletest-release-1.7.0
-DGMOCK_ROOT=$PWD/googlemock-release-1.7.0
$CMAKE_FLAGS
.
script:
- ${BSYS/*#/} all netpuncher tests aul_test
# TODO: Remove SKIP_IPV6_TEST once Travis generally adds ::1 as loopback address.
- SKIP_IPV6_TEST=1 ./tests/tests
- ./tests/aul_test
after_success:
- >
[ "$UPLOAD_SNAPSHOT" = 1 ] &&
echo "Creating AppImage..." &&
tools/create_appimage.sh &&
echo "Uploading snapshot..." &&
tools/upload_snapshot.sh OpenClonk-x86_64.AppImage OpenClonk-x86_64.AppImage.zsync ||
echo "Snapshot creation has failed"

File diff suppressed because it is too large Load Diff

50
COPYING
View File

@ -1,50 +0,0 @@
Copyright (c) 2001-2009, RedWolf Design GmbH, http://www.clonk.de
Copyright (c) 2009-2016, The OpenClonk Team and contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
(This is the ISC license. <http://opensource.org/licenses/ISC>)
Portions of the code have been contributed by other authors:
Copyright (c) 2006-2007 Alexander Post
Copyright (c) 2004-2013 Armin Burgmeier
Copyright (c) 2005-2006, 2008-2010 Asmageddon
Copyright (c) 2010, 2012 Benjamin Herr
Copyright (c) 2006, 2012 Bernhard Bonigl
Copyright (c) 2009-2010 Carl-Philip Hänsch
Copyright (c) 2001 Carlo Teubner
Copyright (c) 2009, 2011-2013 David Dormagen
Copyright (c) 2011-2012 Felix Wagner
Copyright (c) 2006 Florian Groß
Copyright (c) 2004-2012 Günther Brammer
Copyright (c) 2006-2008 Julian Raschke
Copyright (c) 2010-2012 Julius Michaelis
Copyright (c) 2010-2011 Maikel de Vries
Copyright (c) 2010 Manuel Riecke
Copyright (c) 2009 Mark Haßelbusch
Copyright (c) 2009-2012 Martin Plicht
Copyright (c) 1998-2009 Matthes Bender
Copyright (c) 2001 Michael Käser
Copyright (c) 2009 mizipzor
Copyright (c) 2009-2013 Nicolas Hake
Copyright (c) 2013 Oliver Schneider
Copyright (c) 2010 Peewee
Copyright (c) 2001-2011 Peter Wortmann
Copyright (c) 2012 Philipp Kern
Copyright (c) 2009-2010 Richard Gerum
Copyright (c) 2001-2013 Sven Eberhardt
Copyright (c) 2004-2005, 2009-2013 Tobias Zwick
Code inside the "thirdparty" directory has been included for convenience
and may be licensed under different terms. See the respective directories
for details.

View File

@ -1,35 +1,27 @@
<Engine and Tools>
Sven Eberhardt (Sven2)
Günther Brammer (Günther)
Nicolas Hake (Isilkor)
<Engine Development>
Armin Burgmeier (Clonk-Karl)
Lukas Werling (Luchs)
Martin Plicht (Mortimer)
Julius Michaelis (JCaesar)
Günther Brammer (Günther)
Nicolas Hake (Isilkor)
Sven Eberhardt (Sven2)
Peter Wortmann (PeterW)
<Scripting and Content>
<Content, Art and Scripting>
Maikel de Vries (Maikel)
David Dormagen (Zapper)
Mark Haßelbusch (Marky)
Felix Wagner (Clonkonaut)
Bernhard Bonigl (Boni)
<Art and Content>
Charles Spurrill (Ringwaul)
Richard Gerum (Randrian)
Timo Stabbert (Mimmo)
Matthias Rottländer (Matthi)
<Music and Sound>
David Oerther (ala)
Martin Strohmeier (K-Pone)
<Administration>
Tobias Zwick (Newton)
Richard Gerum (Randrian)
Charles Spurrill (Ringwaul)
David Dormagen (Zapper)
Timo Stabbert (Mimmo)
Alexander Semeniuk (AlteredARMOR)
<Special Thanks to Contributors>
Contributors for OpenClonk 8.0: George Tokmaji (Fulgen), Martin Adam (Win), Merten Ehmig (pluto), Florian Graier (Nachtfalter), Philip Holzmann (Foaly), Dominik Bayerl (Kanibal), Linus Heckemann (sphalerite), Pyrit, Armin Schäfer, Tushar Maheshwari, jok, Tarte, Philip Kern (pkern), Arne Schauf (NativeException), Matthias Mailänder, marsmoon
Previous contributors: Tim Blume, Sven-Hendrik Haase, Carl-Philip Hänsch (Carli), Jan Heberer, Benjamin Herr (Loriel), Lauri Niskanen (Ape), Johannes Nixdorf (mixi), Misty de Meo, Fabian Pietsch, Manuel Rieke (MrBeast), Felix Riese (Fungiform), Sebastian Rühl, Oliver Schneider (ker), Lorenz Schwittmann, Alexander Semeniuk (AlteredARMOR), Daniel Theuke (ST-DDT), Andriel, Apfelclonk, Asmageddon, Checkmaty, Clonkine, dylanstrategie, Faby, grgecko, Gurkenglas, hasufell, Koronis, mizipzor, Peewee, Russell, Stan, TomyLobo
Also thanks to our Linux package maintainers Benedict Etzel (B_E), Linus Heckemann (sphalerite), Philip Kern (pkern), Matthias Mailänder, Julian Ospald (hasufell), Kevin Zheng, and more
Finally, a big thanks to Matthes Bender and all those who contributed to previous Clonk titles for the passion they put into the game and for agreeing to make Clonk open source.
<Web>
-Admin
Tobias Zwick (Newton)
-C4DT Eclipse plugin
Martin Plicht (Mortimer)
-C4Masterserver
Benedict Etzel (B_E)
<Thanks to Contributors>
Benjamin Herr (Loriel), Martin Plicht (Mortimer), Caesar, Manuel Riecke (Spell), Carl-Philip Hänsch (Carli), Asmageddon, Florian Graier (Nachtfalter), Merten Ehmig (pluto), Marky (Mark Haßelbusch), Luchs, Peewee, Lauri Niskanen (Ape), Dominik Bayerl (Kanibal), Matthias Rottländer (Matthi), Faby, Checkmaty, Felix Wagner (Clonkonaut), TomyLobo, Stan, Gurkenglas, Clonkine
RedWolf Design GmbH and all those who contributed to previous Clonk titles for the passion they put into the game and for agreeing to make Clonk open source.

31
FindReadline.cmake 100644
View File

@ -0,0 +1,31 @@
# - Find READLINE
# Find the native READLINE includes and library
#
# READLINE_INCLUDE_DIR - where to find READLINE.h, etc.
# READLINE_LIBRARIES - List of libraries when using READLINE.
# READLINE_FOUND - True if READLINE found.
IF (READLINE_INCLUDE_DIR)
# Already in cache, be silent
SET(READLINE_FIND_QUIETLY TRUE)
ENDIF (READLINE_INCLUDE_DIR)
FIND_PATH(READLINE_INCLUDE_DIR readline.h)
SET(READLINE_NAMES readline libreadline)
FIND_LIBRARY(READLINE_LIBRARY NAMES ${READLINE_NAMES} )
# handle the QUIETLY and REQUIRED arguments and set READLINE_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(READLINE DEFAULT_MSG READLINE_LIBRARY READLINE_INCLUDE_DIR)
IF(READLINE_FOUND)
SET( READLINE_LIBRARIES ${READLINE_LIBRARY} )
ELSE(READLINE_FOUND)
SET( READLINE_LIBRARIES )
ENDIF(READLINE_FOUND)
MARK_AS_ADVANCED( READLINE_LIBRARY READLINE_INCLUDE_DIR )

728
Makefile.am 100644
View File

@ -0,0 +1,728 @@
# Copyright (c) 2005-2009, RedWolf Design GmbH, http://www.clonk.de
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
ACLOCAL_AMFLAGS = -I autotools --install
bin_PROGRAMS = clonk c4group
EXTRA_PROGRAMS = tstc4netio puncher gunzip4c4group
noinst_LIBRARIES = lib.a
# Some defines and warning options
if RECENT_GCC
GCC_FLAGS = -pipe
WARNING_FLAGS = -Wall -Wextra -Wno-invalid-offsetof \
-Wredundant-decls -Wendif-labels -Wpointer-arith \
-Wcast-qual -Wcast-align -Wwrite-strings -Winit-self \
-Wsign-promo \
-Wno-parentheses -Wno-unused-parameter -Wno-inline \
-Wno-reorder -Wno-float-equal -Wno-switch
##-Wmissing-format-attribute -Wdisabled-optimization -Wlogical-op
##-Weffc++ -Wold-style-cast -Woverloaded-virtual -Wunsafe-loop-optimizations
else
GCC_FLAGS =
WARNING_FLAGS = -Wall
endif
AM_CXXFLAGS = $(PTHREAD_CFLAGS) $(WINDOWS_CFLAGS) $(WARNING_FLAGS) $(GCC_FLAGS)
AM_CFLAGS = -Wall $(GCC_FLAGS)
AM_CPPFLAGS = \
-I$(builddir) \
-I$(srcdir)/src \
-I$(srcdir)/src/c4group \
-I$(srcdir)/src/network \
-I$(srcdir)/src/lib \
-I$(srcdir)/src/platform \
-I$(srcdir)/src/config \
-I$(srcdir)/src/res \
-I$(srcdir)/src/control \
-I$(srcdir)/src/gui \
-I$(srcdir)/src/editor \
-I$(srcdir)/src/game/landscape \
-I$(srcdir)/src/game/player \
-I$(srcdir)/src/game/script \
-I$(srcdir)/src/game \
-I$(srcdir)/src/game/object \
-I$(srcdir)/src/lib/texture \
-I$(srcdir)/src/script \
$(GLEW_CFLAGS) $(GTK_CFLAGS) $(OPENAL_CFLAGS) $(FREETYPE_CFLAGS) $(SDL_CFLAGS) $(BOOST_CPPFLAGS)
##BUILT_SOURCES = hgrevision.h
##hgrevision.h: $(srcdir)/.hg/dirstate
## $(srcdir)/tools/get_hg_revision.sh > hgrevision.h
##$(srcdir)/.hg/dirstate:
BUILT_SOURCES = C4Version.h
do_subst = sed -e 's,[@]C4PROJECT[@],OpenClonk Project,g' \
-e 's,[@]C4PROJECT_DOMAIN[@],openclonk,g' \
-e 's,[@]C4PROJECT_TLD[@],org,g' \
-e 's,[@]C4PROJECT_URL[@],http://wiki.openclonk.org,g' \
-e 's,[@]C4COPYRIGHT_YEAR[@],'$$(sed -n 's/SET(C4COPYRIGHT_YEAR\s\+\(.\+\)).\+/\1/ p' $(srcdir)/Version.txt)',g' \
-e 's,[@]C4ENGINENAME[@],'"$$(sed -n 's/SET(C4ENGINENAME\s\+"\(.\+\)")/\1/ p' $(srcdir)/Version.txt)"',g' \
-e 's,[@]C4ENGINENICK[@],'$$(sed -n 's/SET(C4ENGINENICK\s\+"\(.\+\)")/\1/ p' $(srcdir)/Version.txt)',g' \
-e 's,[@]C4ENGINEID[@],org.openclonk." C4ENGINENICK ",g' \
-e 's,[@]C4XVER1[@],'$$(sed -n 's/SET(C4XVER1\s\+\(.\+\))/\1/ p' $(srcdir)/Version.txt)',g' \
-e 's,[@]C4XVER2[@],'$$(sed -n 's/SET(C4XVER2\s\+\(.\+\))/\1/ p' $(srcdir)/Version.txt)',g' \
-e 's,[@]C4XVER3[@],'$$(sed -n 's/SET(C4XVER3\s\+\(.\+\))/\1/ p' $(srcdir)/Version.txt)',g' \
-e 's,[@]C4XVER4[@],'$$(sed -n 's/SET(C4XVER4\s\+\(.\+\))/\1/ p' $(srcdir)/Version.txt)',g' \
-e 's,[@]C4VERSIONBUILDNAME[@],'"$$(sed -n 's/SET(C4VERSIONBUILDNAME\s\+"\(.\+\)")/\1/ p' $(srcdir)/Version.txt)"',g' \
-e 's,[@]C4VERSIONEXTRA[@],'$$(sed -n 's/SET(C4VERSIONEXTRA\s\+"\(.\+\)")/\1/ p' $(srcdir)/Version.txt)',g'
C4Version.h: $(srcdir)/src/C4Version.h.in
$(do_subst) < $< > $@
#various hacks to get dependency tracking working with a precompiled C4Include
if RECENT_GCC
BUILT_SOURCES += C4Include.h.gch
CLEANFILES = C4Include.h.gch
DISTCLEANFILES = @am__quote@$(DEPDIR)/C4Include.Po@am__quote@
# Adapted from the automake compile-command for normal source files.
# Has to be updated after certain changes in this file.
C4Include.h.gch: src/C4Include.h
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -x c++-header -MT C4Include.h.gch -MD -MP -MF $(DEPDIR)/C4Include.Tpo -c -o $@ $(srcdir)/src/C4Include.h
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/C4Include.Tpo $(DEPDIR)/C4Include.Po
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -x c++-header -c -o $@ $(srcdir)/src/C4Include.h
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/C4Include.Po@am__quote@
if am__fastdepCXX
AM_CXXFLAGS += -fpch-deps
endif
WARNING_FLAGS += -Winvalid-pch
endif
lib_a_SOURCES = \
src/lib/C4InputValidation.cpp \
src/lib/C4InputValidation.h \
src/lib/C4LogBuf.cpp \
src/lib/C4LogBuf.h \
src/lib/C4Random.cpp \
src/lib/C4Random.h \
src/lib/C4Real.cpp \
src/lib/C4Real.h \
src/lib/C4Rect.cpp \
src/lib/C4Rect.h \
src/lib/C4RTF.cpp \
src/lib/C4RTF.h \
src/lib/C4Stat.cpp \
src/lib/C4Stat.h \
src/lib/PathFinder.cpp \
src/lib/PathFinder.h \
src/lib/Standard.cpp \
src/lib/Standard.h \
src/lib/StdAdaptors.h \
src/lib/StdBase64.cpp \
src/lib/StdBase64.h \
src/lib/StdBuf.cpp \
src/lib/StdBuf.h \
src/lib/StdColors.h \
src/lib/StdCompiler.cpp \
src/lib/StdCompiler.h \
src/lib/StdMarkup.cpp \
src/lib/StdMarkup.h \
src/lib/StdResStr2.cpp \
src/lib/StdResStr2.h \
src/lib/StdResStr.h \
src/lib/texture/C4Facet.cpp \
src/lib/texture/C4FacetEx.cpp \
src/lib/texture/C4FacetEx.h \
src/lib/texture/C4Facet.h \
src/lib/texture/C4Surface.cpp \
src/lib/texture/C4SurfaceFile.cpp \
src/lib/texture/C4SurfaceFile.h \
src/lib/texture/C4Surface.h \
src/lib/texture/StdPNG.cpp \
src/lib/texture/StdPNG.h
clonk_SOURCES = \
src/lib/C4Log.cpp \
src/lib/C4Log.h \
src/lib/C4NameList.cpp \
src/lib/C4NameList.h \
src/lib/texture/C4GraphicsResource.cpp \
src/lib/texture/C4GraphicsResource.h \
src/C4Application.cpp \
src/C4Application.h \
src/C4FullScreen.cpp \
src/C4FullScreen.h \
src/C4Game.cpp \
src/C4Game.h \
src/C4Globals.cpp \
src/C4GraphicsSystem.cpp \
src/C4GraphicsSystem.h \
src/c4group/C4LangStringTable.cpp \
src/c4group/C4LangStringTable.h \
src/c4group/C4Components.h \
src/c4group/C4ComponentHost.cpp \
src/c4group/C4ComponentHost.h \
src/c4group/C4Extra.cpp \
src/c4group/C4Extra.h \
src/c4group/C4Group.cpp \
src/c4group/C4Group.h \
src/c4group/C4GroupSet.cpp \
src/c4group/C4GroupSet.h \
src/c4group/C4Language.cpp \
src/c4group/C4Language.h \
src/c4group/C4Update.cpp \
src/c4group/C4Update.h \
src/c4group/CStdFile.cpp \
src/c4group/CStdFile.h \
src/C4Include.h \
src/C4Prototypes.h \
src/C4Version.h \
src/C4WinMain.cpp \
src/config/C4Config.cpp \
src/config/C4Config.h \
src/config/C4ConfigShareware.cpp \
src/config/C4ConfigShareware.h \
src/config/C4Constants.h \
src/config/C4SecurityCertificates.cpp \
src/config/C4SecurityCertificates.h \
src/control/C4Control.cpp \
src/control/C4Control.h \
src/control/C4GameControl.cpp \
src/control/C4GameControl.h \
src/control/C4GameParameters.cpp \
src/control/C4GameParameters.h \
src/control/C4GameSave.cpp \
src/control/C4GameSave.h \
src/control/C4PlayerControl.cpp \
src/control/C4PlayerControl.h \
src/control/C4PlayerInfoConflicts.cpp \
src/control/C4PlayerInfo.cpp \
src/control/C4PlayerInfo.h \
src/control/C4Record.cpp \
src/control/C4Record.h \
src/control/C4RoundResults.cpp \
src/control/C4RoundResults.h \
src/control/C4Teams.cpp \
src/control/C4Teams.h \
src/editor/C4Console.cpp \
src/editor/C4Console.h \
src/editor/C4DevmodeDlg.cpp \
src/editor/C4DevmodeDlg.h \
src/editor/C4EditCursor.cpp \
src/editor/C4EditCursor.h \
src/editor/C4ObjectListDlg.cpp \
src/editor/C4ObjectListDlg.h \
src/editor/C4PropertyDlg.cpp \
src/editor/C4PropertyDlg.h \
src/editor/C4ToolsDlg.cpp \
src/editor/C4ToolsDlg.h \
src/game/C4GameVersion.h \
src/game/C4Physics.h \
src/game/landscape/C4Landscape.cpp \
src/game/landscape/C4Landscape.h \
src/game/landscape/C4Map.cpp \
src/game/landscape/C4MapCreatorS2.cpp \
src/game/landscape/C4MapCreatorS2.h \
src/game/landscape/C4Map.h \
src/game/landscape/C4MassMover.cpp \
src/game/landscape/C4MassMover.h \
src/game/landscape/C4Material.cpp \
src/game/landscape/C4Material.h \
src/game/landscape/C4MaterialList.cpp \
src/game/landscape/C4MaterialList.h \
src/game/landscape/C4Particles.cpp \
src/game/landscape/C4Particles.h \
src/game/landscape/C4PathFinder.cpp \
src/game/landscape/C4PathFinder.h \
src/game/landscape/C4PXS.cpp \
src/game/landscape/C4PXS.h \
src/game/landscape/C4Region.cpp \
src/game/landscape/C4Region.h \
src/game/landscape/C4Scenario.cpp \
src/game/landscape/C4Scenario.h \
src/game/landscape/C4Sky.cpp \
src/game/landscape/C4Sky.h \
src/game/landscape/C4SolidMask.cpp \
src/game/landscape/C4SolidMask.h \
src/game/landscape/C4Texture.cpp \
src/game/landscape/C4Texture.h \
src/game/landscape/C4Weather.cpp \
src/game/landscape/C4Weather.h \
src/game/object/C4Action.cpp \
src/game/object/C4Command.cpp \
src/game/object/C4Command.h \
src/game/object/C4Def.cpp \
src/game/object/C4DefGraphics.cpp \
src/game/object/C4DefGraphics.h \
src/game/object/C4Def.h \
src/game/object/C4GameObjects.cpp \
src/game/object/C4GameObjects.h \
src/game/object/C4Id.cpp \
src/game/object/C4Id.h \
src/game/object/C4IDList.cpp \
src/game/object/C4IDList.h \
src/game/object/C4InfoCore.cpp \
src/game/object/C4InfoCore.h \
src/game/object/C4MeshAnimation.cpp \
src/game/object/C4MeshAnimation.h \
src/game/object/C4Movement.cpp \
src/game/object/C4ObjectCom.cpp \
src/game/object/C4ObjectCom.h \
src/game/object/C4Object.cpp \
src/game/object/C4Object.h \
src/game/object/C4ObjectInfo.cpp \
src/game/object/C4ObjectInfo.h \
src/game/object/C4ObjectInfoList.cpp \
src/game/object/C4ObjectInfoList.h \
src/game/object/C4ObjectList.cpp \
src/game/object/C4ObjectList.h \
src/game/object/C4ObjectMenu.cpp \
src/game/object/C4ObjectMenu.h \
src/game/object/C4ObjectPtr.cpp \
src/game/object/C4ObjectPtr.h \
src/game/object/C4Sector.cpp \
src/game/object/C4Sector.h \
src/game/object/C4Shape.cpp \
src/game/object/C4Shape.h \
src/game/player/C4Player.cpp \
src/game/player/C4Player.h \
src/game/player/C4PlayerList.cpp \
src/game/player/C4PlayerList.h \
src/game/player/C4RankSystem.cpp \
src/game/player/C4RankSystem.h \
src/game/script/C4Effect.cpp \
src/game/script/C4Effects.h \
src/game/script/C4FindObject.cpp \
src/game/script/C4FindObject.h \
src/game/script/C4Script.cpp \
src/game/script/C4Script.h \
src/game/script/C4TransferZone.cpp \
src/game/script/C4TransferZone.h \
src/gui/C4ChatDlg.cpp \
src/gui/C4ChatDlg.h \
src/gui/C4DownloadDlg.cpp \
src/gui/C4DownloadDlg.h \
src/gui/C4FileSelDlg.cpp \
src/gui/C4FileSelDlg.h \
src/gui/C4Folder.cpp \
src/gui/C4Folder.h \
src/gui/C4GameDialogs.cpp \
src/gui/C4GameDialogs.h \
src/gui/C4GameLobby.cpp \
src/gui/C4GameLobby.h \
src/gui/C4GameMessage.cpp \
src/gui/C4GameMessage.h \
src/gui/C4GameOptions.cpp \
src/gui/C4GameOptions.h \
src/gui/C4GameOverDlg.cpp \
src/gui/C4GameOverDlg.h \
src/gui/C4GuiButton.cpp \
src/gui/C4GuiCheckBox.cpp \
src/gui/C4GuiComboBox.cpp \
src/gui/C4GuiContainers.cpp \
src/gui/C4Gui.cpp \
src/gui/C4GuiDialogs.cpp \
src/gui/C4GuiEdit.cpp \
src/gui/C4Gui.h \
src/gui/C4GuiLabels.cpp \
src/gui/C4GuiListBox.cpp \
src/gui/C4GuiMenu.cpp \
src/gui/C4GuiTabular.cpp \
src/gui/C4KeyboardInput.cpp \
src/gui/C4KeyboardInput.h \
src/gui/C4LoaderScreen.cpp \
src/gui/C4LoaderScreen.h \
src/gui/C4MainMenu.cpp \
src/gui/C4MainMenu.h \
src/gui/C4Menu.cpp \
src/gui/C4Menu.h \
src/gui/C4MessageBoard.cpp \
src/gui/C4MessageBoard.h \
src/gui/C4MessageInput.cpp \
src/gui/C4MessageInput.h \
src/gui/C4MouseControl.cpp \
src/gui/C4MouseControl.h \
src/gui/C4PlayerInfoListBox.cpp \
src/gui/C4PlayerInfoListBox.h \
src/gui/C4Scoreboard.cpp \
src/gui/C4Scoreboard.h \
src/gui/C4StartupAboutDlg.cpp \
src/gui/C4StartupAboutDlg.h \
src/gui/C4Startup.cpp \
src/gui/C4Startup.h \
src/gui/C4StartupMainDlg.cpp \
src/gui/C4StartupMainDlg.h \
src/gui/C4StartupNetDlg.cpp \
src/gui/C4StartupNetDlg.h \
src/gui/C4StartupOptionsDlg.cpp \
src/gui/C4StartupOptionsDlg.h \
src/gui/C4StartupPlrSelDlg.cpp \
src/gui/C4StartupPlrSelDlg.h \
src/gui/C4StartupScenSelDlg.cpp \
src/gui/C4StartupScenSelDlg.h \
src/gui/C4UpdateDlg.cpp \
src/gui/C4UpdateDlg.h \
src/gui/C4UpperBoard.cpp \
src/gui/C4UpperBoard.h \
src/gui/C4UserMessages.h \
src/gui/C4Viewport.cpp \
src/gui/C4Viewport.h \
src/network/C4Client.cpp \
src/network/C4Client.h \
src/network/C4GameControlNetwork.cpp \
src/network/C4GameControlNetwork.h \
src/network/C4InteractiveThread.cpp \
src/network/C4InteractiveThread.h \
src/network/C4League.cpp \
src/network/C4League.h \
src/network/C4NetIO.cpp \
src/network/C4NetIO.h \
src/network/C4Network2Client.cpp \
src/network/C4Network2Client.h \
src/network/C4Network2.cpp \
src/network/C4Network2Dialogs.cpp \
src/network/C4Network2Dialogs.h \
src/network/C4Network2Discover.cpp \
src/network/C4Network2Discover.h \
src/network/C4Network2.h \
src/network/C4Network2IO.cpp \
src/network/C4Network2IO.h \
src/network/C4Network2IRC.cpp \
src/network/C4Network2IRC.h \
src/network/C4Network2Players.cpp \
src/network/C4Network2Players.h \
src/network/C4Network2Reference.cpp \
src/network/C4Network2Reference.h \
src/network/C4Network2Res.cpp \
src/network/C4Network2ResDlg.cpp \
src/network/C4Network2Res.h \
src/network/C4Network2Stats.cpp \
src/network/C4Network2Stats.h \
src/network/C4Packet2.cpp \
src/network/C4PacketBase.h \
src/platform/Bitmap256.cpp \
src/platform/Bitmap256.h \
src/platform/C4FileClasses.h \
src/platform/C4FileMonitor.cpp \
src/platform/C4FileMonitor.h \
src/platform/C4Fonts.cpp \
src/platform/C4Fonts.h \
src/platform/C4GamePadCon.cpp \
src/platform/C4GamePadCon.h \
src/platform/C4MusicFile.cpp \
src/platform/C4MusicFile.h \
src/platform/C4MusicSystem.cpp \
src/platform/C4MusicSystem.h \
src/platform/C4SoundSystem.cpp \
src/platform/C4SoundSystem.h \
src/platform/C4SoundLoaders.h \
src/platform/C4SoundLoaders.cpp \
src/platform/C4Video.cpp \
src/platform/C4Video.h \
src/platform/C4VideoPlayback.cpp \
src/platform/C4VideoPlayback.h \
src/platform/C4ViewportWindow.cpp \
src/platform/C4ViewportWindow.h \
src/platform/OpenURL.cpp \
src/platform/PlatformAbstraction.h \
src/platform/StdConfig.cpp \
src/platform/StdConfig.h \
src/platform/StdD3D.cpp \
src/platform/StdD3D.h \
src/platform/StdD3DShader.cpp \
src/platform/StdD3DShader.h \
src/platform/StdDDraw2.cpp \
src/platform/StdDDraw2.h \
src/platform/StdFacet.h \
src/platform/StdFile.cpp \
src/platform/StdFile.h \
src/platform/StdFont.cpp \
src/platform/StdFont.h \
src/platform/StdGL.cpp \
src/platform/StdGLCtx.cpp \
src/platform/StdGL.h \
src/platform/StdMesh.cpp \
src/platform/StdMesh.h \
src/platform/StdMeshLoader.h \
src/platform/StdMeshLoaderBinary.cpp \
src/platform/StdMeshLoaderBinaryChunks.cpp \
src/platform/StdMeshLoaderBinaryChunks.h \
src/platform/StdMeshLoaderDataStream.h \
src/platform/StdMeshLoaderXml.cpp \
src/platform/StdMeshMaterial.cpp \
src/platform/StdMeshMaterial.h \
src/platform/StdNoGfx.cpp \
src/platform/StdNoGfx.h \
src/platform/StdRegistry.cpp \
src/platform/StdRegistry.h \
src/platform/StdScheduler.cpp \
src/platform/StdScheduler.h \
src/platform/StdSurface2.cpp \
src/platform/StdSurface2.h \
src/platform/StdSurface8.cpp \
src/platform/StdSurface8.h \
src/platform/StdSync.h \
src/platform/StdTApp.cpp \
src/platform/StdVideo.cpp \
src/platform/StdVideo.h \
src/platform/StdWindow.h \
src/res/Brush.h \
src/res/Cursor.h \
src/res/Dynamic.h \
src/res/Exact.h \
src/res/Fill.h \
src/res/Halt.h \
src/res/Ift.h \
src/res/Line.h \
src/res/Mouse.h \
src/res/NoIft.h \
src/res/Picker.h \
src/res/Play.h \
src/res/Rect.h \
src/res/resource.h \
src/res/Static.h \
src/script/C4AList.cpp \
src/script/C4AList.h \
src/script/C4Aul.cpp \
src/script/C4AulDebug.cpp \
src/script/C4AulExec.cpp \
src/script/C4Aul.h \
src/script/C4AulLink.cpp \
src/script/C4AulParse.cpp \
src/script/C4PropList.cpp \
src/script/C4PropList.h \
src/script/C4ScriptHost.cpp \
src/script/C4ScriptHost.h \
src/script/C4StringTable.cpp \
src/script/C4StringTable.h \
src/script/C4Value.cpp \
src/script/C4Value.h \
src/script/C4ValueList.cpp \
src/script/C4ValueList.h \
src/script/C4ValueMap.cpp \
src/script/C4ValueMap.h \
src/tinyxml/tinystr.cpp \
src/tinyxml/tinystr.h \
src/tinyxml/tinyxml.cpp \
src/tinyxml/tinyxml.h \
src/tinyxml/tinyxmlerror.cpp \
src/tinyxml/tinyxmlparser.cpp \
src/zlib/gzio.c \
src/zlib/zutil.h \
src/script/C4AulDebug.h \
src/script/C4AulExec.h \
src/C4Version.h.in
##hgrevision.h
if WIN32
clonk_SOURCES += src/platform/C4FileClasses.cpp
clonk_SOURCES += src/res/engine.rc src/res/resource.h
clonk_SOURCES += src/platform/StdJoystick.cpp src/platform/StdJoystick.h
endif
if MACOSX
clonk_SOURCES += src/platform/MacUtility.h src/platform/MacUtility.mm src/platform/StdMacApp.mm
endif
if SDL_MAIN_LOOP
clonk_SOURCES += src/platform/StdSDLApp.cpp src/platform/StdSDLWindow.cpp
else
if WIN32
clonk_SOURCES += src/platform/StdWindow.cpp
else
clonk_SOURCES += src/platform/StdXApp.cpp src/platform/StdXWindow.cpp src/platform/StdXPrivate.h
endif
endif
if DEVELOPER_MODE
clonk_SOURCES += src/platform/StdGtkWindow.cpp src/platform/StdGtkWindow.h
endif
clonk_LDADD = \
lib.a \
$(LIBICONV) \
$(GTK_LIBS) \
$(OPENAL_LIBS) \
$(FREETYPE_LIBS) \
$(SDL_LIBS) \
$(PTHREAD_LIBS) \
$(Z_LIBS) \
$(CLONK_LIBS) \
$(OPENSSL_LIBS)
# build the resources
.rc.o:
$(WINDRES) -I $(srcdir)/src/res -I $(builddir) -i $< -o $@
c4group_CPPFLAGS = \
-I$(builddir) \
-I$(srcdir)/src \
-I$(srcdir)/src/c4group \
-I$(srcdir)/src/network \
-I$(srcdir)/src/lib \
-I$(srcdir)/src/platform \
-I$(srcdir)/src/config \
-I$(srcdir)/src/res \
-I$(srcdir)/src/control \
-I$(srcdir)/src/gui \
-I$(srcdir)/src/editor \
-I$(srcdir)/src/game/landscape \
-I$(srcdir)/src/game/player \
-I$(srcdir)/src/game/script \
-I$(srcdir)/src/game \
-I$(srcdir)/src/game/object \
-I$(srcdir)/src/lib/texture \
-I$(srcdir)/src/script
c4group_SOURCES = \
src/c4group/c4group_ng.cpp \
src/c4group/C4Group.cpp \
src/lib/C4InputValidation.cpp \
src/config/C4SecurityCertificates.cpp \
src/c4group/C4Update.cpp \
src/lib/Standard.cpp \
src/c4group/CStdFile.cpp \
src/lib/StdMarkup.cpp \
src/lib/StdBuf.cpp \
src/lib/StdCompiler.cpp \
src/platform/StdFile.cpp \
src/platform/StdRegistry.cpp \
src/lib/StdResStr2.cpp \
src/platform/StdConfig.cpp \
src/zlib/gzio.c
if WIN32
c4group_SOURCES += src/c4group/Resource.rc
endif
c4group_LDADD = \
$(LIBICONV) \
$(Z_LIBS) \
$(OPENSSL_LIBS) \
$(PTHREAD_LIBS)
## gunzip4c4group
gunzip4c4group_SOURCES = \
src/c4group/gunzip4c4group.cpp \
src/c4group/C4Group.cpp \
src/lib/C4InputValidation.cpp \
src/config/C4SecurityCertificates.cpp \
src/c4group/C4Update.cpp \
src/lib/Standard.cpp \
src/c4group/CStdFile.cpp \
src/lib/StdMarkup.cpp \
src/lib/StdBuf.cpp \
src/lib/StdCompiler.cpp \
src/platform/StdFile.cpp \
src/platform/StdRegistry.cpp \
src/lib/StdResStr2.cpp \
src/platform/StdConfig.cpp \
src/zlib/gzio.c
gunzip4c4group_LDADD = \
$(PTHREAD_LIBS)
## puncher
puncher_SOURCES = \
src/netpuncher/main.cpp \
src/network/C4NetIO.cpp
puncher_LDADD = \
$(PTHREAD_LIBS)
if WIN32
puncher_LDADD += -lwinmm -lws2_32
endif
## tstc4netio
tstc4netio_SOURCES = \
src/netio/TstC4NetIO.cpp \
src/network/C4NetIO.cpp
tstc4netio_LDADD = \
$(PTHREAD_LIBS) -lz
if WIN32
tstc4netio_LDADD += -lwinmm -lws2_32
endif
## other stuff
EXTRA_DIST = \
planet/System.c4g/LanguageUS.txt \
planet/System.c4g/LanguageDE.txt \
clonk.anjuta \
licenses \
xcode \
src/netio/NetIO.dsp \
src/netpuncher/Puncher.dsp \
src/res/Brush_Trans.png \
src/res/Cursor_Trans.png \
src/res/cz.ico \
src/res/Dynamic_Trans.png \
src/res/Exact_Trans.png \
src/res/Fill_Trans.png \
src/res/Halt_Trans.png \
src/res/Ift_Trans.png \
src/res/Line_Trans.png \
src/res/Mouse_Trans.png \
src/res/NoIft_Trans.png \
src/res/Picker_Trans.png \
src/res/Play_Trans.png \
src/res/Rect_Trans.png \
src/res/Static_Trans.png \
src/c4group/c4group_cmdl.cpp \
src/c4group/resource.h \
src/c4group/Resource.rc \
src/res/brush1.bmp \
src/res/c4g.ico \
src/res/c4s.ico \
src/res/Cursor2.bmp \
src/res/Game.pal \
src/res/line1.bmp \
src/res/Play2.bmp \
src/res/Brush2.bmp \
src/res/c4i.ico \
src/res/c4u.ico \
src/res/Cursor.bmp \
src/res/Grab.bmp \
src/res/Line.bmp \
src/res/Play.bmp \
src/res/Brush.bmp \
src/res/c4k.ico \
src/res/c4v.ico \
src/res/dynamic1.bmp \
src/res/Halt2.bmp \
src/res/mouse1.bmp \
src/res/rect1.bmp \
src/res/c4b.ico \
src/res/c4l.ico \
src/res/c4x.ico \
src/res/Halt.bmp \
src/res/mouse.bmp \
src/res/Rectangle.bmp \
src/res/c4d.ico \
src/res/c4m.ico \
src/res/c4x.xpm \
src/res/fill1.bmp \
src/res/ift1.bmp \
src/res/NoIFT.bmp \
src/res/c4f.ico \
src/res/c4p.ico \
src/res/Fill.bmp \
src/res/IFT.bmp \
src/res/picker1.bmp \
src/res/static1.bmp

47
README
View File

@ -1,47 +0,0 @@
Requirements
============
You should be able to build OpenClonk with any C++ compiler that supports
ISO C++14. That said, on Windows, we recommend using Microsoft Visual C++
2015 or higher; the Express edition will be sufficient. On Linux, you will
be fine with GNU g++ 4.9 or later. Apple users should use a clang-based
XCode version.
To generate project files for your chosen build system, you will also have to
install CMake from http://www.cmake.org/.
Additionally, OpenClonk depends on a number of third-party libraries:
- zlib (http://zlib.net/)
- libpng (http://www.libpng.org/pub/png/libpng.html)
- libjpeg-turbo (http://sourceforge.net/projects/libjpeg-turbo/files/)
- FreeType (http://www.freetype.org/)
- The OpenGL Extension Wrangler Library (http://glew.sourceforge.net/)
- FreeALUT (https://github.com/vancegroup/freealut)
- libogg and libvorbis (https://www.xiph.org/downloads/)
- Qt >= 5.7 (https://www.qt.io/download-open-source/)
OS X Specific
=============
OpenClonk supports OS X versions 10.8 "Mountain Lion" and later.
If you are using brew (https://github.com/mxcl/homebrew) or MacPorts
(http://www.macports.org/), the packages you'll have to install are:
libjpeg, libpng, freetype, glew, libogg, libvorbis
Linux Specific
==============
For building OpenClonk on Linux, you need the following libraries in addition
to the ones listed above:
- SDL 2.0 (https://www.libsdl.org/download-2.0.php)
- libGL (http://www.mesa3d.org/)
- OpenAL Soft >= 1.13 (https://github.com/kcat/openal-soft)
- miniupnpc (http://miniupnp.free.fr/)
- libxrandr
Most distributions should provide these dependencies via their packaging
system. At least gcc-4.9 is required.
Windows Specific
================
In addition to the libraries above, you will need one more if you want to
target Windows:
- OpenAL Soft (http://kcat.strangesoft.net/openal.html)
To create an installer, you will also need the Nullsoft Install System
(http://nsis.sourceforge.net/). To create the installer, build the "setup" target.

67
README.linux.txt 100755
View File

@ -0,0 +1,67 @@
Requirements
============
To build on DEB-based Linux distributions (Debian, Ubuntu etc.) you need the
following packages:
make gcc g++
cmake OR automake autoconf
libc6-dev libx11-dev libxxf86vm-dev libxrandr-dev libxpm-dev libglew1.5-dev
libgl1-mesa-dev libpng12-dev libssl-dev libsdl1.2-dev libsdl-mixer1.2-dev
libgtk2.0-dev libjpeg62-dev zlib1g-dev libboost-dev
To build on RPM-based Linux distributions (Red Hat, Fedora, Mandariva,
SuSE etc.) you need the following packages:
make gcc gcc-c++
cmake OR automake autoconf
libX11-devel libXxf86vm-devel libXrandr-devel libXpm-devel glew-devel
mesa-libGL-devel libpng-devel openssl-devel SDL-devel SDL_mixer1.2-dev
gtk2-devel libjpeg-devel zlib-devel boost-devel
Build using cmake
=====================
To build OpenClonk, execute the following command inside of the source tree:
cmake . && make
By default, the binary will be built without debugging support. If you want
to generate a debug build, pass the parameter -DCMAKE_BUILD_TYPE=Debug to
your cmake invocation.
Please note that you do not need to build a Debug binary if you only want to
debug C4Script code.
You can see other build variables with:
cmake . -N -L
Build using autotools
=====================
If you build from version control, you need to run this:
autoreconf -i && ./configure && make
To build from tarball, run this:
./configure && make
If you want a debug build, pass --enable-debug to configure, for the developer
mode --with-gtk. Other options are listed by ./configure --help.
On subsequent build runs, you only have to execute make.
Running
=======
You need to move the compiled binary to the data folder before running. I
recommend using a symbolic link like this:
cd planet/
ln -s ../clonk
./clonk

19
README.mac.txt 100644
View File

@ -0,0 +1,19 @@
Requirements
============
OSX 10.4 or higher
an Intel mac
xcode
Build
=====
Launch xcode and load the project. Select the desired configuration and build.
It should be pretty straight forward, hopefully.
NoNetwork
=========
If you are using the public source package, will be able to build
the "NoNetwork" configurations only.

76
README.windows.txt 100644
View File

@ -0,0 +1,76 @@
Requirements
============
You can build on Windows using either:
* vc9 (Microsoft Visual C++ 2008)
you need CMake (http://www.cmake.org/cmake/resources/software.html) to create the "solution"
you might have to set the correct DXSDK include and library directories
* MinGW and MSYS
plus DXSDK 9 (if you want DirectX support)
* Some other compilers and IDEs which are supported by CMake might also work
Building OpenClonk requires the Boost C++ Libraries (from http://www.boost.org/). It uses the
header-only parts of the library, so you don't have to build any of the binary libraries.
Notes for MinGW
===============
You need gcc, g++, mingw-runtime, w32api, msys, msyscore, autoconf, automake,
and any packages needed by these. The versions listed below are known to work,
though newer versions are probably also good.
http://sourceforge.net/project/downloading.php?group_id=200665&filename=tdm-mingw-1.905.0-webdl.exe&a=64029035
(from http://sourceforge.net/project/showfiles.php?group_id=200665&package_id=238465)
(see also http://www.tdragon.net/recentgcc/)
- The default options work. Use an installation path without spaces to be on
the save side.
http://sourceforge.net/project/downloading.php?group_id=2435&filename=MSYS-1.0.11-20090120-dll.tar.gz&a=78351117
http://sourceforge.net/project/downloading.php?group_id=2435&filename=msysCORE-1.0.11-20080826.tar.gz&a=60784616
(from http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=24963)
- extract these into the same directory as installed above, merging the
directory contents
- create a shortcut to msys.bat
http://sourceforge.net/project/downloading.php?group_id=2435&filename=perl-5.6.1-MSYS-1.0.11-1.tar.bz2&a=91743036
http://sourceforge.net/project/downloading.php?group_id=2435&filename=crypt-1.1-1-MSYS-1.0.11-1.tar.bz2&a=95002722
http://sourceforge.net/project/downloading.php?group_id=2435&filename=autoconf2.5-2.61-1-bin.tar.bz2&a=93276645
http://sourceforge.net/project/downloading.php?group_id=2435&filename=automake1.10-1.10-1-bin.tar.bz2&a=66135072
http://sourceforge.net/project/downloading.php?group_id=2435&filename=autoconf-4-1-bin.tar.bz2&a=70428585
http://sourceforge.net/project/downloading.php?group_id=2435&filename=automake-3-1-bin.tar.bz2&a=12881354
(from http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=67879)
- you need to extract these from the msys shell with tar (other methods won't
work). This assumes that the archives are in C:\Path\To\Downloads\, adjust
the command as necessary:
cd /
for f in /c/Path/To/Downloads/*.bz2; do tar -xjf $f; done && echo done
Get the library package from openclonk.org and unpack it into the same
directory as the other archives.
If you want DirectX support, get a DirectX 9 SDK from Microsoft. Copy the
contents of its include dir to the include dir of your MinGW installation,
and pass --with-directx to configure below.
Start msys (your MinGW directory, e.g. C:\MinGW -> msys.bat),
cd to this directory, and execute:
./autogen.sh && ./configure && make
To compile a debugbuild, pass --enable-debug to configure. Other options are
listed by ./configure --help.
On subsequent build runs, you only have to execute make.
If you want to separate the source directory and the output files, you can call
configure from another directory. You can call configure by it's relative path,
but using the full path helps gdb find the source files. Example:
mkdir build
cd build
/path/to/clonksource/configure --with-directx CXXFLAGS='-Os'
make

View File

@ -1,16 +0,0 @@
'Clonk' is a registered trademark of Matthes Bender. It may be used within
software products which are using source code or game content as made public
on the Clonk website (or derived from such) with the following limitations:
If the word 'Clonk' is used as the name of anything in your software product
then you must include the following notice in a suitable place (e.g. credits
screen): 'Clonk' is a registered trademark of Matthes Bender.
If the title of your software product contains the word 'Clonk' then you must
PREFIX the word with an added name of your choosing, e.g. 'MyClonk' or
'PortableClonk' and you must include the trademark notice above in a suitable
place (e.g. credits screen or splash screen).
If you are making your source code or game content available to other parties
in a way which allows adaptation you must include a copy of this license along
with any other applicable licenses.

View File

@ -1,15 +1,3 @@
# OpenClonk, http://www.openclonk.org
#
# Copyright (c) 2009-2018, The OpenClonk Team and contributors
#
# Distributed under the terms of the ISC license; see accompanying file
# "COPYING" for details.
#
# "Clonk" is a registered trademark of Matthes Bender, used with permission.
# See accompanying file "TRADEMARK" for details.
#
# To redistribute this file separately, substitute the full license texts
# for the above references.
############################################################################
# Project version information
@ -18,13 +6,63 @@
SET(C4PROJECT "OpenClonk Project")
SET(C4PROJECT_DOMAIN "openclonk")
SET(C4PROJECT_TLD "org")
SET(C4PROJECT_URL "http://${C4PROJECT_DOMAIN}.${C4PROJECT_TLD}")
SET(C4PROJECT_URL "http://www.{C4PROJECT_DOMAIN}.{C4PROJECT_TLD}")
SET(C4COPYRIGHT_YEAR 2010) # Gimme CMAKE_CURRENT_YEAR already...
SET(C4ENGINENAME "OpenClonk")
SET(C4ENGINENICK "openclonk")
SET(C4ENGINECAPTION ${C4ENGINENAME})
SET(C4ENGINEID "${C4PROJECT_TLD}.${C4PROJECT_DOMAIN}.${C4ENGINENICK}")
SET(C4XVER1 9)
SET(C4XVER2 0)
SET(C4XVER1 5)
SET(C4XVER2 1)
SET(C4XVER3 2)
SET(C4XVER4 4)
SET(C4VERSIONBUILDNAME "Back to the Rocks")
SET(C4VERSIONEXTRA "")
############################################################################
# Get revision from Mercurial
############################################################################
# Note: This will not work for source distributions!
execute_process(WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND "hg" "id" "--id"
OUTPUT_VARIABLE C4REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE)
############################################################################
# Build version strings
############################################################################
set(C4ENGINEINFO "${C4ENGINENAME}")
set(C4SHORTVERSION "${C4XVER1}.${C4XVER2}.${C4XVER3}.${C4XVER4}")
set(C4VERSION "${C4SHORTVERSION}")
if(C4XVERBUILD LESS 10)
set(C4VERSION "${C4VERSION} [00${C4XVERBUILD}]")
elseif(C4XVERBUILD LESS 100)
set(C4VERSION "${C4VERSION} [0${C4XVERBUILD}]")
else()
set(C4VERSION "${C4VERSION} [${C4XVERBUILD}]")
endif()
if(NOT ${C4VERSIONEXTRA} STREQUAL "")
set(C4ENGINEINFO "${C4ENGINENAME} ${C4VERSIONEXTRA}")
set(C4VERSION "${C4VERSION} ${C4VERSIONEXTRA}")
endif()
if(WIN32)
set(C4VERSION "${C4VERSION} win")
elseif(APPLE)
set(C4VERSION "${C4VERSION} mac")
elseif(UNIX)
set(C4VERSION "${C4VERSION} unix")
else()
set(C4VERSION "${C4VERSION} strange")
endif()
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/src/C4Version.h.in ${CMAKE_CURRENT_BINARY_DIR}/C4Version.h ESCAPE_QUOTES)
# Set this variable to any string for pre-release versions, like "alpha" or
# "rc1". Don't supply a value (FALSE) for release versions.
SET(C4VERSIONEXTRA "alpha")

View File

@ -1,32 +0,0 @@
version: "{build}"
pull_requests:
do_not_increment_build_number: true
shallow_clone: true
cache: ..\openclonk-cache
image: Visual Studio 2017
configuration: RelWithDebInfo
platform:
- x64
install:
- ps: "& $env:APPVEYOR_BUILD_FOLDER\\tools\\ci\\appv-Install.ps1"
before_build:
- ps: "& $env:APPVEYOR_BUILD_FOLDER\\tools\\ci\\appv-BeforeBuild.ps1"
build:
project: ../openclonk-build/openclonk.sln
parallel: true
verbosity: minimal
# The after_build and test_script scripts need to be called in a real
# powershell instance because they call into the MSBuild API, which has issues
# finding its data files when called from AppVeyor's powershell host, because
# it attempts to read the application config instead of the registry to find
# them (starting with MSBuild 15, which ships with Visual Studio 2017).
after_build:
- cmd: powershell -NoLogo -NoProfile -ExecutionPolicy Unrestricted -Command "& $env:APPVEYOR_BUILD_FOLDER\\tools\\ci\\appv-AfterBuild.ps1"
test_script:
- cmd: powershell -NoLogo -NoProfile -ExecutionPolicy Unrestricted -Command "& $env:APPVEYOR_BUILD_FOLDER\\tools\\ci\\appv-Test.ps1"
deploy: off

6
autogen.sh 100644
View File

@ -0,0 +1,6 @@
#!/bin/sh
aclocal -I autotools --install
autoheader
autoconf
automake -a

View File

@ -0,0 +1,252 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_boost_base.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_BOOST_BASE([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
#
# DESCRIPTION
#
# Test for the Boost C++ libraries of a particular version (or newer)
#
# If no path to the installed boost library is given the macro searchs
# under /usr, /usr/local, /opt and /opt/local and evaluates the
# $BOOST_ROOT environment variable. Further documentation is available at
# <http://randspringer.de/boost/index.html>.
#
# This macro calls:
#
# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS)
#
# And sets:
#
# HAVE_BOOST
#
# LICENSE
#
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
# Copyright (c) 2009 Peter Adolphs
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 17
AC_DEFUN([AX_BOOST_BASE],
[
AC_ARG_WITH([boost],
[AS_HELP_STRING([--with-boost@<:@=ARG@:>@],
[use Boost library from a standard location (ARG=yes),
from the specified location (ARG=<path>),
or disable it (ARG=no)
@<:@ARG=yes@:>@ ])],
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ac_boost_path=""
else
want_boost="yes"
ac_boost_path="$withval"
fi
],
[want_boost="yes"])
AC_ARG_WITH([boost-libdir],
AS_HELP_STRING([--with-boost-libdir=LIB_DIR],
[Force given directory for boost libraries. Note that this will overwrite library path detection, so use this parameter only if default library detection fails and you know exactly where your boost libraries are located.]),
[
if test -d "$withval"
then
ac_boost_lib_path="$withval"
else
AC_MSG_ERROR(--with-boost-libdir expected directory name)
fi
],
[ac_boost_lib_path=""]
)
if test "x$want_boost" = "xyes"; then
boost_lib_version_req=ifelse([$1], ,1.20.0,$1)
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'`
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'`
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'`
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'`
if test "x$boost_lib_version_req_sub_minor" = "x" ; then
boost_lib_version_req_sub_minor="0"
fi
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor`
AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req)
succeeded=no
dnl On x86_64 systems check for system libraries in both lib64 and lib.
dnl The former is specified by FHS, but e.g. Debian does not adhere to
dnl this (as it rises problems for generic multi-arch support).
dnl The last entry in the list is chosen by default when no libraries
dnl are found, e.g. when only header-only libraries are installed!
libsubdirs="lib"
if test `uname -m` = x86_64; then
libsubdirs="lib64 lib lib64"
fi
dnl first we check the system location for boost libraries
dnl this location ist chosen if boost libraries are installed with the --layout=system option
dnl or if you install boost with RPM
if test "$ac_boost_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_path/$libsubdir"
BOOST_CPPFLAGS="-I$ac_boost_path/include"
elif test "$cross_compiling" != yes; then
for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then
for libsubdir in $libsubdirs ; do
if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
done
BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir"
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include"
break;
fi
done
fi
dnl overwrite ld flags if we have required special directory with
dnl --with-boost-libdir parameter
if test "$ac_boost_lib_path" != ""; then
BOOST_LDFLAGS="-L$ac_boost_lib_path"
fi
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_REQUIRE([AC_PROG_CXX])
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
dnl if we found no boost with system layout we search for boost libraries
dnl built and installed without the --layout=system option or for a staged(not installed) version
if test "x$succeeded" != "xyes"; then
_version=0
if test "$ac_boost_path" != ""; then
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
fi
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE"
done
fi
else
if test "$cross_compiling" != yes; then
for ac_boost_path in /usr /usr/local /opt /opt/local ; do
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'`
V_CHECK=`expr $_version_tmp \> $_version`
if test "$V_CHECK" = "1" ; then
_version=$_version_tmp
best_path=$ac_boost_path
fi
done
fi
done
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'`
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE"
if test "$ac_boost_lib_path" = ""; then
for libsubdir in $libsubdirs ; do
if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
done
BOOST_LDFLAGS="-L$best_path/$libsubdir"
fi
fi
if test "x$BOOST_ROOT" != "x"; then
for libsubdir in $libsubdirs ; do
if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi
done
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then
version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'`
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'`
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'`
V_CHECK=`expr $stage_version_shorten \>\= $_version`
if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT)
BOOST_CPPFLAGS="-I$BOOST_ROOT"
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir"
fi
fi
fi
fi
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
export CPPFLAGS
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
export LDFLAGS
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@%:@include <boost/version.hpp>
]], [[
#if BOOST_VERSION >= $WANT_BOOST_VERSION
// Everything is okay
#else
# error Boost version is too old
#endif
]])],[
AC_MSG_RESULT(yes)
succeeded=yes
found_system=yes
],[
])
AC_LANG_POP([C++])
fi
if test "$succeeded" != "yes" ; then
if test "$_version" = "0" ; then
AC_MSG_NOTICE([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.]])
else
AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).])
fi
# execute ACTION-IF-NOT-FOUND (if present):
ifelse([$3], , :, [$3])
else
AC_SUBST(BOOST_CPPFLAGS)
AC_SUBST(BOOST_LDFLAGS)
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available])
# execute ACTION-IF-FOUND (if present):
ifelse([$2], , :, [$2])
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])

View File

@ -0,0 +1,74 @@
# ===========================================================================
# http://autoconf-archive.cryp.to/ax_check_compiler_flags.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_COMPILER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE])
#
# DESCRIPTION
#
# Check whether the given compiler FLAGS work with the current language's
# compiler, or whether they give an error. (Warnings, however, are
# ignored.)
#
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
# success/failure.
#
# LICENSE
#
# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
# Copyright (c) 2009 Matteo Frigo
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
AC_DEFUN([AX_CHECK_COMPILER_FLAGS],
[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1])
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
AS_LITERAL_IF([$1],
[AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1]), [
ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$1"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=yes,
AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=no)
_AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])],
[ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$1"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=yes,
eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=no)
_AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])
eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])
AC_MSG_RESULT($ax_check_compiler_flags)
if test "x$ax_check_compiler_flags" = xyes; then
m4_default([$2], :)
else
m4_default([$3], :)
fi
])dnl AX_CHECK_COMPILER_FLAGS

View File

@ -0,0 +1,75 @@
dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
dnl Modified for Clonk to not do all that weird stuff
AC_DEFUN([_AX_ICONV_LINK],
[
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
dnl those with the standalone portable GNU libiconv installed).
dnl Search for libiconv and define LIBICONV and INCICONV
dnl accordingly.
AC_CACHE_CHECK(for iconv, ax_cv_func_iconv, [
ax_cv_func_iconv="no, consider installing GNU libiconv"
ax_cv_lib_iconv=no
LIBICONV=""
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
ax_cv_func_iconv=yes)
if test "$ax_cv_func_iconv" != yes; then
ax_save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
ax_cv_lib_iconv=yes
ax_cv_func_iconv=yes
LIBICONV=-liconv)
LIBS="$ax_save_LIBS"
fi
])
if test "$ax_cv_func_iconv" = yes; then
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
fi
if test "$ax_cv_lib_iconv" = yes; then
AC_MSG_CHECKING([how to link with libiconv])
AC_MSG_RESULT([-liconv])
fi
AC_SUBST(LIBICONV)
])
AC_DEFUN([AX_ICONV],
[
_AX_ICONV_LINK
if test "$ax_cv_func_iconv" = yes; then
AC_MSG_CHECKING([for iconv declaration])
AC_CACHE_VAL(ax_cv_proto_iconv, [
AC_TRY_COMPILE([
#include <stdlib.h>
#include <iconv.h>
extern
#ifdef __cplusplus
"C"
#endif
#if defined(__STDC__) || defined(__cplusplus)
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
#else
size_t iconv();
#endif
], [], ax_cv_proto_iconv_arg1="", ax_cv_proto_iconv_arg1="const")])
AC_MSG_RESULT([extern size_t iconv (iconv_t cd, $ax_cv_proto_iconv_arg1 char * * inbuf, size_t * inbytesleft, char * * outbuf, size_t * outbytesleft);])
AC_DEFINE_UNQUOTED(ICONV_CONST, $ax_cv_proto_iconv_arg1,
[Define as const if the declaration of iconv() needs const.])
fi
])

View File

@ -0,0 +1,272 @@
# ===========================================================================
# http://www.nongnu.org/autoconf-archive/ax_pthread.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
#
# DESCRIPTION
#
# This macro figures out how to build C programs using POSIX threads. It
# sets the PTHREAD_LIBS output variable to the threads library and linker
# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
# flags that are needed. (The user can also force certain compiler
# flags/libs to be tested by setting these environment variables.)
#
# Also sets PTHREAD_CC to any special C compiler that is needed for
# multi-threaded programs (defaults to the value of CC otherwise). (This
# is necessary on AIX to use the special cc_r compiler alias.)
#
# NOTE: You are assumed to not only compile your program with these flags,
# but also link it with them as well. e.g. you should link with
# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
#
# If you are only building threads programs, you may wish to use these
# variables in your default LIBS, CFLAGS, and CC:
#
# LIBS="$PTHREAD_LIBS $LIBS"
# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# CC="$PTHREAD_CC"
#
# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
# (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
#
# ACTION-IF-FOUND is a list of shell commands to run if a threads library
# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
# is not found. If ACTION-IF-FOUND is not specified, the default action
# will define HAVE_PTHREAD.
#
# Please let the authors know if this macro fails on any platform, or if
# you have any other suggestions or comments. This macro was based on work
# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
# Alejandro Forero Cuervo to the autoconf macro repository. We are also
# grateful for the helpful feedback of numerous users.
#
# LICENSE
#
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
AC_DEFUN([AX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_LANG_SAVE
AC_LANG_C
ax_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h
# requires special compiler flags (e.g. on True64 or Sequent).
# It gets checked for in the link test anyway.
# First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using
# them:
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes)
AC_MSG_RESULT($ax_pthread_ok)
if test x"$ax_pthread_ok" = xno; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
fi
# We must check for the threads library under a number of different
# names; the ordering is very important because some systems
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX).
# Create a list of thread flags to try. Items starting with a "-" are
# C compiler flags, and other items are library names, except for "none"
# which indicates that we try without any flags at all, and "pthread-config"
# which is a program returning the flags for the Pth emulation library.
ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
# pthreads: AIX (must check this before -lpthread)
# none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
# -pthreads: Solaris/gcc
# -mthreads: Mingw32/gcc, Lynx/gcc
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads too;
# also defines -D_REENTRANT)
# ... -mt is also the pthreads flag for HP/aCC
# pthread: Linux, etcetera
# --thread-safe: KAI C++
# pthread-config: use pthread-config program (for GNU Pth library)
case "${host_cpu}-${host_os}" in
*solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
# tests will erroneously succeed. (We need to link with -pthreads/-mt/
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
# a function called by this macro, so we could check for that, but
# who knows whether they'll stub that too in a future libc.) So,
# we'll just look for -pthreads and -lpthread first:
ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
;;
esac
if test x"$ax_pthread_ok" = xno; then
for flag in $ax_pthread_flags; do
case $flag in
none)
AC_MSG_CHECKING([whether pthreads work without any flags])
;;
-*)
AC_MSG_CHECKING([whether pthreads work with $flag])
PTHREAD_CFLAGS="$flag"
;;
pthread-config)
AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no)
if test x"$ax_pthread_config" = xno; then continue; fi
PTHREAD_CFLAGS="`pthread-config --cflags`"
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
;;
*)
AC_MSG_CHECKING([for the pthreads library -l$flag])
PTHREAD_LIBS="-l$flag"
;;
esac
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Check for various functions. We must include pthread.h,
# since some functions may be macros. (On the Sequent, we
# need a special flag -Kthread to make this header compile.)
# We check for pthread_join because it is in -lpthread on IRIX
# while pthread_create is in libc. We check for pthread_attr_init
# due to DEC craziness with -lpthreads. We check for
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
AC_TRY_LINK([#include <pthread.h>],
[pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[ax_pthread_ok=yes])
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
AC_MSG_RESULT($ax_pthread_ok)
if test "x$ax_pthread_ok" = xyes; then
break;
fi
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi
# Various other checks:
if test "x$ax_pthread_ok" = xyes; then
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
AC_MSG_CHECKING([for joinable pthread attribute])
attr_name=unknown
for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
[attr_name=$attr; break])
done
AC_MSG_RESULT($attr_name)
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
[Define to necessary symbol if this constant
uses a non-standard name on your system.])
fi
AC_MSG_CHECKING([if more special flags are required for pthreads])
flag=no
case "${host_cpu}-${host_os}" in
*-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
*solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
esac
AC_MSG_RESULT(${flag})
if test "x$flag" != xno; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# More AIX lossage: must compile with xlc_r or cc_r
if test x"$GCC" != xyes; then
AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
else
PTHREAD_CC=$CC
fi
else
PTHREAD_CC="$CC"
fi
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_CC)
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$ax_pthread_ok" = xyes; then
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
:
else
ax_pthread_ok=no
$2
fi
AC_LANG_RESTORE
])dnl AX_PTHREAD

157
autotools/pkg.m4 100644
View File

@ -0,0 +1,157 @@
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 1 (pkg-config-0.24)
#
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])# PKG_PROG_PKG_CONFIG
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
#
# Check to see whether a particular set of modules exists. Similar
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
#
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
# only at the first occurence in configure.ac, so if the first place
# it's called might be skipped (such as if it is within an "if", you
# have to call PKG_CHECK_EXISTS manually
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_default([$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
# ---------------------------------------------
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
[pkg_failed=yes])
else
pkg_failed=untried
fi[]dnl
])# _PKG_CONFIG
# _PKG_SHORT_ERRORS_SUPPORTED
# -----------------------------
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi[]dnl
])# _PKG_SHORT_ERRORS_SUPPORTED
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
#
#
# Note that if there is a possibility the first call to
# PKG_CHECK_MODULES might not happen, you should be sure to include an
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
#
#
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $1])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT])dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
$3
fi[]dnl
])# PKG_CHECK_MODULES

View File

@ -0,0 +1,23 @@
dnl Copyright (C) 2009 Günther Brammer
AC_DEFUN([AX_PROG_CXX_REFTOTEMP],
[
AC_LANG_ASSERT([C++])
AC_CACHE_CHECK([wether the C++ compiler is friendly], [ax_cv_reftotemp], [
AC_COMPILE_IFELSE([
struct Foo {
operator Foo & () { return *this; }
};
#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
void frobnicate(Foo &&) { }
#else
void frobnicate(Foo &) { }
#endif
int main () {
frobnicate (Foo());
}
], [ax_cv_reftotemp=yes], [ax_cv_reftotemp=no])])
if test $ax_cv_reftotemp = no; then
AC_MSG_ERROR([The C++ compiler won't be able to compile Clonk. Try CXX='g++ -std=gnu++0x' or CXX='g++-4.1'.])
fi[]dnl
])# AX_PROG_CXX_REFTOTEMP

181
autotools/sdl.m4 100644
View File

@ -0,0 +1,181 @@
# Configure paths for SDL
# Sam Lantinga 9/21/99
# stolen from Manish Singh
# stolen back from Frank Belew
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor
dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
dnl
AC_DEFUN([AM_PATH_SDL],
[dnl
dnl Get the cflags and libraries from the sdl-config script
dnl
AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
sdl_prefix="$withval", sdl_prefix="")
AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
sdl_exec_prefix="$withval", sdl_exec_prefix="")
AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
, enable_sdltest=yes)
if test x$sdl_exec_prefix != x ; then
sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
if test x${SDL_CONFIG+set} != xset ; then
SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
fi
fi
if test x$sdl_prefix != x ; then
sdl_args="$sdl_args --prefix=$sdl_prefix"
if test x${SDL_CONFIG+set} != xset ; then
SDL_CONFIG=$sdl_prefix/bin/sdl-config
fi
fi
if test "x$prefix" != xNONE; then
PATH="$prefix/bin:$prefix/usr/bin:$PATH"
fi
AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
min_sdl_version=ifelse([$1], ,0.11.0,$1)
AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
no_sdl=""
if test "$SDL_CONFIG" = "no" ; then
no_sdl=yes
else
SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_sdltest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $SDL_CFLAGS"
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
dnl
dnl Now check if the installed SDL is sufficiently new. (Also sanity
dnl checks the results of sdl-config to some extent
dnl
rm -f conf.sdltest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "SDL.h"
char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;
return new_str;
}
int main (int argc, char *argv[])
{
int major, minor, micro;
char *tmp_version;
/* This hangs on some systems (?)
system ("touch conf.sdltest");
*/
{ FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_sdl_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_sdl_version");
exit(1);
}
if (($sdl_major_version > major) ||
(($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
(($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
printf("*** to point to the correct copy of sdl-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}
],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_sdl" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$SDL_CONFIG" = "no" ; then
echo "*** The sdl-config script installed by SDL could not be found"
echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the SDL_CONFIG environment variable to the"
echo "*** full path to sdl-config."
else
if test -f conf.sdltest ; then
:
else
echo "*** Could not run SDL test program, checking why..."
CFLAGS="$CFLAGS $SDL_CFLAGS"
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include "SDL.h"
int main(int argc, char *argv[])
{ return 0; }
#undef main
#define main K_and_R_C_main
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding SDL or finding the wrong"
echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means SDL was incorrectly installed"
echo "*** or that you have moved SDL since it was installed. In the latter case, you"
echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
SDL_CFLAGS=""
SDL_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(SDL_CFLAGS)
AC_SUBST(SDL_LIBS)
rm -f conf.sdltest
])

View File

@ -0,0 +1,93 @@
dnl @synopsis VL_LIB_READLINE
dnl
dnl Searches for a readline compatible library. If found, defines
dnl `HAVE_LIBREADLINE'. If the found library has the `add_history'
dnl function, sets also `HAVE_READLINE_HISTORY'. Also checks for the
dnl locations of the necessary include files and sets `HAVE_READLINE_H'
dnl or `HAVE_READLINE_READLINE_H' and `HAVE_READLINE_HISTORY_H' or
dnl 'HAVE_HISTORY_H' if the corresponding include files exists.
dnl
dnl The libraries that may be readline compatible are `libedit',
dnl `libeditline' and `libreadline'. Sometimes we need to link a
dnl termcap library for readline to work, this macro tests these cases
dnl too by trying to link with `libtermcap', `libcurses' or
dnl `libncurses' before giving up.
dnl
dnl Here is an example of how to use the information provided by this
dnl macro to perform the necessary includes or declarations in a C
dnl file:
dnl
dnl #ifdef HAVE_LIBREADLINE
dnl # if defined(HAVE_READLINE_READLINE_H)
dnl # include <readline/readline.h>
dnl # elif defined(HAVE_READLINE_H)
dnl # include <readline.h>
dnl # else /* !defined(HAVE_READLINE_H) */
dnl extern char *readline ();
dnl # endif /* !defined(HAVE_READLINE_H) */
dnl char *cmdline = NULL;
dnl #else /* !defined(HAVE_READLINE_READLINE_H) */
dnl /* no readline */
dnl #endif /* HAVE_LIBREADLINE */
dnl
dnl #ifdef HAVE_READLINE_HISTORY
dnl # if defined(HAVE_READLINE_HISTORY_H)
dnl # include <readline/history.h>
dnl # elif defined(HAVE_HISTORY_H)
dnl # include <history.h>
dnl # else /* !defined(HAVE_HISTORY_H) */
dnl extern void add_history ();
dnl extern int write_history ();
dnl extern int read_history ();
dnl # endif /* defined(HAVE_READLINE_HISTORY_H) */
dnl /* no history */
dnl #endif /* HAVE_READLINE_HISTORY */
dnl
dnl @category InstalledPackages
dnl @author Ville Laurikari <vl@iki.fi>
dnl @version 2002-04-04
dnl @license AllPermissive
AC_DEFUN([VL_LIB_READLINE], [
AC_CACHE_CHECK([for a readline compatible library],
vl_cv_lib_readline, [
ORIG_LIBS="$LIBS"
for readline_lib in readline edit editline; do
for termcap_lib in "" termcap curses ncurses; do
if test -z "$termcap_lib"; then
TRY_LIB="-l$readline_lib"
else
TRY_LIB="-l$readline_lib -l$termcap_lib"
fi
LIBS="$ORIG_LIBS $TRY_LIB"
AC_TRY_LINK_FUNC(readline, vl_cv_lib_readline="$TRY_LIB")
if test -n "$vl_cv_lib_readline"; then
break
fi
done
if test -n "$vl_cv_lib_readline"; then
break
fi
done
if test -z "$vl_cv_lib_readline"; then
vl_cv_lib_readline="no"
LIBS="$ORIG_LIBS"
fi
])
if test "$vl_cv_lib_readline" != "no"; then
AC_DEFINE(HAVE_LIBREADLINE, 1,
[Define if you have a readline compatible library])
AC_CHECK_HEADERS(readline.h readline/readline.h)
AC_CACHE_CHECK([whether readline supports history],
vl_cv_lib_readline_history, [
vl_cv_lib_readline_history="no"
AC_TRY_LINK_FUNC(add_history, vl_cv_lib_readline_history="yes")
])
if test "$vl_cv_lib_readline_history" = "yes"; then
AC_DEFINE(HAVE_READLINE_HISTORY, 1,
[Define if your readline library has \`add_history'])
AC_CHECK_HEADERS(history.h readline/history.h)
fi
fi
])dnl

37
clonk.anjuta 100644
View File

@ -0,0 +1,37 @@
<?xml version="1.0"?>
<anjuta>
<plugin name="GBF Project Manager"
url="http://anjuta.org/plugins/"
mandatory="yes">
<require group="Anjuta Plugin"
attribute="Interfaces"
value="IAnjutaProjectManager"/>
<require group="Project"
attribute="Supported-Project-Types"
value="automake"/>
</plugin>
<plugin name="Symbol Browser"
url="http://anjuta.org/plugins/"
mandatory="yes">
<require group="Anjuta Plugin"
attribute="Interfaces"
value="IAnjutaSymbolManager"/>
</plugin>
<plugin name="Make Build System"
url="http://anjuta.org/plugins/"
mandatory="yes">
<require group="Anjuta Plugin"
attribute="Interfaces"
value="IAnjutaBuildable"/>
<require group="Build"
attribute="Supported-Build-Types"
value="make"/>
</plugin>
<plugin name="Debug Manager"
url="http://anjuta.org/plugins/"
mandatory="no">
<require group="Anjuta Plugin"
attribute="Interfaces"
value="IAnjutaDebugManager"/>
</plugin>
</anjuta>

View File

@ -1,101 +0,0 @@
# - Check if the files can be included
#
# CHECK_INCLUDE_FILES_CXX(INCLUDE VARIABLE)
#
# INCLUDE - list of files to include
# VARIABLE - variable to return result
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
# CMAKE_REQUIRED_INCLUDES = list of include directories
#=============================================================================
# Copyright 2003-2012 Kitware, Inc.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
# nor the names of their contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================
macro(CHECK_INCLUDE_FILES_CXX INCLUDE VARIABLE)
if(NOT DEFINED "${VARIABLE}")
set(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
if(CMAKE_REQUIRED_INCLUDES)
set(CHECK_INCLUDE_FILES_INCLUDE_DIRS "-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}")
else()
set(CHECK_INCLUDE_FILES_INCLUDE_DIRS)
endif()
set(CHECK_INCLUDE_FILES_CONTENT "/* */\n")
set(MACRO_CHECK_INCLUDE_FILES_FLAGS ${CMAKE_REQUIRED_FLAGS})
foreach(FILE ${INCLUDE})
set(CMAKE_CONFIGURABLE_FILE_CONTENT
"${CMAKE_CONFIGURABLE_FILE_CONTENT}#include <${FILE}>\n")
endforeach()
set(CMAKE_CONFIGURABLE_FILE_CONTENT
"${CMAKE_CONFIGURABLE_FILE_CONTENT}\n\nint main(){return 0;}\n")
configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFiles.cxx" @ONLY IMMEDIATE)
set(_INCLUDE ${INCLUDE}) # remove empty elements
if("${_INCLUDE}" MATCHES "^([^;]+);.+;([^;]+)$")
list(LENGTH _INCLUDE _INCLUDE_LEN)
set(_description "${_INCLUDE_LEN} C++ include files ${CMAKE_MATCH_1}, ..., ${CMAKE_MATCH_2}")
elseif("${_INCLUDE}" MATCHES "^([^;]+);([^;]+)$")
set(_description "C++ include files ${CMAKE_MATCH_1}, ${CMAKE_MATCH_2}")
else()
set(_description "C++ include file ${_INCLUDE}")
endif()
message(STATUS "Looking for ${_description}")
try_compile(${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFiles.cxx
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
CMAKE_FLAGS
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILES_FLAGS}
"${CHECK_INCLUDE_FILES_INCLUDE_DIRS}"
OUTPUT_VARIABLE OUTPUT)
if(${VARIABLE})
message(STATUS "Looking for ${_description} - found")
set(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if C++ files ${INCLUDE} "
"exist passed with the following output:\n"
"${OUTPUT}\n\n")
else()
message(STATUS "Looking for ${_description} - not found")
set(${VARIABLE} "" CACHE INTERNAL "Have includes ${INCLUDE}")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if C++ files ${INCLUDE} "
"exist failed with the following output:\n"
"${OUTPUT}\nSource:\n${CMAKE_CONFIGURABLE_FILE_CONTENT}\n")
endif()
endif()
endmacro()

View File

@ -1,89 +0,0 @@
# The MIT License (MIT)
#
# Copyright (c) 2018 Nathan Osman
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
find_package(Qt5Core REQUIRED)
# Retrieve the absolute path to qmake and then use that path to find
# the windeployqt and macdeployqt binaries
get_target_property(_qmake_executable Qt5::qmake IMPORTED_LOCATION)
get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY)
find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${_qt_bin_dir}")
if(WIN32 AND NOT WINDEPLOYQT_EXECUTABLE)
message(FATAL_ERROR "windeployqt not found")
endif()
find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${_qt_bin_dir}")
if(APPLE AND NOT MACDEPLOYQT_EXECUTABLE)
message(FATAL_ERROR "macdeployqt not found")
endif()
# Add commands that copy the required Qt files to the same directory as the
# target after being built as well as including them in final installation
function(windeployqt target)
# Run windeployqt immediately after build
add_custom_command(TARGET ${target} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E
env PATH="${_qt_bin_dir}" "${WINDEPLOYQT_EXECUTABLE}"
--verbose 0
--no-compiler-runtime
--no-angle
--release-with-debug-info
--no-translations
\"$<TARGET_FILE:${target}>\"
COMMENT "Deploying Qt..."
)
# windeployqt doesn't work correctly with the system runtime libraries,
# so we fall back to one of CMake's own modules for copying them over
# Doing this with MSVC 2015 requires CMake 3.6+
if((MSVC_VERSION VERSION_EQUAL 1900 OR MSVC_VERSION VERSION_GREATER 1900)
AND CMAKE_VERSION VERSION_LESS "3.6")
message(WARNING "Deploying with MSVC 2015+ requires CMake 3.6+")
endif()
set(CMAKE_INSTALL_UCRT_LIBRARIES TRUE)
include(InstallRequiredSystemLibraries)
foreach(lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
get_filename_component(filename "${lib}" NAME)
add_custom_command(TARGET ${target} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E
copy_if_different "${lib}" \"$<TARGET_FILE_DIR:${target}>\"
COMMENT "Copying ${filename}..."
)
endforeach()
endfunction()
# Add commands that copy the required Qt files to the application bundle
# represented by the target.
function(macdeployqt target)
add_custom_command(TARGET ${target} POST_BUILD
COMMAND "${MACDEPLOYQT_EXECUTABLE}"
\"$<TARGET_FILE_DIR:${target}>/../..\"
-always-overwrite
COMMENT "Deploying Qt..."
)
endfunction()
mark_as_advanced(WINDEPLOYQT_EXECUTABLE MACDEPLOYQT_EXECUTABLE)

View File

@ -1,147 +0,0 @@
# OpenClonk, http://www.openclonk.org
#
# Copyright (c) 2009-2016, The OpenClonk Team and contributors
#
# Distributed under the terms of the ISC license; see accompanying file
# "COPYING" for details.
#
# "Clonk" is a registered trademark of Matthes Bender, used with permission.
# See accompanying file "TRADEMARK" for details.
#
# To redistribute this file separately, substitute the full license texts
# for the above references.
# This module chooses an audio provider for use in OpenClonk.
macro(__FINDAUDIO_FINDOPENAL)
set(HAVE_ALEXT FALSE)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND AND NOT(APPLE))
pkg_check_modules(OpenAL "openal>=1.13")
# OpenAL pkg-config data before 1.15 doesn't have .../AL in the include
# path. But we don't want to have to specify <AL/al.h> because some
# systems use <OpenAL/al.h>. So let's see if we find al.h in the list
# of directories that pkg_check_modules returned, and if not, add it to
# the include path.
if (OpenAL_FOUND)
# OpenAL pkg-config data always includes alext.h
set(HAVE_ALEXT TRUE)
find_path(__findaudio_al_h NAMES al.h PATHS ${OpenAL_INCLUDE_DIRS})
if (NOT __findaudio_al_h)
find_path(__findaudio_al_h NAMES al.h PATHS ${OpenAL_INCLUDE_DIRS} PATH_SUFFIXES OpenAL AL)
if (__findaudio_al_h)
list(APPEND __findaudio_al_h ${OpenAL_INCLUDE_DIRS})
set(OpenAL_INCLUDE_DIRS "${__findaudio_al_h}" CACHE INTERNAL "")
endif()
endif()
endif()
pkg_check_modules(Alut "freealut>=1.1.0")
pkg_check_modules(OggVorbis "vorbisfile>=1.3.2" "vorbis>=1.3.2" "ogg>=1.2.2")
else()
if(MSVC OR APPLE)
# We need OpenAL preferably with alext.h.
find_path(OpenALExt_INCLUDE_DIRS alext.h PATH_SUFFIXES include/AL include/OpenAL include OpenAL)
if(OpenALExt_INCLUDE_DIRS)
set(HAVE_ALEXT TRUE)
set(OpenAL_INCLUDE_DIRS ${OpenALExt_INCLUDE_DIRS})
else()
set(HAVE_ALEXT FALSE)
# Maybe only al.h can be found without alext.h?
find_path(OpenAL_INCLUDE_DIRS al.h PATH_SUFFIXES include/AL include/OpenAL include OpenAL)
endif()
find_path(Vorbis_INCLUDE_DIRS vorbis/codec.h vorbis/vorbisfile.h PATH_SUFFIXES include)
find_library(Ogg_LIBRARY NAMES libogg_static libogg ogg)
find_library(Vorbis_LIBRARY NAMES libvorbis_static libvorbis vorbis)
find_library(Vorbisfile_LIBRARY NAMES libvorbisfile_static libvorbisfile vorbisfile)
if(OpenAL_INCLUDE_DIRS)
set(OpenAL_FOUND TRUE)
endif()
if(Vorbis_INCLUDE_DIRS AND Ogg_LIBRARY AND Vorbis_LIBRARY AND Vorbisfile_LIBRARY)
set(OggVorbis_FOUND TRUE)
set(OggVorbis_LIBRARIES ${Vorbisfile_LIBRARY} ${Vorbis_LIBRARY} ${Ogg_LIBRARY})
set(OggVorbis_INCLUDE_DIRS(${Vorbis_INCLUDE_DIRS}))
endif()
find_path(Alut_INCLUDE_DIRS alut.h PATH_SUFFIXES include/AL include/OpenAL include)
find_library(Alut_LIBRARY NAMES alut_static alut)
if (MSVC)
if(${FIND_LIBRARY_USE_LIB64_PATHS})
find_library(OpenAL_LIBRARIES NAMES OpenAL64)
else()
find_library(OpenAL_LIBRARIES NAMES OpenAL32)
endif()
if(NOT OpenAL_LIBRARIES)
set(OpenAL_FOUND FALSE)
endif()
endif()
if(Alut_INCLUDE_DIRS AND Alut_LIBRARY)
set(Alut_FOUND TRUE)
set(Alut_LIBRARIES ${Alut_LIBRARY})
endif()
endif()
endif()
endmacro()
if(Audio_TK)
# Already chosen, don't do anything
else()
# Test for OpenAL
__FINDAUDIO_FINDOPENAL()
find_package(SDL2Mixer)
if(OpenAL_FOUND AND Alut_FOUND AND OggVorbis_FOUND)
# Prefer OpenAL
set(Audio_TK "OpenAL")
if (NOT HAVE_ALEXT)
message(STATUS "Warning: Found OpenAL but no extensions (alext.h). Sound modifiers will be disabled.")
endif()
elseif(SDL2Mixer_FOUND)
set(Audio_TK "SDL_Mixer")
endif()
endif()
# Search for the libraries again. If the provider was selected automatically, this will be
# answered from cache; otherwise (because the user manually selected a provider) it will
# make sure the provider is available.
if(Audio_TK STREQUAL "OpenAL")
__FINDAUDIO_FINDOPENAL()
if(OpenAL_FOUND AND (APPLE OR Alut_FOUND) AND OggVorbis_FOUND)
set(Audio_FOUND TRUE)
set(Audio_LIBRARIES ${OpenAL_LIBRARIES} ${OggVorbis_LIBRARIES})
set(Audio_INCLUDE_DIRS ${OpenAL_INCLUDE_DIRS} ${OggVorbis_INCLUDE_DIRS})
set(Audio_LIBRARIES ${Audio_LIBRARIES} ${Alut_LIBRARIES})
set(Audio_INCLUDE_DIRS ${Audio_INCLUDE_DIRS} ${Alut_INCLUDE_DIRS})
endif()
elseif(Audio_TK STREQUAL "SDL_Mixer")
find_package(SDL2Mixer)
if(SDL2Mixer_FOUND)
set(Audio_FOUND TRUE)
set(Audio_LIBRARIES ${SDL2Mixer_LIBRARIES})
set(Audio_INCLUDE_DIRS ${SDL2Mixer_INCLUDE_DIRS})
endif()
elseif(Audio_TK STREQUAL "none")
set(Audio_FOUND TRUE)
set(Audio_LIBRARIES "")
set(Audio_INCLUDE_DIRS "")
endif()
if(Audio_FOUND)
string(TOUPPER "${Audio_TK}" Audio_TK_UPPER)
if(NOT Audio_FIND_QUIETLY)
message(STATUS "Using Audio toolkit: ${Audio_TK}")
endif()
elseif(Audio_TK)
message(FATAL_ERROR "User-requested audio provider not available.")
else()
set(Audio_FOUND FALSE)
set(Audio_TK "none")
string(TOUPPER "${Audio_TK}" Audio_TK_UPPER)
set(Audio_LIBRARIES "")
set(Audio_INCLUDE_DIRS "")
if(Audio_FIND_REQUIRED)
message(FATAL_ERROR "No audio provider was found")
else()
message(STATUS "Not enabling audio output.")
endif()
endif()

View File

@ -1,43 +0,0 @@
# OpenClonk, http://www.openclonk.org
#
# Copyright (c) 2011-2017, The OpenClonk Team and contributors
#
# Distributed under the terms of the ISC license; see accompanying file
# "COPYING" for details.
#
# "Clonk" is a registered trademark of Matthes Bender, used with permission.
# See accompanying file "TRADEMARK" for details.
#
# To redistribute this file separately, substitute the full license texts
# for the above references.
# - Find DbgHelp
# Find the DbgHelp library
# This module defines
# DBGHELP_INCLUDE_DIR, where to find dbghelp.h, etc.
# DBGHELP_LIBRARIES, the libraries needed to use DbgHelp.
# DBGHELP_FOUND, If false, do not try to use DbgHelp.
# MSVC knows how to find the Windows SDK on its own, and replicating that
# in CMake is very tricky, especially with the SDK's layout changing
# occasionally. So instead we'll just leave it to MSVC to do correctly.
if(MSVC AND NOT DEFINED DBGHELP_INCLUDE_DIR AND NOT DEFINED DBGHELP_LIBRARY)
set(DBGHELP_INCLUDE_DIR "")
set(DBGHELP_LIBRARY "dbghelp")
set(DBGHELP_FOUND TRUE)
endif()
if(NOT DBGHELP_FOUND)
find_path(DBGHELP_INCLUDE_DIR NAMES dbghelp.h PATH_SUFFIXES include)
set(DBGHELP_NAMES ${DBGHELP_NAMES} dbghelp)
find_library(DBGHELP_LIBRARY NAMES ${DBGHELP_NAMES})
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DBGHELP DEFAULT_MSG DBGHELP_LIBRARY DBGHELP_INCLUDE_DIR)
endif()
if(DBGHELP_FOUND)
set(DBGHELP_LIBRARIES ${DBGHELP_LIBRARY})
endif()
mark_as_advanced(DBGHELP_LIBRARY DBGHELP_INCLUDE_DIR)

View File

@ -1,43 +0,0 @@
# OpenClonk, http://www.openclonk.org
#
# Copyright (c) 2014-2016, The OpenClonk Team and contributors
#
# Distributed under the terms of the ISC license; see accompanying file
# "COPYING" for details.
#
# "Clonk" is a registered trademark of Matthes Bender, used with permission.
# See accompanying file "TRADEMARK" for details.
#
# To redistribute this file separately, substitute the full license texts
# for the above references.
# This module defines
# FREETYPE_LIBRARIES, the library to link against
# FREETYPE_FOUND, if false, do not try to link to FREETYPE
# FREETYPE_INCLUDE_DIRS, where to find headers.
# FREETYPE_VERSION_STRING, the version of freetype found
# Use pkg-config if possible instead of doing guesswork like the default CMake module does
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
set(_ft_pkgconfig_args "")
if(FREETYPE_FIND_QUIET)
set(_ft_pkgconfig_args "${_ft_pkgconfig_args}QUIET ")
endif()
set(_ft_pkgconfig_args "${_ft_pkgconfig_args}freetype2")
if(FREETYPE_FIND_VERSION)
if(NOT FREETYPE_FIND_VERSION_EXACT)
set(_ft_pkgconfig_args "${_ft_pkgconfig_args}>")
endif()
set(_ft_pkgconfig_args "${_ft_pkgconfig_args}=${FREETYPE_FIND_VERSION} ")
endif()
pkg_check_modules(FREETYPE ${_ft_pkgconfig_args})
endif()
if(NOT FREETYPE_FOUND)
# Fallback to system FindFreetype
set(_ft_module_path "${CMAKE_MODULE_PATH}")
unset(CMAKE_MODULE_PATH)
include(FindFreetype)
set(CMAKE_MODULE_PATH "${_ft_module_path}")
endif()

View File

@ -1,63 +0,0 @@
# OpenClonk, http://www.openclonk.org
#
# Copyright (c) 2015-2016, The OpenClonk Team and contributors
#
# Distributed under the terms of the ISC license; see accompanying file
# "COPYING" for details.
#
# "Clonk" is a registered trademark of Matthes Bender, used with permission.
# See accompanying file "TRADEMARK" for details.
#
# To redistribute this file separately, substitute the full license texts
# for the above references.
# Locate GLEW.
# This module defines
# GLEW_INCLUDE_DIRS - a list of directories that need to be added to the include path
# GLEW_LIBRARIES - a list of libraries to link against to use GLEW
# GLEW_DEFINITIONS - a list of compile-time macros that need to be defined to use GLEW
# GLEW_FOUND - if false, GLEW cannot be used
find_path(GLEW_INCLUDE_DIR GL/glew.h PATH_SUFFIXES)
mark_as_advanced(GLEW_INCLUDE_DIR)
# Read GLEW version from header
if (GLEW_INCLUDE_DIR AND EXISTS "${GLEW_INCLUDE_DIR}/GL/glew.h")
file(STRINGS "${GLEW_INCLUDE_DIR}/GL/glew.h" glew_version_str REGEX "^VERSION .+")
string(REGEX REPLACE "^VERSION (.+)" "\\1" GLEW_VERSION_STRING "${glew_version_str}")
unset(glew_version_str)
endif()
# On OS other than Windows, it doesn't matter whether we confuse the shared
# library and the static one. On Windows, we need to #define GLEW_STATIC if
# (and only if) we're linking against the static library. "glew32" may match
# the static library on MinGW, so we have to test for that explicitly.
find_library(GLEW_STATIC_LIBRARY glew32s)
mark_as_advanced(GLEW_STATIC_LIBRARY)
find_library(GLEW_SHARED_LIBRARY NAMES GLEW glew32)
mark_as_advanced(GLEW_SHARED_LIBRARY)
if (GLEW_SHARED_LIBRARY)
set(GLEW_LIBRARY "${GLEW_SHARED_LIBRARY}")
if (WIN32 AND MINGW AND GLEW_SHARED_LIBRARY MATCHES "\\.a$")
# not actually a shared library
set(GLEW_DEFINITIONS "-DGLEW_STATIC")
else()
set(GLEW_DEFINITIONS)
endif()
elseif (GLEW_STATIC_LIBRARY)
set(GLEW_LIBRARY "${GLEW_STATIC_LIBRARY}")
set(GLEW_DEFINITIONS "-DGLEW_STATIC")
endif()
include(FindPackageHandleStandardArgs)
if (NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.3")
find_package_handle_standard_args(GLEW VERSION_VAR GLEW_VERSION_STRING REQUIRED_VARS GLEW_LIBRARY GLEW_INCLUDE_DIR)
else()
find_package_handle_standard_args(GLEW GLEW_LIBRARY GLEW_INCLUDE_DIR)
endif()
if (GLEW_FOUND)
set(GLEW_LIBRARIES "${GLEW_LIBRARY}")
set(GLEW_INCLUDE_DIRS "${GLEW_INCLUDE_DIR}")
endif()

View File

@ -1,222 +0,0 @@
# OpenClonk, http://www.openclonk.org
#
# Copyright (c) 2015-2016, The OpenClonk Team and contributors
#
# Distributed under the terms of the ISC license; see accompanying file
# "COPYING" for details.
#
# "Clonk" is a registered trademark of Matthes Bender, used with permission.
# See accompanying file "TRADEMARK" for details.
#
# To redistribute this file separately, substitute the full license texts
# for the above references.
# Locate GTK3.
# This module defines
# GTK3_INCLUDE_DIRS - a list of directories that need to be added to the include path
# GTK3_LIBRARIES - a list of libraries to link against to use GTK3
# GTK3_LIBRARY_DIRS - a list of library directories where the libraries above can be found
# GTK3_COMPILE_DEFINITIONS - a list of compiler flags that need to be set to use GTK3
# GTK3_FOUND - if false, GTK3 cannot be used
#
# FindGTK3 may optionally take a list of components that should also be located
# and added to the library list. The following components are valid:
# gtksourceview - GtkSourceView 3.0
# gobject - Glib GObject 2.0
# gio - Glib GIO 2.0
# gthread
# glib - Glib 2.0
#
# If any of these components are requested, the following variables will be
# defined with the same meaning as above:
# GTK3_<component>_INCLUDE_DIRS
# GTK3_<component>_LIBRARIES
# GTK3_<component>_FOUND
if(GTK3_FIND_QUIETLY)
set(__GTK3_QUIET "QUIET")
else()
set(__GTK3_QUIET)
endif()
include(FindPackageHandleStandardArgs)
if(NOT GTK3_FIND_COMPONENTS)
set(GTK3_FIND_COMPONENTS)
endif()
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
# If pkg-config is available, defer to it
set(__GTK3_VERSION_CHECK)
if(GTK3_FIND_VERSION_EXACT)
set(__GTK3_VERSION_CHECK "=${GTK3_FIND_VERSION}")
elseif(GTK3_FIND_VERSION)
set(__GTK3_VERSION_CHECK ">=${GTK3_FIND_VERSION}")
endif()
pkg_check_modules(GTK3 ${__GTK3_QUIET} "gtk+-3.0${__GTK3_VERSION_CHECK}")
macro(__GTK3_HANDLE_COMPONENT __cname __cfullname)
if(__component STREQUAL "${__cname}")
pkg_check_modules(GTK3_${__cname} ${__GTK3_QUIET} "${__cfullname}")
if(GTK3_${__cname}_FOUND)
if(GTK3_LIBRARY_DIRS)
list(REMOVE_ITEM GTK3_${__cname}_LIBRARY_DIRS ${GTK3_LIBRARY_DIRS})
endif()
if(GTK3_INCLUDE_DIRS)
list(REMOVE_ITEM GTK3_${__cname}_INCLUDE_DIRS ${GTK3_INCLUDE_DIRS})
endif()
if(GTK3_FIND_REQUIRED_${__cname})
list(APPEND GTK3_LIBRARIES ${GTK3_${__cname}_LIBRARIES})
list(APPEND GTK3_INCLUDE_DIRS ${GTK3_${__cname}_INCLUDE_DIRS})
endif()
endif()
endif()
endmacro(__GTK3_HANDLE_COMPONENT)
foreach(__component ${GTK3_FIND_COMPONENTS})
__GTK3_HANDLE_COMPONENT(gtksourceview "gtksourceview-3.0")
__GTK3_HANDLE_COMPONENT(gobject "gobject-2.0")
__GTK3_HANDLE_COMPONENT(gio "gio-2.0")
__GTK3_HANDLE_COMPONENT(gthread "gthread-2.0")
__GTK3_HANDLE_COMPONENT(glib "glib-2.0")
endforeach()
set(GTK3_COMPILE_DEFINITIONS ${GTK3_CFLAGS_OTHER})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
GTK3
FOUND_VAR GTK3_FOUND
VERSION_VAR GTK3_VERSION
HANDLE_COMPONENTS
REQUIRED_VARS
GTK3_INCLUDE_DIRS GTK3_LIBRARIES
)
else()
# Find all headers and libraries
find_path(GTK3_INCLUDE_DIR NAMES gtk/gtk.h PATH_SUFFIXES gtk-3.0)
find_library(GTK3_LIBRARY NAMES gtk-3.0)
mark_as_advanced(GTK3_INCLUDE_DIR GTK3_LIBRARY)
find_path(GTK3_GDK_INCLUDE_DIR NAMES gdk/gdk.h PATH_SUFFIXES gtk-3.0)
find_library(GTK3_GDK_LIBRARY NAMES gdk-3.0)
mark_as_advanced(GTK3_GDK_INCLUDE_DIR GTK3_GDK_LIBRARY)
find_path(GTK3_Glib_INCLUDE_DIR NAMES glib.h PATH_SUFFIXES glib-2.0)
find_library(GTK3_Glib_LIBRARY NAMES glib-2.0)
get_filename_component(__GTK3_Glib_LIBRARY_DIR "${GTK3_Glib_LIBRARY}" PATH)
find_path(GTK3_Glibconfig_INCLUDE_DIR
NAMES glibconfig.h
HINTS ${__GTK3_Glib_LIBRARY_DIR}
PATH_SUFFIXES glib-2.0/include
)
mark_as_advanced(GTK3_Glib_INCLUDE_DIR GTK3_Glibconfig_INCLUDE_DIR GTK3_Glib_LIBRARY)
find_path(GTK3_Atk_INCLUDE_DIR NAMES atk/atk.h PATH_SUFFIXES atk-1.0)
find_library(GTK3_Atk_LIBRARY NAMES atk-1.0)
mark_as_advanced(GTK3_Atk_INCLUDE_DIR GTK3_Atk_LIBRARY)
find_path(GTK3_Cairo_INCLUDE_DIR NAMES cairo.h)
find_library(GTK3_Cairo_LIBRARY NAMES cairo)
mark_as_advanced(GTK3_Cairo_INCLUDE_DIR GTK3_Cairo_LIBRARY)
find_path(GTK3_Pango_INCLUDE_DIR NAMES pango/pango.h PATH_SUFFIXES pango-1.0)
find_library(GTK3_Pango_LIBRARY NAMES pango-1.0)
find_library(GTK3_PangoCairo_LIBRARY NAMES pangocairo-1.0)
mark_as_advanced(GTK3_Pango_INCLUDE_DIR GTK3_Pango_LIBRARY GTK3_PangoCairo_LIBRARY)
find_path(GTK3_GDKPixbuf_INCLUDE_DIR NAMES gdk-pixbuf/gdk-pixbuf.h PATH_SUFFIXES gdk-pixbuf-2.0)
find_library(GTK3_GDKPixbuf_LIBRARY NAMES gdk_pixbuf-2.0)
mark_as_advanced(GTK3_GDKPixbuf_INCLUDE_DIR GTK3_GDKPixbuf_LIBRARY)
set(__GTK3_REQUIRED_INCLUDE_DIRS
GTK3_INCLUDE_DIR
GTK3_GDK_INCLUDE_DIR
GTK3_Glib_INCLUDE_DIR GTK3_Glibconfig_INCLUDE_DIR
GTK3_Atk_INCLUDE_DIR
GTK3_Cairo_INCLUDE_DIR
GTK3_Pango_INCLUDE_DIR
GTK3_GDKPixbuf_INCLUDE_DIR
)
set(__GTK3_REQUIRED_LIBRARIES
GTK3_LIBRARY
GTK3_GDK_LIBRARY
GTK3_Glib_LIBRARY
GTK3_Atk_LIBRARY
GTK3_Cairo_LIBRARY
GTK3_Pango_LIBRARY GTK3_PangoCairo_LIBRARY
GTK3_GDKPixbuf_LIBRARY
)
set(__GTK3_COMPONENT_INCLUDE_DIRS)
set(__GTK3_COMPONENT_LIBRARIES)
macro(__GTK3_HANDLE_COMPONENT __cname __cheader __csuffixes __clibrary)
if(__component STREQUAL "${__cname}")
find_path(GTK3_${__cname}_INCLUDE_DIR NAMES ${__cheader} PATH_SUFFIXES ${__csuffixes})
find_library(GTK3_${__cname}_LIBRARY NAMES ${__clibrary})
mark_as_advanced(GTK3_${__cname}_INCLUDE_DIR GTK3_${__cname}_LIBRARY)
if(GTK3_${__cname}_INCLUDE_DIR AND GTK3_${__cname}_LIBRARY)
set(GTK3_${__cname}_FOUND TRUE)
set(GTK3_${__cname}_INCLUDE_DIRS ${GTK3_${__cname}_INCLUDE_DIR})
set(GTK3_${__cname}_LIBRARIES ${GTK3_${__cname}_LIBRARY})
if(GTK3_FIND_REQUIRED_${__cname})
list(APPEND __GTK3_REQUIRED_LIBRARIES GTK3_${__cname}_LIBRARY)
list(APPEND __GTK3_REQUIRED_INCLUDE_DIRS GTK3_${__cname}_INCLUDE_DIR)
endif()
endif()
endif()
endmacro(__GTK3_HANDLE_COMPONENT)
foreach(__component ${GTK3_FIND_COMPONENTS})
__GTK3_HANDLE_COMPONENT(gtksourceview gtksourceview/gtksourceview.h gtksourceview-3.0 gtksourceview-3.0)
__GTK3_HANDLE_COMPONENT(gobject gobject/gobject.h glib-2.0 gobject-2.0)
__GTK3_HANDLE_COMPONENT(gio gio/gio.h glib-2.0 gio-2.0)
__GTK3_HANDLE_COMPONENT(gthread glib/gthread.h glib-2.0 gthread-2.0)
__GTK3_HANDLE_COMPONENT(glib glib.h glib-2.0 glib-2.0)
endforeach()
# Parse version from GTK3 header
if(GTK3_INCLUDE_DIR)
file(READ "${GTK3_INCLUDE_DIR}/gtk/gtkversion.h" _gtk_header)
string(REGEX REPLACE ".*#define GTK_MAJOR_VERSION \\(([0-9]+)\\).*" "\\1" __GTK3_MAJOR_VER "${_gtk_header}")
string(REGEX REPLACE ".*#define GTK_MINOR_VERSION \\(([0-9]+)\\).*" "\\1" __GTK3_MINOR_VER "${_gtk_header}")
string(REGEX REPLACE ".*#define GTK_MICRO_VERSION \\(([0-9]+)\\).*" "\\1" __GTK3_MICRO_VER "${_gtk_header}")
set(GTK3_VERSION "${__GTK3_MAJOR_VER}.${__GTK3_MINOR_VER}.${__GTK3_MICRO_VER}")
unset(__GTK3_MICRO_VER)
unset(__GTK3_MINOR_VER)
unset(__GTK3_MAJOR_VER)
unset(_gtk_header)
endif()
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
GTK3
FOUND_VAR GTK3_FOUND
VERSION_VAR GTK3_VERSION
HANDLE_COMPONENTS
REQUIRED_VARS
${__GTK3_REQUIRED_INCLUDE_DIRS} ${__GTK3_REQUIRED_LIBRARIES}
)
if(GTK3_FOUND)
set(GTK3_INCLUDE_DIRS)
foreach(__dir ${__GTK3_REQUIRED_INCLUDE_DIRS})
list(APPEND GTK3_INCLUDE_DIRS "${${__dir}}")
endforeach()
set(GTK3_LIBRARIES)
foreach(__lib ${__GTK3_REQUIRED_LIBRARIES})
list(APPEND GTK3_LIBRARIES "${${__lib}}")
endforeach()
list(REMOVE_DUPLICATES GTK3_LIBRARIES)
list(REMOVE_DUPLICATES GTK3_INCLUDE_DIRS)
set(GTK3_COMPILE_DEFINITIONS)
set(GTK3_LIBRARY_DIRS)
endif()
unset(__GTK3_REQUIRED_INCLUDE_DIRS)
unset(__GTK3_REQUIRED_LIBRARIES)
endif()
if(NOT GTK3_FOUND)
unset(GTK3_INCLUDE_DIRS)
unset(GTK3_LIBRARIES)
endif()

View File

@ -1,105 +0,0 @@
# - Find the native PNG includes and library
#
# This module searches libpng, the library for working with PNG images.
#
# It defines the following variables
# PNG_INCLUDE_DIRS, where to find png.h, etc.
# PNG_LIBRARIES, the libraries to link against to use PNG.
# PNG_DEFINITIONS - You should add_definitons(${PNG_DEFINITIONS}) before compiling code that includes png library files.
# PNG_FOUND, If false, do not try to use PNG.
# PNG_VERSION_STRING - the version of the PNG library found (since CMake 2.8.8)
# Also defined, but not for general use are
# PNG_LIBRARY, where to find the PNG library.
# For backward compatiblity the variable PNG_INCLUDE_DIR is also set. It has the same value as PNG_INCLUDE_DIRS.
#
# Since PNG depends on the ZLib compression library, none of the above will be
# defined unless ZLib can be found.
#=============================================================================
# CMake - Cross Platform Makefile Generator
# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
# nor the names of their contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================
# Modified by Nicolas Hake for the OpenClonk Project to make FindPNG also
# look for versioned libraries.
if(PNG_FIND_QUIETLY)
set(_FIND_ZLIB_ARG QUIET)
endif()
find_package(ZLIB ${_FIND_ZLIB_ARG})
if(ZLIB_FOUND)
find_path(PNG_PNG_INCLUDE_DIR png.h
/usr/local/include/libpng # OpenBSD
)
if (PNG_PNG_INCLUDE_DIR AND EXISTS "${PNG_PNG_INCLUDE_DIR}/png.h")
file(STRINGS "${PNG_PNG_INCLUDE_DIR}/png.h" png_version_str REGEX "^#define[ \t]+PNG_LIBPNG_VER_STRING[ \t]+\".+\"")
string(REGEX REPLACE "^#define[ \t]+PNG_LIBPNG_VER_STRING[ \t]+\"([^\"]+)\".*" "\\1" PNG_VERSION_STRING "${png_version_str}")
unset(png_version_str)
endif ()
if (PNG_VERSION_STRING)
string(REGEX REPLACE "^([0-9]+)\\.([0-9]+).*" "png\\1\\2" PNG_VERSIONED_LIBRARY "${PNG_VERSION_STRING}")
set(PNG_VERSIONED_LIBRARY ${PNG_VERSIONED_LIBRARY} lib${PNG_VERSIONED_LIBRARY} lib${PNG_VERSIONED_LIBRARY}_static ${PNG_VERSIONED_LIBRARY}d lib${PNG_VERSIONED_LIBRARY}d lib${PNG_VERSIONED_LIBRARY}d_static)
endif ()
set(PNG_NAMES ${PNG_NAMES} png libpng ${PNG_VERSIONED_LIBRARY} png15 libpng15 png15d libpng15d png14 libpng14 png14d libpng14d png12 libpng12 png12d libpng12d)
unset(PNG_VERSIONED_LIBRARY)
find_library(PNG_LIBRARY NAMES ${PNG_NAMES} )
if (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR)
# png.h includes zlib.h. Sigh.
set(PNG_INCLUDE_DIRS ${PNG_PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
set(PNG_INCLUDE_DIR ${PNG_INCLUDE_DIRS} ) # for backward compatiblity
set(PNG_LIBRARIES ${PNG_LIBRARY} ${ZLIB_LIBRARY})
if (CYGWIN)
if(BUILD_SHARED_LIBS)
# No need to define PNG_USE_DLL here, because it's default for Cygwin.
else()
set (PNG_DEFINITIONS -DPNG_STATIC)
endif()
endif ()
endif ()
endif()
# handle the QUIETLY and REQUIRED arguments and set PNG_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PNG
REQUIRED_VARS PNG_LIBRARY PNG_PNG_INCLUDE_DIR
VERSION_VAR PNG_VERSION_STRING)
mark_as_advanced(PNG_PNG_INCLUDE_DIR PNG_LIBRARY )

View File

@ -1,54 +0,0 @@
# OpenClonk, http://www.openclonk.org
#
# Copyright (c) 2011-2016, The OpenClonk Team and contributors
#
# Distributed under the terms of the ISC license; see accompanying file
# "COPYING" for details.
#
# "Clonk" is a registered trademark of Matthes Bender, used with permission.
# See accompanying file "TRADEMARK" for details.
#
# To redistribute this file separately, substitute the full license texts
# for the above references.
# - Find READLINE
# Find the native READLINE includes and library
#
# READLINE_INCLUDE_DIR - where to find READLINE.h, etc.
# READLINE_LIBRARIES - List of libraries when using READLINE.
# READLINE_FOUND - True if READLINE found.
IF (READLINE_INCLUDE_DIR)
# Already in cache, be silent
SET(READLINE_FIND_QUIETLY TRUE)
ENDIF (READLINE_INCLUDE_DIR)
FIND_PATH(READLINE_INCLUDE_DIR readline.h PATH_SUFFIXES readline)
# Unmodified readline depends on symbols from termcap without explicitly
# linking to it. Several distributions patch this to make it link against
# terminfo from ncurses or another termcap library, but some don't. To avoid
# having to run link tests, we'll just look for and use any termcap providing
# library.
FIND_LIBRARY(TERMCAP_LIBRARY NAMES tinfo termcap ncursesw ncurses cursesw curses)
SET(READLINE_NAMES readline libreadline)
FIND_LIBRARY(READLINE_LIBRARY NAMES ${READLINE_NAMES} )
# handle the QUIETLY and REQUIRED arguments and set READLINE_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(READLINE DEFAULT_MSG READLINE_LIBRARY READLINE_INCLUDE_DIR)
IF(READLINE_FOUND)
if(TERMCAP_LIBRARY)
set(READLINE_LIBRARIES ${READLINE_LIBRARY} ${TERMCAP_LIBRARY})
else()
set(READLINE_LIBRARIES ${READLINE_LIBRARY})
endif()
ELSE(READLINE_FOUND)
SET( READLINE_LIBRARIES )
ENDIF(READLINE_FOUND)
MARK_AS_ADVANCED( READLINE_LIBRARY TERMINFO_LIBRARY READLINE_INCLUDE_DIR )

View File

@ -1,41 +0,0 @@
# OpenClonk, http://www.openclonk.org
#
# Copyright (c) 2016, The OpenClonk Team and contributors
#
# Distributed under the terms of the ISC license; see accompanying file
# "COPYING" for details.
#
# "Clonk" is a registered trademark of Matthes Bender, used with permission.
# See accompanying file "TRADEMARK" for details.
#
# To redistribute this file separately, substitute the full license texts
# for the above references.
# Locate SDL2.
# This module defines
# SDL2_INCLUDE_DIRS - a list of directories that need to be added to the include path
# SDL2_LIBRARIES - a list of libraries to link against to use SDL2
# SDL2_FOUND - if false, SDL2 cannot be used
find_path(SDL2_INCLUDE_DIR SDL.h
HINTS
$ENV{SDL2DIR}
PATH_SUFFIXES SDL2 include
)
mark_as_advanced(SDL2_INCLUDE_DIR)
find_library(SDL2_LIBRARY
SDL2
HINTS
$ENV{SDL2DIR}
PATH_SUFFIXES lib
)
mark_as_advanced(SDL2_LIBRARY)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SDL2 REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR)
if (SDL2_FOUND)
set(SDL2_LIBRARIES "${SDL2_LIBRARY}")
set(SDL2_INCLUDE_DIRS "${SDL2_INCLUDE_DIR}")
endif()

View File

@ -1,37 +0,0 @@
# OpenClonk, http://www.openclonk.org
#
# Copyright (c) 2016, The OpenClonk Team and contributors
#
# Distributed under the terms of the ISC license; see accompanying file
# "COPYING" for details.
#
# "Clonk" is a registered trademark of Matthes Bender, used with permission.
# See accompanying file "TRADEMARK" for details.
#
# To redistribute this file separately, substitute the full license texts
# for the above references.
# Locate SDL_Mixer 2.
# This module defines
# SDL2Mixer_INCLUDE_DIRS - a list of directories that need to be added to the include path
# SDL2Mixer_LIBRARIES - a list of libraries to link against to use SDL2
# SDL2Mixer_FOUND - if false, SDL2 cannot be used
if(SDL2Mixer_FIND_QUIETLY)
set(_FIND_SDL2_ARG QUIET)
endif()
find_package(SDL2 ${_FIND_SDL2_ARG})
find_path(SDL2Mixer_INCLUDE_DIR SDL_mixer.h PATH_SUFFIXES SDL2 HINTS ENV SDL2DIR)
mark_as_advanced(SDL2Mixer_INCLUDE_DIR)
find_library(SDL2Mixer_LIBRARY SDL2_mixer HINTS ENV SDL2DIR)
mark_as_advanced(SDL2Mixer_LIBRARY)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SDL2Mixer REQUIRED_VARS SDL2Mixer_LIBRARY SDL2Mixer_INCLUDE_DIR
SDL2_LIBRARIES SDL2_INCLUDE_DIRS)
if (SDL2Mixer_FOUND)
set(SDL2Mixer_LIBRARIES ${SDL2Mixer_LIBRARY} ${SDL2_LIBRARIES})
set(SDL2Mixer_INCLUDE_DIRS ${SDL2Mixer_INCLUDE_DIR} ${SDL2_INCLUDE_DIRS})
endif()

View File

@ -1,104 +0,0 @@
##################################################################################################
#
# Copyright (c) 2013, Open Source Robotics Foundation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# Redistributions in binary form must reproduce the above copyright notice, this
# list of conditions and the following disclaimer in the documentation and/or
# other materials provided with the distribution.
#
# Neither the name of the {organization} nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
##################################################################################################
# CMake script for finding TinyXML.
#
# Input variables:
#
# - TinyXML_ROOT_DIR (optional): When specified, header files and libraries will be searched for in
# ${TinyXML_ROOT_DIR}/include
# ${TinyXML_ROOT_DIR}/libs
# respectively, and the default CMake search order will be ignored. When unspecified, the default
# CMake search order is used.
# This variable can be specified either as a CMake or environment variable. If both are set,
# preference is given to the CMake variable.
# Use this variable for finding packages installed in a nonstandard location, or for enforcing
# that one of multiple package installations is picked up.
#
#
# Cache variables (not intended to be used in CMakeLists.txt files)
#
# - TinyXML_INCLUDE_DIR: Absolute path to package headers.
# - TinyXML_LIBRARY: Absolute path to library.
#
#
# Output variables:
#
# - TinyXML_FOUND: Boolean that indicates if the package was found
# - TinyXML_INCLUDE_DIRS: Paths to the necessary header files
# - TinyXML_LIBRARIES: Package libraries
#
#
# Example usage:
#
# find_package(TinyXML)
# if(NOT TinyXML_FOUND)
# # Error handling
# endif()
# ...
# include_directories(${TinyXML_INCLUDE_DIRS} ...)
# ...
# target_link_libraries(my_target ${TinyXML_LIBRARIES})
#
##################################################################################################
# Get package location hint from environment variable (if any)
if(NOT TinyXML_ROOT_DIR AND DEFINED ENV{TinyXML_ROOT_DIR})
set(TinyXML_ROOT_DIR "$ENV{TinyXML_ROOT_DIR}" CACHE PATH
"TinyXML base directory location (optional, used for nonstandard installation paths)")
endif()
# Search path for nonstandard package locations
if(TinyXML_ROOT_DIR)
set(TinyXML_INCLUDE_PATH PATHS "${TinyXML_ROOT_DIR}/include" NO_DEFAULT_PATH)
set(TinyXML_LIBRARY_PATH PATHS "${TinyXML_ROOT_DIR}/lib" NO_DEFAULT_PATH)
endif()
# Find headers and libraries
find_path(TinyXML_INCLUDE_DIR NAMES tinyxml.h PATH_SUFFIXES "tinyxml" ${TinyXML_INCLUDE_PATH})
find_library(TinyXML_LIBRARY NAMES tinyxml PATH_SUFFIXES "tinyxml" ${TinyXML_LIBRARY_PATH})
mark_as_advanced(TinyXML_INCLUDE_DIR
TinyXML_LIBRARY)
# Output variables generation
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(TinyXML DEFAULT_MSG TinyXML_LIBRARY
TinyXML_INCLUDE_DIR)
set(TinyXML_FOUND ${TINYXML_FOUND}) # Enforce case-correctness: Set appropriately cased variable...
unset(TINYXML_FOUND) # ...and unset uppercase variable generated by find_package_handle_standard_args
if(TinyXML_FOUND)
set(TinyXML_INCLUDE_DIRS ${TinyXML_INCLUDE_DIR})
set(TinyXML_LIBRARIES ${TinyXML_LIBRARY})
endif()

View File

@ -1,46 +0,0 @@
# OpenClonk, http://www.openclonk.org
#
# Copyright (c) 2012-2016, The OpenClonk Team and contributors
#
# Distributed under the terms of the ISC license; see accompanying file
# "COPYING" for details.
#
# "Clonk" is a registered trademark of Matthes Bender, used with permission.
# See accompanying file "TRADEMARK" for details.
#
# To redistribute this file separately, substitute the full license texts
# for the above references.
# - Find libupnp
# Find the libupnp library
# This module defines
# UPNP_INCLUDE_DIR, where to find upnp.h, etc.
# UPNP_LIBRARIES, the libraries needed to use libupnp.
# UPNP_FOUND, If false, do not try to use libupnp.
# TODO: Use pkg-config if available
if(WIN32)
CHECK_INCLUDE_FILE_CXX(natupnp.h HAVE_NATIVE_NATUPNP)
if(NOT HAVE_NATIVE_NATUPNP)
SET(UPNP_INCLUDE_DIR "thirdparty/natupnp")
else()
SET(UPNP_INCLUDE_DIR)
endif()
SET(UPNP_LIBRARIES)
SET(UPNP_FOUND TRUE)
SET(UPNP_STYLE "Win32")
else()
find_path(UPNP_INCLUDE_DIR NAMES miniupnpc.h PATH_SUFFIXES miniupnpc)
set(UPNP_NAMES ${UPNP_NAMES} miniupnpc)
find_library(UPNP_LIBRARY NAMES ${UPNP_NAMES})
if(UPNP_LIBRARY)
SET(UPNP_FOUND TRUE)
set(UPNP_LIBRARIES ${UPNP_LIBRARY})
set(UPNP_INCLUDE_DIR ${UPNP_INCLUDE_DIR})
set(UPNP_STYLE "miniupnpc")
endif()
endif()
mark_as_advanced(UPNP_LIBRARY UPNP_INCLUDE_DIR)

View File

@ -1,113 +0,0 @@
# - Find zlib
# Find the native ZLIB includes and library.
# Once done this will define
#
# ZLIB_INCLUDE_DIRS - where to find zlib.h, etc.
# ZLIB_LIBRARIES - List of libraries when using zlib.
# ZLIB_FOUND - True if zlib found.
#
# ZLIB_VERSION_STRING - The version of zlib found (x.y.z)
# ZLIB_VERSION_MAJOR - The major version of zlib
# ZLIB_VERSION_MINOR - The minor version of zlib
# ZLIB_VERSION_PATCH - The patch version of zlib
# ZLIB_VERSION_TWEAK - The tweak version of zlib
#
# The following variable are provided for backward compatibility
#
# ZLIB_MAJOR_VERSION - The major version of zlib
# ZLIB_MINOR_VERSION - The minor version of zlib
# ZLIB_PATCH_VERSION - The patch version of zlib
#
# An includer may set ZLIB_ROOT to a zlib installation root to tell
# this module where to look.
#=============================================================================
# CMake - Cross Platform Makefile Generator
# Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
# nor the names of their contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#=============================================================================
set(_ZLIB_SEARCHES)
# Search ZLIB_ROOT first if it is set.
if(ZLIB_ROOT)
set(_ZLIB_SEARCH_ROOT PATHS ${ZLIB_ROOT} NO_DEFAULT_PATH)
list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_ROOT)
endif()
# Normal search.
set(_ZLIB_SEARCH_NORMAL
PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Zlib;InstallPath]"
"$ENV{PROGRAMFILES}/zlib"
)
list(APPEND _ZLIB_SEARCHES _ZLIB_SEARCH_NORMAL)
set(ZLIB_NAMES z zlib zlibstatic zdll zlib1 zlibd zlibd1)
# Try each search configuration.
foreach(search ${_ZLIB_SEARCHES})
find_path(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include)
find_library(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ${${search}} PATH_SUFFIXES lib)
endforeach()
mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
if(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h")
file(STRINGS "${ZLIB_INCLUDE_DIR}/zlib.h" ZLIB_H REGEX "^#define ZLIB_VERSION \"[^\"]*\"$")
string(REGEX REPLACE "^.*ZLIB_VERSION \"([0-9]+).*$" "\\1" ZLIB_VERSION_MAJOR "${ZLIB_H}")
string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_MINOR "${ZLIB_H}")
string(REGEX REPLACE "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" ZLIB_VERSION_PATCH "${ZLIB_H}")
set(ZLIB_VERSION_STRING "${ZLIB_VERSION_MAJOR}.${ZLIB_VERSION_MINOR}.${ZLIB_VERSION_PATCH}")
# only append a TWEAK version if it exists:
set(ZLIB_VERSION_TWEAK "")
if( "${ZLIB_H}" MATCHES "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+).*$")
set(ZLIB_VERSION_TWEAK "${CMAKE_MATCH_1}")
set(ZLIB_VERSION_STRING "${ZLIB_VERSION_STRING}.${ZLIB_VERSION_TWEAK}")
endif()
set(ZLIB_MAJOR_VERSION "${ZLIB_VERSION_MAJOR}")
set(ZLIB_MINOR_VERSION "${ZLIB_VERSION_MINOR}")
set(ZLIB_PATCH_VERSION "${ZLIB_VERSION_PATCH}")
endif()
# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB REQUIRED_VARS ZLIB_LIBRARY ZLIB_INCLUDE_DIR
VERSION_VAR ZLIB_VERSION_STRING)
if(ZLIB_FOUND)
set(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
set(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
endif()

View File

@ -1,89 +0,0 @@
# OpenClonk, http://www.openclonk.org
#
# Copyright (c) 2012-2016, The OpenClonk Team and contributors
#
# Distributed under the terms of the ISC license; see accompanying file
# "COPYING" for details.
#
# "Clonk" is a registered trademark of Matthes Bender, used with permission.
# See accompanying file "TRADEMARK" for details.
#
# To redistribute this file separately, substitute the full license texts
# for the above references.
function(git_get_changeset_id VAR)
find_package(Git QUIET)
if (GIT_FOUND)
execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND "${GIT_EXECUTABLE}" "rev-parse" "HEAD"
RESULT_VARIABLE GIT_RESULT
OUTPUT_VARIABLE C4REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
if(GIT_RESULT EQUAL 0)
string(SUBSTRING "${C4REVISION}" 0 12 C4REVISION)
execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND "${GIT_EXECUTABLE}" "status" "--porcelain"
OUTPUT_VARIABLE GIT_STATUS
)
string(REGEX MATCH "^[MADRC ][MD ]" WORKDIR_DIRTY "${GIT_STATUS}")
execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND "${GIT_EXECUTABLE}" "rev-parse" "--git-path" "index"
OUTPUT_VARIABLE GIT_INDEX
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set_property(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS
"${GIT_INDEX}"
)
execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND "${GIT_EXECUTABLE}" "show" "--format=%ci" "-s" "HEAD"
OUTPUT_VARIABLE GIT_TIMESTAMP
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(DEFINED ENV{C4REVISION_BRANCH})
set(GIT_BRANCH "$ENV{C4REVISION_BRANCH}")
else()
execute_process(WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND "${GIT_EXECUTABLE}" "symbolic-ref" "--short" "HEAD"
RESULT_VARIABLE GIT_RESULT
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT GIT_RESULT EQUAL 0)
set(GIT_BRANCH "unknown")
endif()
endif()
endif()
endif()
if (NOT C4REVISION)
# Git not found or not a git workdir
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/.git_archival" C4REVISION
LIMIT_COUNT 1
REGEX "node: [0-9a-f]+"
)
string(LENGTH "${C4REVISION}" revlength)
if(revlength LESS 18)
set(C4REVISION "unknown")
message(WARNING "Could not retrieve git revision. Please set GIT_EXECUTABLE!")
else()
string(SUBSTRING "${C4REVISION}" 6 12 C4REVISION)
endif()
unset(revlength)
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/.git_archival" C4REVISION_TS
LIMIT_COUNT 1
REGEX "date: .+"
)
string(SUBSTRING "${C4REVISION_TS}" 6 -1 GIT_TIMESTAMP)
set(GIT_BRANCH "unknown")
endif()
if(WORKDIR_DIRTY)
set(WORKDIR_DIRTY 1)
endif()
set(${VAR} "${C4REVISION}" PARENT_SCOPE)
set(${VAR}_DIRTY ${WORKDIR_DIRTY} PARENT_SCOPE)
set(${VAR}_TS "${GIT_TIMESTAMP}" PARENT_SCOPE)
set(${VAR}_BRANCH "${GIT_BRANCH}" PARENT_SCOPE)
endfunction()

View File

@ -1,37 +0,0 @@
# OpenClonk, http://www.openclonk.org
#
# Copyright (c) 2018, The OpenClonk Team and contributors
#
# Distributed under the terms of the ISC license; see accompanying file
# "COPYING" for details.
#
# "Clonk" is a registered trademark of Matthes Bender, used with permission.
# See accompanying file "TRADEMARK" for details.
#
# To redistribute this file separately, substitute the full license texts
# for the above references.
# GCC6 doesn't work well with CMake while cross-compiling. See bugs:
# https://gitlab.kitware.com/cmake/cmake/issues/16291
# https://gitlab.kitware.com/cmake/cmake/issues/16919
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129
function(HANDLE_GCC_CROSS_INCLUDE_PATHS _lang _gcc_lang_flag)
set(_compiler "${CMAKE_${_lang}_COMPILER}")
set(_compile_flags "${CMAKE_${_lang}_FLAGS}")
separate_arguments(_compile_flags UNIX_COMMAND "${_compile_flags}")
execute_process(
COMMAND ${_compiler} ${_compile_flags} -v -E -x ${_gcc_lang_flag} /dev/null
OUTPUT_QUIET
ERROR_VARIABLE _compiler_output
)
if ("${_compiler_output}" MATCHES "#include <\\.\\.\\.> search starts here:\n *(.*)\nEnd of search list\\.")
string(REGEX REPLACE "[\n ]+" " " _search_list "${CMAKE_MATCH_1}")
separate_arguments(_search_list)
foreach(_directory ${_search_list})
get_filename_component(_fixed_component "${_directory}" REALPATH)
set(_resolved_list ${_resolved_list} "${_fixed_component}")
endforeach()
set(CMAKE_${_lang}_IMPLICIT_INCLUDE_DIRECTORIES ${CMAKE_${_lang}_IMPLICIT_INCLUDE_DIRECTORIES} ${_resolved_list} PARENT_SCOPE)
endif()
endfunction()

View File

@ -1,21 +0,0 @@
# OpenClonk, http://www.openclonk.org
#
# Copyright (c) 2013-2016, The OpenClonk Team and contributors
#
# Distributed under the terms of the ISC license; see accompanying file
# "COPYING" for details.
#
# "Clonk" is a registered trademark of Matthes Bender, used with permission.
# See accompanying file "TRADEMARK" for details.
#
# To redistribute this file separately, substitute the full license texts
# for the above references.
include(CheckCXXSourceCompiles)
macro(REQUIRE_CXX_SOURCE_COMPILES _code _var)
CHECK_CXX_SOURCE_COMPILES("${_code}" ${_var})
if(NOT ${_var})
unset(${_var} CACHE)
MESSAGE(FATAL_ERROR "${_var} is required for this project to build properly.${ARGN} Aborting.")
endif()
endmacro()

View File

@ -1,53 +0,0 @@
# OpenClonk, http://www.openclonk.org
#
# Copyright (c) 2009-2016, The OpenClonk Team and contributors
#
# Distributed under the terms of the ISC license; see accompanying file
# "COPYING" for details.
#
# "Clonk" is a registered trademark of Matthes Bender, used with permission.
# See accompanying file "TRADEMARK" for details.
#
# To redistribute this file separately, substitute the full license texts
# for the above references.
include(Version.txt)
############################################################################
# Get revision from Git
############################################################################
include(GitGetChangesetID)
git_get_changeset_id(C4REVISION)
############################################################################
# Get year
############################################################################
STRING(TIMESTAMP C4COPYRIGHT_YEAR "%Y")
############################################################################
# Build version strings
############################################################################
SET(C4ENGINEID "${C4PROJECT_TLD}.${C4PROJECT_DOMAIN}.${C4ENGINENICK}")
set(C4ENGINECAPTION "${C4ENGINENAME}")
set(C4VERSION "${C4XVER1}.${C4XVER2}")
if(C4VERSIONEXTRA)
set(C4VERSION "${C4VERSION}-${C4VERSIONEXTRA}")
endif()
if(WIN32)
set(C4VERSION "${C4VERSION} win")
elseif(APPLE)
set(C4VERSION "${C4VERSION} mac")
elseif(UNIX)
set(C4VERSION "${C4VERSION} unix")
else()
set(C4VERSION "${C4VERSION} strange")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/C4Version.h.in ${CMAKE_CURRENT_BINARY_DIR}/C4Version.h ESCAPE_QUOTES)
if(WIN32)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/res/WindowsGamesExplorer.xml.in ${CMAKE_CURRENT_BINARY_DIR}/WindowsGamesExplorer.xml ESCAPE_QUOTES)
endif()

View File

@ -1,31 +1,66 @@
/* Activate DebugRecs */
#cmakedefine DEBUGREC 1
/* Generate minidumps on crash */
#cmakedefine HAVE_DBGHELP 1
/* Define to 1 if you have the <direct.h> header file. */
#cmakedefine HAVE_DIRECT_H 1
/* Use backward-cpp to print stack traces on crash */
#cmakedefine HAVE_BACKWARD 1
/* The backtrace function is declared in execinfo.h and works */
/* Define to 1 if you have the <execinfo.h> header file. */
#cmakedefine HAVE_EXECINFO_H 1
/* Define to 1 if you have FreeType2. */
#cmakedefine HAVE_FREETYPE 1
/* Define to 1 if you have the <history.h> header file. */
#cmakedefine HAVE_HISTORY_H 1
/* Define if you have the iconv() function. */
#cmakedefine HAVE_ICONV 1
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H 1
/* Define to 1 if you have the <io.h> header file. */
#cmakedefine HAVE_IO_H 1
/* Define to 1 if you have the <langinfo.h> header file. */
#cmakedefine HAVE_LANGINFO_H 1
/* Define if you have a readline compatible library */
#cmakedefine HAVE_LIBREADLINE 1
/* Define to 1 if you have SDL_mixer. */
#cmakedefine HAVE_LIBSDL_MIXER 1
/* Define to 1 if FMOD is available */
#cmakedefine HAVE_FMOD 1
/* Define to 1 if you have the <locale.h> header file. */
#cmakedefine HAVE_LOCALE_H 1
/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine HAVE_MEMORY_H 1
/* Define to 1 if you have the <multimon.h> header file. */
#cmakedefine HAVE_MULTIMON_H 1
/* Define to 1 if you have the <poll.h> header file. */
#cmakedefine HAVE_POLL_H 1
/* Define if you have POSIX threads libraries and header files. */
#cmakedefine HAVE_PTHREAD 1
/* Define to 1 if you have the <readline.h> header file. */
#cmakedefine HAVE_READLINE_H 1
/* Define if your readline library has \`add_history' */
#cmakedefine HAVE_READLINE_HISTORY 1
/* Define to 1 if you have the <readline/history.h> header file. */
#cmakedefine HAVE_READLINE_HISTORY_H 1
/* Define to 1 if you have the <readline/readline.h> header file. */
#cmakedefine HAVE_READLINE_READLINE_H 1
/* Define to 1 if you have SDL. */
#cmakedefine HAVE_SDL 1
@ -35,11 +70,20 @@
/* Define to 1 if you have the <signal.h> header file. */
#cmakedefine HAVE_SIGNAL_H 1
/* Define to 1 if you have the <sys/eventfd.h> header file. */
#cmakedefine HAVE_SYS_EVENTFD_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H 1
/* Define to 1 if you have the <sys/file.h> header file. */
#cmakedefine HAVE_SYS_FILE_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H 1
/* inotify reachable using syscall */
#cmakedefine HAVE_SYSCALL_INOTIFY 1
/* Define to 1 if you have the <sys/inotify.h> header file. */
#cmakedefine HAVE_SYS_INOTIFY_H 1
@ -50,8 +94,8 @@
/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/timerfd.h> header file. */
#cmakedefine HAVE_SYS_TIMERFD_H 1
/* Define to 1 if you have the <sys/syscall.h> header file. */
#cmakedefine HAVE_SYS_SYSCALL_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H 1
@ -62,55 +106,94 @@
/* Define to 1 if you have the `vasprintf' function. */
#cmakedefine HAVE_VASPRINTF 1
/* Define to 1 if you have the <X11/extensions/xf86vmode.h> header file. */
#cmakedefine HAVE_X11_EXTENSIONS_XF86VMODE_H 1
/* Define to 1 if you have the <X11/extensions/Xrandr.h> header file. */
#cmakedefine HAVE_X11_EXTENSIONS_XRANDR_H 1
/* Define to 1 if you have the <X11/keysym.h> header file. */
#cmakedefine HAVE_X11_KEYSYM_H 1
/* Define to 1 if you have the <X11/xpm.h> header file. */
#cmakedefine HAVE_X11_XPM_H 1
/* Define as const if the declaration of iconv() needs const. */
#cmakedefine ICONV_CONST
/* compile without debug options */
#cmakedefine NDEBUG 1
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#cmakedefine NO_MINUS_C_MINUS_O 1
/* Define to the address where bug reports for this package should be sent. */
#cmakedefine PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#cmakedefine PACKAGE_NAME
/* Define to the full name and version of this package. */
#cmakedefine PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#cmakedefine PACKAGE_TARNAME
/* Define to the version of this package. */
#cmakedefine PACKAGE_VERSION
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
#cmakedefine PTHREAD_CREATE_JOINABLE
/* Define to 1 if you have the ANSI C header files. */
#cmakedefine STDC_HEADERS 1
/* dedicated server mode */
#cmakedefine USE_CONSOLE 1
/* DirectX graphics */
#cmakedefine USE_DIRECTX 1
/* OpenGL graphics */
#cmakedefine USE_GL 1
/* MP3 music */
#cmakedefine USE_MP3 1
/* Define to 1 if the userParam parameter to GLDEBUGPROCARB is const, as the
spec requires. */
#cmakedefine GLDEBUGPROCARB_USERPARAM_IS_CONST 1
/* Define to 1 if SDL is used for the main loop */
#cmakedefine USE_SDL_MAINLOOP 1
/* Define to 1 if the X Window System is used */
#cmakedefine USE_X11 1
/* Developer mode */
#cmakedefine WITH_DEVELOPER_MODE 1
/* Glib */
#cmakedefine WITH_GLIB 1
/* compile with debug options */
#cmakedefine _DEBUG 1
/* Use GTK+3 for the developer mode */
#cmakedefine WITH_GTK3 1
#ifndef USE_CONSOLE
/* The widgets for the windows and the editor GUI */
#cmakedefine USE_SDL_MAINLOOP 1
#cmakedefine USE_WIN32_WINDOWS 1
#cmakedefine USE_COCOA 1
#cmakedefine USE_GTK 1
/* Enable automatic update system */
/* Enable the automatic update system */
#cmakedefine WITH_AUTOMATIC_UPDATE 1
#cmakedefine WITH_APPDIR_INSTALLATION 1
/* Select an audio provider */
#define AUDIO_TK AUDIO_TK_${Audio_TK_UPPER}
#else
#define AUDIO_TK AUDIO_TK_NONE
#endif // USE_CONSOLE
/* Define to 1 if the X Window System is missing or not being used. */
#cmakedefine X_DISPLAY_MISSING 1
#define AUDIO_TK_NONE 0
#define AUDIO_TK_OPENAL 1
#define AUDIO_TK_SDL_MIXER 3
/* compile with debug options */
#cmakedefine _DEBUG
/* Include OpenAL extensions (alext.h) for sound modifiers */
#cmakedefine HAVE_ALEXT 1
/* Define to 1 if rvalue references are supported */
#cmakedefine HAVE_RVALUE_REF 1
/* Path to data directory */
#ifdef WITH_APPDIR_INSTALLATION
#define OC_SYSTEM_DATA_DIR "../share/games/openclonk"
#else
#define OC_SYSTEM_DATA_DIR "${CMAKE_INSTALL_PREFIX}/share/games/openclonk"
#endif
/* Define to 1 if you have support for precompiled headers */
#cmakedefine HAVE_PRECOMPILED_HEADERS 1
/* Path to /proc/self/exe (Linux) or equivalent */
#cmakedefine PROC_SELF_EXE "${PROC_SELF_EXE}"
/* Define to 1 if you have support for nullptr. */
#cmakedefine HAVE_NULLPTR 1
/* Generate minidumps on crash */
#cmakedefine GENERATE_MINI_DUMP 1

197
config.h.in 100644
View File

@ -0,0 +1,197 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Activate DebugRecs */
#undef DEBUGREC
/* define if the Boost library is available */
#undef HAVE_BOOST
/* Define to 1 if you have the <direct.h> header file. */
#undef HAVE_DIRECT_H
/* The backtrace function is declared in execinfo.h and works */
#undef HAVE_EXECINFO_H
/* Define to 1 if you have FreeType2. */
#undef HAVE_FREETYPE
/* Define to 1 if you have the <history.h> header file. */
#undef HAVE_HISTORY_H
/* Define if you have the iconv() function. */
#undef HAVE_ICONV
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <io.h> header file. */
#undef HAVE_IO_H
/* Define to 1 if you have the <langinfo.h> header file. */
#undef HAVE_LANGINFO_H
/* Define if you have a readline compatible library */
#undef HAVE_LIBREADLINE
/* Define to 1 if you have SDL_mixer. */
#undef HAVE_LIBSDL_MIXER
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <multimon.h> header file. */
#undef HAVE_MULTIMON_H
/* Define to 1 if you have the <poll.h> header file. */
#undef HAVE_POLL_H
/* Define if you have POSIX threads libraries and header files. */
#undef HAVE_PTHREAD
/* Define to 1 if you have the <readline.h> header file. */
#undef HAVE_READLINE_H
/* Define if your readline library has \`add_history' */
#undef HAVE_READLINE_HISTORY
/* Define to 1 if you have the <readline/history.h> header file. */
#undef HAVE_READLINE_HISTORY_H
/* Define to 1 if you have the <readline/readline.h> header file. */
#undef HAVE_READLINE_READLINE_H
/* C++ Compiler has rvalue references, a C++0x feature. */
#undef HAVE_RVALUE_REF
/* Define to 1 if you have SDL. */
#undef HAVE_SDL
/* Define to 1 if you have the <share.h> header file. */
#undef HAVE_SHARE_H
/* Define to 1 if you have the <signal.h> header file. */
#undef HAVE_SIGNAL_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* inotify reachable using syscall */
#undef HAVE_SYSCALL_INOTIFY
/* Define to 1 if you have the <sys/inotify.h> header file. */
#undef HAVE_SYS_INOTIFY_H
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/syscall.h> header file. */
#undef HAVE_SYS_SYSCALL_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `vasprintf' function. */
#undef HAVE_VASPRINTF
/* Define to 1 if you have the <X11/extensions/xf86vmode.h> header file. */
#undef HAVE_X11_EXTENSIONS_XF86VMODE_H
/* Define to 1 if you have the <X11/extensions/Xrandr.h> header file. */
#undef HAVE_X11_EXTENSIONS_XRANDR_H
/* Define to 1 if you have the <X11/keysym.h> header file. */
#undef HAVE_X11_KEYSYM_H
/* Define to 1 if you have the <X11/xpm.h> header file. */
#undef HAVE_X11_XPM_H
/* Define as const if the declaration of iconv() needs const. */
#undef ICONV_CONST
/* compile without debug options */
#undef NDEBUG
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
#undef PTHREAD_CREATE_JOINABLE
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* dedicated server mode */
#undef USE_CONSOLE
/* DirectX graphics */
#undef USE_DIRECTX
/* Wether FMOD shall be used */
#undef USE_FMOD
/* OpenGL graphics */
#undef USE_GL
/* MP3 music */
#undef USE_MP3
/* OpenAL sound */
#undef USE_OPEN_AL
/* Define to 1 if SDL is used for the main loop */
#undef USE_SDL_MAINLOOP
/* Define to 1 if the X Window System is used */
#undef USE_X11
/* Enable automatic update system */
#undef WITH_AUTOMATIC_UPDATE
/* Developer mode */
#undef WITH_DEVELOPER_MODE
/* Glib */
#undef WITH_GLIB
/* Define to 1 if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING
/* compile with debug options */
#undef _DEBUG

356
configure.ac 100644
View File

@ -0,0 +1,356 @@
dnl Copyright (c) 2005-2009, RedWolf Design GmbH, http://www.clonk.de
dnl Permission to use, copy, modify, and/or distribute this software for any
dnl purpose with or without fee is hereby granted, provided that the above
dnl copyright notice and this permission notice appear in all copies.
dnl THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
dnl WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
dnl MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
dnl ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
dnl WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
dnl ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
dnl OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(clonk, 5)
AC_COPYRIGHT([©2005-2010 Günther Brammer])
AC_CONFIG_SRCDIR([/src/C4Game.cpp])
AC_CONFIG_AUX_DIR([autotools])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_FILES([Makefile])
AC_CANONICAL_HOST
dnl foreign to tell automake to shut up,
dnl and subdir-objects because it makes the Makefile smaller.
dnl no-define because PACKAGE and VERSION are not used
AM_INIT_AUTOMAKE([foreign nostdinc no-define 1.10])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_PROG_CXX
AC_LANG([C++])
AX_CHECK_COMPILER_FLAGS([-std=gnu++0x], [CXX="${CXX} -std=gnu++0x"])
AC_COMPILE_IFELSE([
void f(struct D&&); int main() { return 0; }
], [AC_DEFINE([HAVE_RVALUE_REF], [], [C++ Compiler has rvalue references, a C++0x feature.])], [AX_PROG_CXX_REFTOTEMP])
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_RANLIB
case $host in
*-*-mingw32* | *-*-cygwin* | *-*-windows*)
win32=true; osx=false;;
*-*-darwin*)
win32=false; osx=true;
m4_ifdef([AC_PROG_OBJCXX], [AC_PROG_OBJCXX], [AC_MSG_ERROR([this configure script was created with an autoconf version older than 2.65 and does not support macosx.])])
;;
*)
win32=false; osx=false;;
esac
# Detect Wine. Unfortunately, at the moment winegcc does not meet the demands
AC_CHECK_HEADER([windows.h], [win32=true], [], [[ ]])
AM_CONDITIONAL(WIN32, [test $win32 = true])
AM_CONDITIONAL(MACOSX, [test $osx = true])
# various used headers
dnl the whitespace is there to prevent AC_INCLUDES_DEFAULT
AC_CHECK_HEADERS([stdint.h unistd.h poll.h sys/stat.h sys/types.h locale.h sys/socket.h signal.h langinfo.h sys/inotify.h sys/syscall.h], , , [[ ]])
# Mingw does not ship with multimon.h
AC_CHECK_HEADERS([multimon.h io.h direct.h share.h], [], [], [[#include <windows.h>]])
# iconv
AX_ICONV
# vasprintf is a GNU extension
AC_CHECK_FUNCS(vasprintf)
# so is execinfo.h - and some systems have the header despite the functions not being in the c library
AC_CHECK_HEADER(execinfo.h)
if test "x$ac_cv_header_execinfo_h" = xyes; then
AC_CHECK_FUNC(backtrace, [], [
AC_CHECK_LIB(execinfo, backtrace, [
CLONK_LIBS="-lexecinfo $CLONK_LIBS"
], [
ac_cv_header_execinfo_h=no
])
])
fi
if test "x$ac_cv_header_execinfo_h" = xyes; then
AC_DEFINE(HAVE_EXECINFO_H, 1, [The backtrace function is declared in execinfo.h and works])
fi
AC_ARG_ENABLE([debug],
[AC_HELP_STRING([--enable-debug], [debugging options [default=no]])],
, [enable_debug=no])
if test $enable_debug = yes; then
AC_DEFINE([_DEBUG], 1, [compile with debug options])
else
AC_DEFINE([NDEBUG], 1, [compile without debug options])
fi
AC_ARG_ENABLE([debugrec],
[AC_HELP_STRING([--enable-debugrec], [write additional debug control to records [default=no]])],
, [enable_debugrec=no])
if test $enable_debugrec = yes; then
AC_DEFINE([DEBUGREC], 1, [Activate DebugRecs])
fi
AC_ARG_ENABLE([console],
[AC_HELP_STRING([--enable-console],[compile as pure console application [default=no]])],
, [enable_console=no])
AC_ARG_ENABLE([sound],
[AC_HELP_STRING([--enable-sound],[compile with sound support [default=yes]])],
, [if test $enable_console = yes; then enable_sound=no; else if test $win32 = true; then enable_sound=no; else enable_sound=yes; fi; fi])
# GTK+
GTK_REQUIRED="glib-2.0 >= 2.4 gtk+-2.0 >= 2.4"
AC_ARG_WITH([gtk],
[AC_HELP_STRING([--with-gtk], [Use gtk for the developer mode [default=auto]])],
, [AS_IF([test $enable_console = no],[PKG_CHECK_EXISTS([$GTK_REQUIRED], [with_gtk=yes], [with_gtk=no])],[with_gtk=no])])
AS_IF([test $with_gtk = yes],[
PKG_CHECK_MODULES(GTK, [$GTK_REQUIRED])
AC_DEFINE([WITH_GLIB], 1, [Glib])
AC_DEFINE([WITH_DEVELOPER_MODE], 1, [Developer mode])
DEVELOPER_MODE=true
])
AM_CONDITIONAL(DEVELOPER_MODE, [test $with_gtk = yes])
# OpenAL
AC_ARG_WITH([openal],
[AC_HELP_STRING([--with-openal],[compile with openal support [default=no]])],
, [with_openal=no])
if test $with_openal = yes; then
PKG_CHECK_MODULES(OPENAL, [vorbis vorbisfile openal])
AC_DEFINE([USE_OPEN_AL], 1, [OpenAL sound])
if test $enable_sound = no; then
AC_MSG_ERROR([--with-openal cannot be used with --disable-sound.])
fi
fi
# SDL
with_sdl_mixer=no
AC_ARG_WITH([sdl],
AS_HELP_STRING([--with-sdl], [Use SDL @<:@default=yes (no for win32)@:>@]),
, [if test $win32 = true; then with_sdl=no; else if test $enable_console = yes; then with_sdl=no; else with_sdl=yes; fi fi])
if test $with_sdl = yes; then
# Check for SDL
SDL_VERSION=1.2.0
AM_PATH_SDL($SDL_VERSION,
[AC_DEFINE(HAVE_SDL, 1, [Define to 1 if you have SDL.])],
[AC_MSG_ERROR([libSDL not found.])])
AC_SUBST(SDL_CFLAGS)
AC_SUBST(SDL_LIBS)
if test $enable_sound = yes && test $with_openal = no; then
# Check for SDL_mixer library
AC_CHECK_LIB(SDL_mixer, Mix_OpenAudio,
[AC_DEFINE(HAVE_LIBSDL_MIXER,1,[Define to 1 if you have SDL_mixer.])
SDL_LIBS="-lSDL_mixer $SDL_LIBS"
with_sdl_mixer=yes],
[AC_MSG_ERROR([SDL_mixer not found.])],
[$SDL_LIBS])
fi
AC_ARG_ENABLE(sdlmainloop,
[AC_HELP_STRING([--enable-sdlmainloop],[use SDL instead of X11 or Win32 [default=no]])],
, [if test $osx = true; then enable_sdlmainloop=yes; else enable_sdlmainloop=no; fi ])
else
enable_sdlmainloop=no
fi
if test $enable_sdlmainloop = yes; then
with_x=no
AC_DEFINE(USE_SDL_MAINLOOP, 1, [Define to 1 if SDL is used for the main loop])
fi
AM_CONDITIONAL(SDL_MAIN_LOOP, [test $enable_sdlmainloop = yes])
if test $enable_sound = yes; then
AC_ARG_ENABLE([mp3],
[AC_HELP_STRING([--enable-mp3],[enable mp3 support [default=no]])],
, [enable_mp3=no])
if test $enable_mp3 = yes; then
AC_DEFINE([USE_MP3], 1, [MP3 music])
fi
fi
if test $enable_console = no; then
if test $win32 = true; then
AC_SUBST(WINDOWS_CFLAGS, "-mwindows")
fi
else
# console mode
AC_DEFINE([USE_CONSOLE], 1, [dedicated server mode])
with_x=no
enable_sdlmainloop=no
VL_LIB_READLINE
fi
# Check for boost
AX_BOOST_BASE([1.40.0], [], [
AC_MSG_ERROR([Boost not found.])
])
# OpenSSL
AC_CHECK_LIB(crypto, BIO_new, [OPENSSL_LIBS="-lcrypto"],
[AC_MSG_ERROR([libcrypto (OpenSSL) not found.])])
# Check for libjpeg
AC_CHECK_LIB(jpeg, jpeg_read_header, [
CLONK_LIBS="-ljpeg $CLONK_LIBS"
], [
AC_MSG_ERROR([libjpeg not found.])
])
# Check for libpng
AC_CHECK_LIB(png, png_read_image, [
CLONK_LIBS="-lpng $CLONK_LIBS"
], [
AC_MSG_ERROR([libpng not found.])
], [-lz])
# Check for libz
AC_CHECK_LIB(z, deflate, [
Z_LIBS="-lz $Z_LIBS"
], [
AC_MSG_ERROR([libz not found.])
])
# Check for libfreetype
if test $enable_console = no; then
if test "$cross_compiling" = no; then
AC_CHECK_PROG(FREETYPE_CONFIG, freetype-config, freetype-config)
fi
if test $FREETYPE_CONFIG; then
AC_SUBST(FREETYPE_CFLAGS, [`$FREETYPE_CONFIG --cflags`])
AC_SUBST(FREETYPE_LIBS, [`$FREETYPE_CONFIG --libs`])
else
PKG_CHECK_MODULES(FREETYPE, freetype2)
fi
AC_DEFINE(HAVE_FREETYPE, 1, [Define to 1 if you have FreeType2.])
fi
# X11, Xpm, Xrandr
AC_PATH_XTRA
if test $have_x = yes; then
AC_DEFINE(USE_X11, 1, [Define to 1 if the X Window System is used])
CLONK_LIBS="$X_LIBS $CLONK_LIBS"
AC_CHECK_HEADERS([X11/keysym.h X11/extensions/xf86vmode.h X11/xpm.h X11/extensions/Xrandr.h], ,
[AC_MSG_ERROR([A required X11 header was not found.])], [[#include <X11/Xlib.h>]])
AC_CHECK_LIB(X11, XOpenDisplay, [CLONK_LIBS="-lX11 $CLONK_LIBS"],
[AC_MSG_ERROR([libX11 not found.])], [$X_LIBS])
AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData, [CLONK_LIBS="-lXpm $CLONK_LIBS"],
[AC_MSG_ERROR([libXpm not found.])], [$X_LIBS])
AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryVersion, [CLONK_LIBS="-lXxf86vm $CLONK_LIBS"],
[AC_MSG_ERROR([XF86VidMode not found.])], [$X_LIBS])
AC_CHECK_LIB(Xrandr, XRRQueryExtension, [CLONK_LIBS="-lXrandr $CLONK_LIBS"],
[AC_MSG_ERROR([libXrandr not found.])], [$X_LIBS])
fi
# OpenGL
AC_ARG_WITH([gl],
[AC_HELP_STRING([--with-gl],[compile with opengl support [default=yes]])],
, [if test $enable_console = yes; then with_gl=no; else with_gl=yes; fi])
if test $with_gl = yes; then
if test $osx = true; then
CLONK_LIBS="-framework OpenGL $CLONK_LIBS"
AC_CHECK_LIB(GLEW, glewInit, [CLONK_LIBS="-lGLEW $CLONK_LIBS"],
[AC_MSG_ERROR([glew not found.])])
elif test $win32 = true; then
AC_CHECK_LIB(opengl32, main, [CLONK_LIBS="-lopengl32 $CLONK_LIBS"],
[AC_MSG_ERROR([opengl32 not found.])])
AC_CHECK_LIB(glu32, main, [CLONK_LIBS="-lglu32 $CLONK_LIBS"],
[AC_MSG_ERROR([glu32 not found.])])
AC_CHECK_LIB(glew32, main, [CLONK_LIBS="-lglew32 $CLONK_LIBS"],
[AC_MSG_ERROR([glew not found.])])
AC_SUBST([GLEW_CFLAGS],["-DGLEW_STATIC"])
else
AC_CHECK_LIB(GL, glBegin, [CLONK_LIBS="-lGL $CLONK_LIBS"],
[AC_MSG_ERROR([libGL not found.])])
AC_CHECK_LIB(GLU, gluOrtho2D, [CLONK_LIBS="-lGLU $CLONK_LIBS"],
[AC_MSG_ERROR([libGLU not found.])])
AC_CHECK_LIB(GLEW, glewInit, [CLONK_LIBS="-lGLEW $CLONK_LIBS"],
[AC_MSG_ERROR([glew not found.])])
fi
AC_DEFINE([USE_GL], 1, [OpenGL graphics])
fi
# DirectX
AC_ARG_WITH([directx],
[AC_HELP_STRING([--with-directx],[compile with directx support [default=no]])],
, [with_directx="no"])
if test "$with_directx" = yes; then
AC_CHECK_LIB(d3d9, main, [CLONK_LIBS="-ld3d9 $CLONK_LIBS"],
[AC_MSG_ERROR([d3d9 not found.])])
AC_DEFINE([USE_DIRECTX], 1, [DirectX graphics])
fi
AC_ARG_WITH([automatic-update],
[AC_HELP_STRING([--with-automatic-update],[enable support for automatic engine updates [default=yes]])],
, [with_automatic_update="yes"])
if test "$with_automatic_update" = "yes"; then
AC_DEFINE([WITH_AUTOMATIC_UPDATE], 1, [Enable automatic update system])
fi
if test $win32 = false; then
# pthread
AX_PTHREAD( , [AC_MSG_ERROR([No pthread support.])])
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(PTHREAD_CFLAGS)
# inotify syscall workaround
AC_CHECK_DECL(SYS_inotify_init,
AC_DEFINE([HAVE_SYSCALL_INOTIFY], 1, [inotify reachable using syscall]),,
[#include <sys/syscall.h>])
# FMod is used for windows only
AM_CONDITIONAL(USE_FMOD, false)
else
# Windows
for WIN32LIB in gdi32 comdlg32 winmm ws2_32 vfw32
do
AC_CHECK_LIB([$WIN32LIB], main, [CLONK_LIBS="-l$WIN32LIB $CLONK_LIBS"], [AC_MSG_ERROR([$WIN32LIB not found.])])
done
# FMod (Library comes with standard)
if test "$enable_sound" = yes; then
AC_DEFINE([USE_FMOD], 1, [Wether FMOD shall be used])
fi
AM_CONDITIONAL(USE_FMOD, test "$enable_sound" = yes)
# windres
AC_CHECK_TOOL(WINDRES, windres, no)
if test $WINDRES = no; then
AC_MSG_ERROR([windres not found.])
fi
fi
AC_SUBST(CLONK_LIBS)
AC_SUBST(Z_LIBS)
AC_SUBST(OPENSSL_LIBS)
# precompiled headers and -Wextra
AC_MSG_CHECKING([whether we are using a GNU C++ compiler version 4.1 or newer])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#if defined(__GNUC__) && (((__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4))
// all ok
#else
choke me
#endif
]])], RECENT_GCC="yes", RECENT_GCC="no")
AC_MSG_RESULT([$RECENT_GCC])
AM_CONDITIONAL(RECENT_GCC, [test $RECENT_GCC = yes])
AC_OUTPUT
echo "Configuration:
Debug: $enable_debug
Debugrec: $enable_debugrec
Pure console: $enable_console
DirectX: $with_directx
OpenGL: $with_gl
Sound: $enable_sound
SDL_Mixer: $with_sdl_mixer
OpenAL: $with_openal
GTK+: $with_gtk
X11: $have_x"
if test "$enable_sdlmainloop" = yes; then echo " SDL: mainloop";
else echo " SDL: $with_sdl"; fi

25
debian/changelog vendored 100644
View File

@ -0,0 +1,25 @@
openclonk (5.1.1.0-0ubuntu1-ppa4) maverick; urgency=low
* Mercurial as Build Dependency
* Switch to cmake as build system
* Fixed spacing issues in $(CURDIR)
-- Sebastian Rühl <sebastian.ruehl@mni.fh-giessen.de> Sun, 31 Dec 2010 15:38:26 +0100
openclonk (5.1.1.0-0ubuntu1-ppa3) maverick; urgency=low
* Fixed Icons
-- Sebastian Rühl <sebastian.ruehl@mni.fh-giessen.de> Sun, 27 Dec 2010 15:23:05 +0200
openclonk (5.1.1.0-0ubuntu1-ppa2) maverick; urgency=low
* Added Icons
-- Sebastian Rühl <sebastian.ruehl@mni.fh-giessen.de> Sun, 27 Dec 2010 12:23:05 +0200
openclonk (5.1.1.0-0ubuntu1-ppa1) maverick; urgency=low
* Initial release
-- Sebastian Rühl <sebastian.ruehl@mni.fh-giessen.de> Sat, 25 Dec 2010 23:23:05 +0200

1
debian/compat vendored 100644
View File

@ -0,0 +1 @@
7

13
debian/control vendored 100644
View File

@ -0,0 +1,13 @@
Source: openclonk
Section: games
Priority: extra
Maintainer: Sebastian Rühl <sebastian.ruehl@mni.fh-giessen.de>
Build-Depends: debhelper (>= 7), cmake, make (>= 3.8), gcc (>= 4.3), g++ (>=4.3), automake, autoconf, libtool, libc6-dev (>= 2.9), libx11-dev, libxxf86vm-dev, libxrandr-dev, libxpm-dev, libglew1.5-dev, libgl1-mesa-dev, libpng12-dev, libssl-dev, libsdl1.2-dev, libsdl-mixer1.2-dev, libgtk2.0-dev, libjpeg62-dev, zlib1g-dev, libboost-dev, mercurial
Standards-Version: 3.8.0
Homepage: http://wiki.openclonk.org/w/Project
Package: openclonk
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: OpenClonk will be the Open source successor of the Clonk gaming series.
In early march 2009, Matthes Bender told the other developers of Clonk Rage that he wouldn't have any time to work on Clonk anymore. As the Game Designer of Clonk Rage and Directing Manager of RedWolf Design, the company selling the Clonk titles, he left a significant vacancy. The development of Clonk Rage was mostly done as a hobby by the other developers, and although they wanted to continue doing that, they felt that more contributors were needed. Thus it was decided to radically lower the barriers for new contributors by publishing the source code to the engine, allowing everyone to freely modify the source code and game content, and discuss the future directions in an open forum. It was also decided to drop a lot of the "old" game content and drop the backwards compatibility requirement. The goal is to encourage new people to participate, while allowing the Clonk Rage developers to continue working on at least some of the code they produced and are familiar with. There are also plans to continue the clonk.de league for registered players for those who want to play in a supervised league.

38
debian/copyright vendored 100644
View File

@ -0,0 +1,38 @@
This package was debianized by Sebastian Rühl <sebastian.ruehl@mni.fh-giessen.de> on
Sun, 31 May 2009 21:15:05 +0200.
It was downloaded from http://wiki.openclonk.org/
Upstream Author(s):
redwolf Design
Copyright:
redwolf Design
License:
This package is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this package; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
On Debian systems, the complete text of the GNU Lesser General
Public License can be found in `/usr/share/common-licenses/LGPL'.
The Debian packaging is copyright 2009, Sebastian Rühl <sebastian.ruehl@mni.fh-giessen.de> and
is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
# Please also look if there are files or directories which have a
# different copyright/license attached and list them here.

2
debian/dirs vendored 100644
View File

@ -0,0 +1,2 @@
usr/bin
usr/sbin

2
debian/docs vendored 100644
View File

@ -0,0 +1,2 @@
CMakeLists.txt
README.linux.txt

11
debian/openclonk.desktop vendored 100644
View File

@ -0,0 +1,11 @@
[Desktop Entry]
Version=1.0
Name=Open Clonk
GenericName=Game
Comment=OpenClonk is mainly about mining, settling and fast-paced melees.
Exec=clonk
Icon=c4x
StartupNotify=true
Terminal=false
Type=Application
Categories=GNOME;GTK;Game;JumpNRun;

2
debian/openclonk.install vendored 100644
View File

@ -0,0 +1,2 @@
src/res/c4x.xpm usr/share/pixmaps
debian/openclonk.desktop usr/share/applications

100
debian/rules vendored 100644
View File

@ -0,0 +1,100 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
builddir/Makefile:
dh_testdir
# Add here commands to configure the package.
#autoreconf -i && ./configure --with-gtk --without-automatic-update
cmake . -DWITH_AUTOMATIC_UPDATE=0
build: build-stamp
build-stamp: builddir/Makefile
dh_testdir
# Add here commands to compile the package.
$(MAKE)
#docbook-to-man debian/openclonk.sgml > openclonk.1
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
[ ! -f Makefile ] || $(MAKE) clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
# Add here commands to install the package into debian/openclonk.
#Make the dir where game data is stored
mkdir -p "$(CURDIR)"/debian/openclonk/usr/share/games/clonk
cp -r "$(CURDIR)"/planet/* "$(CURDIR)"/debian/openclonk/usr/share/games/clonk/
# Make the link
mkdir -p "$(CURDIR)"/debian/openclonk/usr/games
cp -a "$(CURDIR)"/clonk "$(CURDIR)"/debian/openclonk/usr/games/clonk.bin
ln -s /usr/games/clonk.bin "$(CURDIR)"/debian/openclonk/usr/share/games/clonk/clonk
echo '#!/bin/sh\n/usr/share/games/clonk/clonk $$@' > "$(CURDIR)"/debian/openclonk/usr/games/clonk
chmod a+x "$(CURDIR)"/debian/openclonk/usr/games/clonk
$(MAKE) c4group
./c4group "$(CURDIR)"/debian/openclonk/usr/share/games/clonk/* -p
# Build architecture-independent files here.
binary-indep: install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: install
dh_testdir
dh_testroot
dh_installchangelogs
# dh_installdocs
dh_installexamples
dh_install
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_python
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install

View File

@ -1,15 +1,8 @@
# German and English online docs:
# make all
# make install prefix=/path/to/webspace
# The offline docs:
# make chm HHC=/path/to/hhc.exe
# Only English online docs, which can be partially updated:
# make online-en
# The English offline doc:
# make chm/en/Developer.chm HHC=/path/to/hhc.exe
# XML syntax check:
# make check
# Notable targets:
# all (default): German and English onlinedocs
# online-en: only English onlinedocs, which can be partially updated
# Enwickler.chm: the German offline doc
# use with make Entwickler.chm HHC = /path/to/hhc
# Extra Parameters for xsltproc can be given in the XSLTFLAGS variable.
# Use prefix to select the directory where the docs are to be installed
@ -19,7 +12,6 @@ HHC = hhc.exe
MKDIR_P = mkdir -p
CP = cp
CP_R = cp -r
NODE = node
stylesheet = clonk.xsl
@ -28,13 +20,12 @@ stylesheet = clonk.xsl
# find all directories neither beginning nor contained within a directory beginning with a dot
sdk-dirs := $(shell find sdk -name '.*' -prune -o -type d -print)
# misc
extra-files := $(sort $(wildcard *.css *.php *.js images/*.*))
extra-files-chm := $(sort $(wildcard *.css *.js images/*.*))
# find all *.xml files recursively in sdk/
xmlfiles := $(sort $(shell find sdk -name '.*' -prune -o -name 'content.xml' -prune -o -name \*.xml -print))
xmlfiles-de := $(subst sdk, sdk-de, $(xmlfiles))
# misc
extra-files := $(sort $(wildcard *.css *.js images/*.*) lunr.js)
extra-files-chm := $(sort $(wildcard *.css *.js images/*.*))
# Targets:
@ -45,83 +36,65 @@ htmlfiles := $(addsuffix .html, $(basename $(xmlfiles)))
sdk-de-dirs := $(subst sdk, sdk-de, $(sdk-dirs))
# For openclonk.org
online-dirs := $(foreach lang, en de, $(addprefix online/$(lang)/, $(sdk-dirs) images))
online-sdk-files := $(foreach lang, en de, $(addprefix online/$(lang)/, $(htmlfiles) sdk/content.html))
online-dirs := $(foreach lang, en de, $(addprefix online/$(lang)/, $(sdk-dirs) images))
online-extra-files := $(foreach lang, en de, $(addprefix online/$(lang)/, $(extra-files)))
online-index-files := $(foreach lang, en de, $(addprefix online/$(lang)/, index.json))
# For Entwickler.chm
chm-dirs := $(foreach lang, en de, $(addprefix chm/$(lang)/, . $(sdk-dirs) images))
.PHONY: all online-en chm install check clean
all: $(sdk-de-dirs) $(online-dirs) $(online-sdk-files) $(online-extra-files) $(online-index-files)
all: $(online-dirs) $(sdk-de-dirs) $(online-extra-files) $(online-sdk-files)
online-en: $(addprefix online/en/, $(sdk-dirs) images $(htmlfiles) sdk/content.html $(extra-files) index.json)
online-en: $(addprefix online/en/, $(sdk-dirs) images $(htmlfiles) sdk/content.html $(extra-files))
chm: $(sdk-de-dirs) $(chm-dirs) chm/en/Developer.chm chm/de/Entwickler.chm
chm: $(chm-dirs) chm/en/Developer.chm chm/de/Entwickler.chm
install: all
$(MKDIR_P) $(prefix)
$(CP_R) online/* $(prefix)
$(CP_R) $(PWD)/online/* $(prefix)
check:
@xmllint --noblanks --noout --valid $(xmlfiles)
xmllint --noblanks --noout --valid $(xmlfiles)
clean:
rm -f *.mo Entwickler.chm Developer.chm doku.pot sdk/content.xml
rm -f *.mo Entwickler.chm Developer.chm doku.pot
rm -rf online sdk-de chm
sdk/content.xml: sdk/content.xml.in $(xmlfiles) tools/build_contents.py tools/experimental.py
@echo generate $@
@python2 tools/build_contents.py $(xmlfiles)
# Node dependencies for index.
node_modules/.make: package.json
npm install
@touch $@
lunr.js: node_modules/.make
$(CP) node_modules/lunr/lunr.js $@
online/en/index.json: node_modules/.make $(xmlfiles) tools/build_index.js
@$(NODE) tools/build_index.js $@ $(xmlfiles)
online/de/index.json: node_modules/.make $(xmlfiles-de) tools/build_index.js
@$(NODE) tools/build_index.js $@ $(xmlfiles-de)
chm/en/Output.hhp: $(xmlfiles) chm/en/. tools/build_hhp.py Template.hhp
@echo generate $@
@python2 tools/build_hhp.py $@ Template.hhp $(xmlfiles)
chm/de/Output.hhp: $(xmlfiles) chm/de/. tools/build_hhp.py Template.de.hhp
@echo generate $@
@python2 tools/build_hhp.py $@ Template.de.hhp $(xmlfiles)
chm/en/Output.hhp chm/en/Output.hhk chm/de/Output.hhp chm/de/Output.hhk: sdk/content.xml
#update timestamp
touch $@
sdk/content.xml: $(xmlfiles) chm/en/. chm/de/. build_chm_files.py experimental.py \
sdk/content.xml.in Template.hhk Template.de.hhk Template.hhp Template.de.hhp de.mo
@echo generate chm files
@python build_chm_files.py $(xmlfiles)
$(sdk-de-dirs) $(online-dirs) $(chm-dirs):
mkdir -p $@
doku.pot: $(xmlfiles) extra-strings.xml sdk/content.xml.in tools/xml2po.py tools/clonk.py
doku.pot: $(xmlfiles) extra-strings.xml sdk/content.xml.in xml2po.py clonk.py
@echo extract strings to $@
@python2 tools/xml2po.py -e -m clonk -o $@ $(xmlfiles) extra-strings.xml sdk/content.xml.in
@python xml2po.py -e -m clonk -o $@ $(xmlfiles) extra-strings.xml sdk/content.xml.in
%.po: doku.pot
@echo update $@
# @msgmerge --no-wrap -w 1 -U $@ $<
@msgmerge --no-wrap -w 1 -o $@ $@ $<
@msgmerge --no-wrap -w 1 -U $@ $<
%.mo: %.po
@echo compile $@
@msgfmt --statistics -o $@ $<
sdk-de/%.xml: sdk/%.xml de.mo tools/xml2po.py tools/clonk.py
sdk-de/%.xml: sdk/%.xml de.mo xml2po.py clonk.py
@echo generate $@
@python2 tools/xml2po.py -e -m clonk -t de.mo -o $@ $<
@python xml2po.py -e -m clonk -t de.mo -o $@ $<
define run-xslt
@echo generate $@
@xsltproc -o $@ --param chm $(chm) --param fileext "'.html'" $(XSLTFLAGS) $(stylesheet) $<
@xsltproc -o $@ --param webnotes $(webnotes) --param fileext "'.html'" $(XSLTFLAGS) $(stylesheet) $<
endef
online/%: chm=0
chm/%: chm=1
online/%: webnotes=1
chm/%: webnotes=0
online/en/sdk/%.html: sdk/%.xml $(stylesheet) ; $(run-xslt)
online/de/sdk/%.html: sdk-de/%.xml $(stylesheet) ; $(run-xslt)
chm/en/sdk/%.html: sdk/%.xml $(stylesheet) ; $(run-xslt)
@ -130,10 +103,6 @@ chm/en/Output.hhc: stylesheet=hhc.xsl
chm/de/Output.hhc: stylesheet=hhc.xsl
chm/en/Output.hhc: sdk/content.xml hhc.xsl ; $(run-xslt)
chm/de/Output.hhc: sdk-de/content.xml hhc.xsl ; $(run-xslt)
chm/en/Output.hhk: stylesheet=hhk.xsl
chm/de/Output.hhk: stylesheet=hhk.xsl
chm/en/Output.hhk: sdk/content.xml hhk.xsl ; $(run-xslt)
chm/de/Output.hhk: sdk-de/content.xml hhk.xsl ; $(run-xslt)
$(filter online/en/%, $(online-extra-files)): online/en/%: %
$(CP) $< $@
@ -145,7 +114,6 @@ $(addprefix chm/de/, $(extra-files-chm)): chm/de/%: %
$(CP) $< $@
chm/en/Developer.chm: chm/en/Output.hhp chm/en/Output.hhk chm/en/Output.hhc $(addprefix chm/en/, $(sdk-dirs) images $(htmlfiles) $(extra-files-chm))
! "$(HHC)" $<
"$(HHC)" $<
chm/de/Entwickler.chm: chm/de/Output.hhp chm/de/Output.hhk chm/de/Output.hhc $(addprefix chm/de/, $(sdk-dirs) images $(htmlfiles) $(extra-files-chm))
! "$(HHC)" $<
"$(HHC)" $<

View File

@ -4,7 +4,7 @@ This section explains how to build the German and English HTML-documentation fro
In Linux, it should be as easy as: Open the console and run make in this directory.
In Windows, you need Python and Cygwin. During the Cygwin installation, select these additional libraries to install:
In Windows, you ned Python and Cygwin. During the Cygwin installation, select these additional libraries to install:
+ make
+ xsltproc (libxml2 + libxslt + python-libxml2)
+ findutils
@ -12,8 +12,7 @@ In Windows, you need Python and Cygwin. During the Cygwin installation, select t
+ gettext
+ gettext-devel
+ libgcrypt + libgpg-error (for whatever reason)
Also you might have to rename find.exe, so that the cygwin provided one is used - first in Windows\System32\dllback then in Windows\System32 to make sure it isn't used.
After the installation, run cygwin, cd to this directory (/cygdrive/c/.../openclonk/docs/) and run make. The process takes a few minutes to complete.
The online version of the documentation has been generated into the online/ directory.
To build the .chm files, install the html help compiler from http://www.microsoft.com/en-us/download/details.aspx?id=21138 or http://go.microsoft.com/fwlink/?LinkId=14188 and run make chm HHC=/path/to/hhc.exe
After the installation, run cygwin, cd to this directory (/cygdrive/c/.../openclonk/docs/) and run make. The process takes about ten minutes to complete.
The online version of the documentation has been generated into the online/ directory.

View File

@ -0,0 +1,220 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<meta name="GENERATOR" content="Microsoft&reg; HTML Help Workshop 4.1">
<!-- Sitemap 1.0 -->
</HEAD><BODY>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="#appendto">
<param name="Name" value="#appendto">
<param name="Local" value="sdk\script\AppendTo.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="#strict">
<param name="Name" value="#strict">
<param name="Local" value="sdk\script\Strict.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="ActMap.txt">
<param name="Name" value="ActMap.txt">
<param name="Local" value="sdk\definition\actmap.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Benannte Variablen">
<param name="Name" value="Benannte Variablen">
<param name="Local" value="sdk\script\NamedVar.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="break">
<param name="Name" value="Break / Continue">
<param name="Local" value="sdk\script\BreakContinue.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Category">
<param name="Name" value="Objektkategorien">
<param name="Local" value="sdk\definition\category.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="CNAT">
<param name="Name" value="CNAT - Contact Attachment">
<param name="Local" value="sdk\definition\cnat.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="continue">
<param name="Name" value="Break / Continue">
<param name="Local" value="sdk\script\BreakContinue.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="DefCore.txt">
<param name="Name" value="DefCore.txt">
<param name="Local" value="sdk\definition\defcore.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Direktiven">
<param name="Name" value="#appendto">
<param name="Local" value="sdk\script\AppendTo.html">
<param name="Name" value="#strict">
<param name="Local" value="sdk\script\Strict.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Entwicklermodus">
<param name="Name" value="Clonk Entwicklermodus">
<param name="Local" value="sdk\index.html">
<param name="Name" value="Die Engine im Entwicklermodus">
<param name="Local" value="sdk\console.html">
<param name="Name" value="Kommandozeilenparameter">
<param name="Local" value="sdk\cmdline.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="for">
<param name="Name" value="Die For-Schleife">
<param name="Local" value="sdk\script\for.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="landscape.txt">
<param name="Name" value="Der dynamische Kartengenerator">
<param name="Local" value="sdk\scenario\MapCreatorS2.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Material">
<param name="Name" value="Materialdefinitionen">
<param name="Local" value="sdk\material\index.html">
<param name="Name" value="Materialdefinitionen (C4M)">
<param name="Local" value="sdk\material\c4m.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Landschaftsgenerator">
<param name="Name" value="Der dynamische Kartengenerator">
<param name="Local" value="sdk\scenario\MapCreatorS2.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Kartengenerator">
<param name="Name" value="Der dynamische Kartengenerator">
<param name="Local" value="sdk\scenario\MapCreatorS2.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Objektdefinitionen">
<param name="Name" value="Objektdefinitionen">
<param name="Local" value="sdk\definition\index.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Objektkategorien">
<param name="Name" value="Objektkategorien">
<param name="Local" value="sdk\definition\category.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Objektscripte">
<param name="Name" value="Objektscripte">
<param name="Local" value="sdk\definition\script.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="OCF">
<param name="Name" value="Object character flags">
<param name="Local" value="sdk\definition\ocf.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Operatoren">
<param name="Name" value="Operatoren">
<param name="Local" value="sdk\script\operatoren.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Partikel">
<param name="Name" value="Partikel">
<param name="Local" value="sdk\particle\index.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Procedure (ActMap)">
<param name="Name" value="Prozeduren">
<param name="Local" value="sdk\definition\procedures.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="scenario.txt">
<param name="Name" value="Scenario.txt">
<param name="Local" value="sdk\scenario\scenario.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Script">
<param name="Name" value="Szenarioscripte">
<param name="Local" value="sdk\scenario\script.html">
<param name="Name" value="Objektscripte">
<param name="Local" value="sdk\definition\script.html">
<param name="Name" value="C4Script Dokumentation">
<param name="Local" value="sdk\script\index.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Spieldaten">
<param name="Name" value="Spieldatenreferenz">
<param name="Local" value="sdk\files.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Szenarien">
<param name="Name" value="Szenarien">
<param name="Local" value="sdk\scenario\index.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Szenarioscripte">
<param name="Name" value="Szenarioscripte">
<param name="Local" value="sdk\scenario\script.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Typpr&uuml;fung">
<param name="Name" value="Datentypen">
<param name="Local" value="sdk\script\Typechecks.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Variablen">
<param name="Name" value="Benannte Variablen">
<param name="Local" value="sdk\script\NamedVar.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Vertices">
<param name="Name" value="Vertices">
<param name="Local" value="sdk\definition\vertices.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Effekte">
<param name="Name" value="Effekte">
<param name="Local" value="sdk\script\Effects.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Scriptspieler">
<param name="Name" value="Scriptspieler">
<param name="Local" value="sdk\script\ScriptPlayers.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="++"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="--"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="~"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="!"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="+"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="-"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="*"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="/"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="%"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="-"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="<<"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value=">>"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="<"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="<="> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value=">"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value=">="> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="=="> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="!="> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="S="> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="ne"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="eq"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="&amp;"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="^"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="|"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="&amp;&amp;"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="||"> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="*="> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="/="> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="%="> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="+="> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="-="> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="="> <PARAM name="Name" value="Operatoren"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
</UL>
</BODY></HTML>

View File

@ -11,6 +11,7 @@ Title=Clonk Entwicklermodus
[FILES]
images\cpem.gif
images\icon_em_brush.gif
images\icon_em_dynamic.gif
images\icon_em_edit.gif
@ -23,16 +24,16 @@ images\icon_em_rect.gif
images\icon_em_sky.gif
images\icon_em_static.gif
images\icon_em_tunnel.gif
images\icon_image.png
images\icon_material.png
images\icon_music.png
images\icon_object_definition.png
images\icon_player.png
images\icon_scenario.png
images\icon_scenario_folder.png
images\icon_sound.png
images\icon_system.png
images\icon_text.png
images\icon_image.gif
images\icon_material.gif
images\icon_music.gif
images\icon_object_definition.gif
images\icon_player.gif
images\icon_scenario.gif
images\icon_scenario_folder.gif
images\icon_sound.gif
images\icon_system.gif
images\icon_text.gif
images\icons_em_play.gif
[INFOTYPES]

220
docs/Template.hhk 100644
View File

@ -0,0 +1,220 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<meta name="GENERATOR" content="Microsoft&reg; HTML Help Workshop 4.1">
<!-- Sitemap 1.0 -->
</HEAD><BODY>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="#appendto">
<param name="Name" value="#appendto">
<param name="Local" value="sdk\script\AppendTo.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="#strict">
<param name="Name" value="#strict">
<param name="Local" value="sdk\script\Strict.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="ActMap.txt">
<param name="Name" value="ActMap.txt">
<param name="Local" value="sdk\definition\actmap.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Named Variables">
<param name="Name" value="Named Variables">
<param name="Local" value="sdk\script\NamedVar.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="break">
<param name="Name" value="Break / Continue">
<param name="Local" value="sdk\script\BreakContinue.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Category">
<param name="Name" value="Objektkategorien">
<param name="Local" value="sdk\definition\category.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="CNAT">
<param name="Name" value="CNAT - Contact Attachment">
<param name="Local" value="sdk\definition\cnat.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="continue">
<param name="Name" value="Break / Continue">
<param name="Local" value="sdk\script\BreakContinue.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="DefCore.txt">
<param name="Name" value="DefCore.txt">
<param name="Local" value="sdk\definition\defcore.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Directives">
<param name="Name" value="#appendto">
<param name="Local" value="sdk\script\AppendTo.html">
<param name="Name" value="#strict">
<param name="Local" value="sdk\script\Strict.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Developer Mode">
<param name="Name" value="Clonk Developer Mode">
<param name="Local" value="sdk\index.html">
<param name="Name" value="The Engine in Developer Mode">
<param name="Local" value="sdk\console.html">
<param name="Name" value="Command line options">
<param name="Local" value="sdk\cmdline.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="for">
<param name="Name" value="The for loop">
<param name="Local" value="sdk\script\for.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="landscape.txt">
<param name="Name" value="Dynamic Map Generator">
<param name="Local" value="sdk\scenario\MapCreatorS2.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Materials">
<param name="Name" value="Material Definitions">
<param name="Local" value="sdk\material\index.html">
<param name="Name" value="Material Definitions (C4M)">
<param name="Local" value="sdk\material\c4m.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Map Generator">
<param name="Name" value="Dynamic Map Generator">
<param name="Local" value="sdk\scenario\MapCreatorS2.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Map Generator">
<param name="Name" value="Dynamic Map Generator">
<param name="Local" value="sdk\scenario\MapCreatorS2.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Object Definitions">
<param name="Name" value="Definitions">
<param name="Local" value="sdk\definition\index.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Object Categories">
<param name="Name" value="Object Categories">
<param name="Local" value="sdk\definition\category.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Objekt Scripts">
<param name="Name" value="Objekt Scripts">
<param name="Local" value="sdk\definition\script.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="OCF">
<param name="Name" value="Object Character Flags">
<param name="Local" value="sdk\definition\ocf.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Operators">
<param name="Name" value="Operators">
<param name="Local" value="sdk\script\operatoren.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Particles">
<param name="Name" value="Particles">
<param name="Local" value="sdk\particle\index.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Procedures (ActMap)">
<param name="Name" value="Procedures">
<param name="Local" value="sdk\definition\procedures.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="scenario.txt">
<param name="Name" value="Scenario.txt">
<param name="Local" value="sdk\scenario\scenario.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Script">
<param name="Name" value="Scenario Scripts">
<param name="Local" value="sdk\scenario\script.html">
<param name="Name" value="Object Scripts">
<param name="Local" value="sdk\definition\script.html">
<param name="Name" value="C4Script Documentation">
<param name="Local" value="sdk\script\index.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Game Data">
<param name="Name" value="Game Data">
<param name="Local" value="sdk\files.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Scenarios">
<param name="Name" value="Scenarios">
<param name="Local" value="sdk\scenario\index.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Scenario Scripts">
<param name="Name" value="Scenario Scripts">
<param name="Local" value="sdk\scenario\script.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Typechecking">
<param name="Name" value="Data Types">
<param name="Local" value="sdk\script\Typechecks.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Variables">
<param name="Name" value="Named Variables">
<param name="Local" value="sdk\script\NamedVar.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Vertices">
<param name="Name" value="Vertices">
<param name="Local" value="sdk\definition\vertices.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Effects">
<param name="Name" value="Effects">
<param name="Local" value="sdk\script\Effects.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Script players">
<param name="Name" value="Script players">
<param name="Local" value="sdk\script\ScriptPlayers.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="++"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="--"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="~"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="!"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="+"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="-"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="*"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="/"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="%"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="-"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="<<"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value=">>"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="<"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="<="> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value=">"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value=">="> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="=="> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="!="> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="S="> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="ne"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="eq"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="&amp;"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="^"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="|"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="&amp;&amp;"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="||"> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="*="> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="/="> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="%="> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="+="> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="-="> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
<LI> <OBJECT type="text/sitemap"> <PARAM name="Name" value="="> <PARAM name="Name" value="Operators"> <PARAM name="Local" value="sdk\script\operatoren.html"> </OBJECT>
</UL>
</BODY></HTML>

View File

@ -11,6 +11,7 @@ Title=Clonk Developer Mode
[FILES]
images\cpem.gif
images\icon_em_brush.gif
images\icon_em_dynamic.gif
images\icon_em_edit.gif
@ -23,16 +24,16 @@ images\icon_em_rect.gif
images\icon_em_sky.gif
images\icon_em_static.gif
images\icon_em_tunnel.gif
images\icon_image.png
images\icon_material.png
images\icon_music.png
images\icon_object_definition.png
images\icon_player.png
images\icon_scenario.png
images\icon_scenario_folder.png
images\icon_sound.png
images\icon_system.png
images\icon_text.png
images\icon_image.gif
images\icon_material.gif
images\icon_music.gif
images\icon_object_definition.gif
images\icon_player.gif
images\icon_scenario.gif
images\icon_scenario_folder.gif
images\icon_sound.gif
images\icon_system.gif
images\icon_text.gif
images\icons_em_play.gif
[INFOTYPES]

View File

@ -1,40 +0,0 @@
var cat;
function CheckCharacters(text,allowed) {
for (var i = 0; i < text.length; ++i) {
if(allowed.indexOf(text.charAt(i))<0 ) {
return false;
}
}
return true;
}
function Calc() {
var input = document.getElementById("input").value*1;
if(CheckCharacters(input,"0123456789")) cat=input;
for(var i=0;i<BIT_COUNT;++i)
Mark(i);
}
function Mark(bit) {
if((1<<bit) & cat) {
if(!(bit%2))
document.getElementById(PREFIX+bit).className="mark";
else
document.getElementById(PREFIX+bit).className="darkmark";
}
else {
if(!(bit%2))
document.getElementById(PREFIX+bit).className="";
else
document.getElementById(PREFIX+bit).className="dark";
}
}
function Switch(bit) {
cat = cat ^ (1 << bit);
Mark(bit);
document.getElementById("input").value = cat;
}

View File

@ -0,0 +1,268 @@
#!/usr/bin/env python
# -*- coding: iso-8859-15 -*-
import sys
import xml.sax
import experimental
import gettext
class ClonkEntityResolver(xml.sax.handler.EntityResolver):
def resolveEntity(self, publicId, systemId):
s = 'file:sdk/script/fn/' + systemId
return s
def setrelpath(self, path):
dirlist = path.split('/')
self.relpath = ''
for d in dirlist[1:]:
self.relpath = self.relpath + '../'
class Clonkparser(xml.sax.handler.ContentHandler):
def __init__(self):
self.cats = { }
self.subcats = { }
self.versions = { }
self.extversions = { }
self.files = { }
def setfilename(self, filename):
self.filename = filename
self.htmlfilename = filename[:-3] + 'html'
def _setcurcat(self, curcat):
self.curcat = curcat
if self.curcat not in self.cats:
self.cats[self.curcat] = { }
self.subcats[self.curcat] = { }
def startDocument(self):
self.cur = ""
self.curcat = ""
self.title = ""
self.state = None
def startElement(self, name, attr):
# subcat inside category?
if self.state == 'category' and self.cur != "":
self._setcurcat(self.cur)
self.cur = ""
self.state = name
def characters(self, content):
if self.state in ['category', 'subcat', 'version', 'extversion', 'title']:
self.cur += content
def endElement(self, name):
self.cur = self.cur.strip()
if name == 'category':
if self.cur != "":
self._setcurcat(self.cur)
if self.title == "":
print "WARNING: category before title in " + self.filename
self.cats[self.curcat][self.title] = self.htmlfilename
else:
print "WARNING: possibly broken category in " + self.filename
elif name == 'subcat':
if self.curcat != "" and self.cur != "":
self.cats[self.curcat].pop(self.title, None)
if self.cur not in self.subcats[self.curcat]:
self.subcats[self.curcat][self.cur] = { }
self.subcats[self.curcat][self.cur][self.title] = self.htmlfilename
else:
print "WARNING: possibly broken subcategory in " + self.filename
elif name == 'version':
self.cur = self.cur.upper()
if self.cur != "":
if self.cur not in self.extversions:
self.extversions[self.cur] = { }
if self.cur not in self.versions:
self.versions[self.cur] = { }
self.versions[self.cur][self.title] = self.htmlfilename
elif name == 'extversion':
self.cur = self.cur.upper()
if self.cur != "":
if self.cur not in self.extversions:
self.extversions[self.cur] = { }
if self.cur not in self.versions:
self.versions[self.cur] = { }
self.extversions[self.cur][self.title] = self.htmlfilename
elif name == 'title':
self.title = self.cur
self.files[self.title] = self.htmlfilename
self.cur = ""
self.state = None
def printcontents1(f, _):
f.write('\n <UL>\n')
cats = parser.cats.keys()
cats.sort()
for cat in cats:
f.write(' <LI> <OBJECT type="text/sitemap">\n' +
' <param name="Name" value="' + _(cat) + '">\n' +
' </OBJECT>\n' +
' <UL>\n')
subcats = parser.subcats[cat].keys()
subcats.sort()
for subcat in subcats:
f.write(' <LI> <OBJECT type="text/sitemap">\n' +
' <param name="Name" value="' + _(subcat) + '">\n' +
' </OBJECT>\n' +
' <UL>\n')
titles = parser.subcats[cat][subcat].keys()
titles.sort()
for title in titles:
f.write(' <LI> <OBJECT type="text/sitemap">\n' +
' <param name="Name" value="' + _(title) + '">\n' +
' <param name="Local" value="' +
parser.subcats[cat][subcat][title] + '#' + _(title) + '">\n' +
' </OBJECT>\n')
f.write(' </UL>\n')
titles = parser.cats[cat].keys()
titles.sort()
for title in titles:
f.write(' <LI> <OBJECT type="text/sitemap">\n' +
' <param name="Name" value="' + _(title) + '">\n' +
' <param name="Local" value="' +
parser.cats[cat][title] + '#' + _(title) + '">\n' +
' </OBJECT>\n')
f.write(' </UL>\n')
f.write(' </UL>\n')
def printcontents2(f, _):
f.write(' <UL>\n')
versions = parser.versions.keys()
versions.sort()
for version in versions:
f.write(' <LI> <OBJECT type="text/sitemap">\n' +
' <param name="Name" value="' + _(version) + '">\n' +
' </OBJECT>\n' +
' <UL>\n')
titles = parser.versions[version].keys()
titles.sort()
for title in titles:
f.write(' <LI> <OBJECT type="text/sitemap">\n' +
' <param name="Name" value="' + _(title) + '">\n' +
' <param name="Local" value="' +
parser.versions[version][title] + '#' + _(title) + '">\n' +
' </OBJECT>\n')
titles = parser.extversions[version].keys()
titles.sort()
for title in titles:
f.write(' <LI> <OBJECT type="text/sitemap">\n' +
' <param name="Name" value="' + _(title) + ' (' + _('erweitert') + ')">\n' +
' <param name="Local" value="' +
parser.extversions[version][title] + '#' + _(title) + '">\n' +
' </OBJECT>\n')
f.write(' </UL>\n')
f.write(' </UL>\n')
def printcontents3(f, _):
ihack = [1000]
def folder(name):
i = str(ihack[0])
f.write("<li><img id='tgl" + i + "' class='collapseimg' src='../images/bullet_folder.gif' alt='-' onclick='tb(" + i + ")' ondblclick='ta(" + i + ")' />\n" +
name + "\n" +
"<ul id='brn" + i + "' class='invisi'>\n")
ihack[0] = ihack[0] + 1
def sheet(url, name):
f.write("<li><img src='../images/bullet_sheet.gif' alt='' />\n" +
"<emlink href='" + url[4:] + "'>" + name + "</emlink></li>\n")
def sheetE(url, name):
f.write("<li><img src='../images/bullet_sheet.gif' alt='' />\n" +
"<emlink href='" + url[4:] + "'>" + name + "</emlink> (erweitert)</li>\n")
folder("Funktionen nach Kategorie")
cats = parser.cats.keys()
cats.sort()
for cat in cats:
folder(_(cat))
subcats = parser.subcats[cat].keys()
subcats.sort()
for subcat in subcats:
folder(_(subcat))
titles = parser.subcats[cat][subcat].keys()
titles.sort()
for title in titles:
sheet(parser.subcats[cat][subcat][title] + '#' + _(title), _(title))
f.write('</ul></li>\n')
titles = parser.cats[cat].keys()
titles.sort()
for title in titles:
sheet(parser.cats[cat][title] + '#' + _(title), _(title))
f.write('</ul></li>\n')
f.write('</ul></li>\n')
folder("Funktionen nach Version")
versions = parser.versions.keys()
versions.sort()
for version in versions:
folder(_(version))
titles = parser.versions[version].keys()
titles.sort()
for title in titles:
sheet(parser.versions[version][title] + '#' + _(title), _(title))
titles = parser.extversions[version].keys()
titles.sort()
for title in titles:
sheetE(parser.extversions[version][title] + '#' + _(title), _(title))
f.write('</ul></li>\n')
f.write('</ul></li>\n')
parser = Clonkparser()
reader = xml.sax.make_parser()
reader.setContentHandler(parser)
reader.setEntityResolver(ClonkEntityResolver())
for filename in sys.argv[1:]:
reader.getEntityResolver().setrelpath(filename)
parser.setfilename(filename)
reader.parse(filename)
if 0:
reader.setContentHandler(experimental.ExperimentParser())
for filename in sys.argv[1:]:
reader.getEntityResolver().setrelpath(filename)
reader.parse(filename)
experimental.Result()
mofile = open("de.mo", "rb")
gt = gettext.GNUTranslations(mofile)
#_ = lambda s: s.encode('iso-8859-1')
#for f, fin in ((file("chm/de/Output.hhc", "w"), file("Template.hhc", "r")),
# (file("chm/en/Output.hhc", "w"), file("Template.en.hhc", "r"))):
# for line in fin:
# if line.find("<!-- Insert Functions here 1-->") != -1:
# printcontents1(f, _)
# elif line.find("<!-- Insert Functions here 2-->") != -1:
# printcontents2(f, _)
# else:
# f.write(line)
# f.close()
# fin.close()
# _ = lambda s: gt.ugettext(s).encode('iso-8859-1')
_ = lambda s: s.encode('utf-8')
f, fin = (file("sdk/content.xml", "w"), file("sdk/content.xml.in", "r"))
for line in fin:
if line.find("<!-- Insert Functions here -->") != -1:
printcontents3(f, _)
else:
f.write(line)
f.close()
fin.close()
for f, fin in ((file("chm/en/Output.hhp", "w"), file("Template.hhp", "r")),
(file("chm/de/Output.hhp", "w"), file("Template.de.hhp", "r"))):
for line in fin:
if line.find("[INFOTYPES]") != -1:
for filename in sys.argv[1:]:
f.write(filename[:-3].replace("/", "\\") + 'html\r\n')
f.write(line)
f.close()
fin.close()
_ = lambda s: s.encode('iso-8859-1')
for f, fin in ((file("chm/en/Output.hhk", "w"), file("Template.hhk", "r")),
(file("chm/de/Output.hhk", "w"), file("Template.de.hhk", "r"))):
for line in fin:
if line.find("</UL>") != -1:
for title, filename in parser.files.iteritems():
f.write(" <LI> <OBJECT type=\"text/sitemap\">\n" +
" <param name=\"Name\" value=\"" + _(title) + "\">\n" +
" <param name=\"Local\" value=\"" + filename + "#" + _(title) + "\">\n" +
" </OBJECT>\n")
f.write(line)
f.close()
fin.close()
_ = lambda s: gt.ugettext(s).encode('iso-8859-1')

View File

@ -2,9 +2,8 @@
<!ENTITY % text "a | img | emlink | funclink | em | code | strong">
<!ELEMENT funcs ((func | const)+, (author, date)+)>
<!ELEMENT funcs (func+, (author, date)+)>
<!ELEMENT func (title, deprecated?, category, subcat*, version, deprecated?, syntax, desc, remark*, examples?, related?)>
<!ELEMENT const (title, deprecated?, category, subcat*, version, deprecated?, syntax, desc, remark*, examples?, related?)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT category (#PCDATA)>
<!ELEMENT subcat (#PCDATA)>
@ -23,68 +22,57 @@
<!ELEMENT remark (#PCDATA | br | ul | li | table | %text;)*>
<!ELEMENT examples (example+)>
<!ELEMENT example (code | text)*>
<!ELEMENT code (#PCDATA | funclink | emlink | em | i | strong)*>
<!ATTLIST code
id CDATA #IMPLIED>
<!ELEMENT i (#PCDATA)>
<!ELEMENT code (#PCDATA | funclink | emlink | em | strong)*>
<!ELEMENT text (#PCDATA | br | ul | li | table | %text;)*>
<!ATTLIST text
id CDATA #IMPLIED>
<!ELEMENT related (funclink | emlink)+>
<!ELEMENT funclink (#PCDATA)>
<!ELEMENT emlink (#PCDATA | %text;)*>
<!ELEMENT emlink (#PCDATA)>
<!ATTLIST emlink href CDATA #REQUIRED>
<!ELEMENT author (#PCDATA)>
<!ELEMENT date (#PCDATA)>
<!ELEMENT search EMPTY>
<!ELEMENT doc (title, (h | text | table | part | code | dl | ul | img | search | examples)+, related?, (author, date?)+)>
<!ELEMENT part ((h | text | table | part | code | dl | ul | img | search | examples)+, related?)>
<!ELEMENT h (#PCDATA | %text;)*>
<!ATTLIST h
id CDATA #IMPLIED>
<!ELEMENT doc (title, (h | text | dl | part | code | author | date | img)*)>
<!ELEMENT part (h | text | part | code | dl)*>
<!ELEMENT br EMPTY>
<!ELEMENT table (#PCDATA | caption | rowh | row | bitmask)*>
<!ELEMENT caption (#PCDATA)>
<!ATTLIST caption
id CDATA #IMPLIED>
id ID #IMPLIED>
<!ELEMENT row (#PCDATA | col | literal_col)*>
<!ATTLIST row
id CDATA #IMPLIED>
id ID #IMPLIED>
<!ELEMENT rowh (#PCDATA | col | literal_col)*>
<!ELEMENT col (#PCDATA | table | text | %text;)*>
<!ELEMENT col (#PCDATA | %text;)*>
<!ATTLIST col
id CDATA #IMPLIED
colspan CDATA #IMPLIED>
<!ELEMENT literal_col (#PCDATA | table | text | %text;)*>
<!ELEMENT literal_col (#PCDATA | %text;)*>
<!ATTLIST literal_col
colspan CDATA #IMPLIED>
<!ELEMENT bitmask (#PCDATA)>
<!ELEMENT ul (#PCDATA | li)*>
<!ELEMENT li (#PCDATA | br | table | text | %text;)*>
<!ATTLIST li
id CDATA #IMPLIED>
<!ELEMENT li (#PCDATA | br | %text;)*>
<!ELEMENT dl (#PCDATA | dd | dt)*>
<!ELEMENT dt (#PCDATA | br | %text;)*>
<!ATTLIST dt
id CDATA #IMPLIED>
id ID #IMPLIED>
<!ELEMENT dd (#PCDATA | text | code)*>
<!ELEMENT em (#PCDATA)>
<!ELEMENT strong (#PCDATA)>
<!ELEMENT h (#PCDATA)>
<!ATTLIST h
id ID #IMPLIED>
<!ELEMENT img EMPTY>
<!ATTLIST img
src CDATA #REQUIRED
alt CDATA #IMPLIED
class CDATA #IMPLIED
width CDATA #IMPLIED
height CDATA #IMPLIED
id CDATA #IMPLIED>
width CDATA "0"
height CDATA "0"
id ID #IMPLIED>
<!ELEMENT a (#PCDATA)>
<!ATTLIST a

View File

@ -15,7 +15,7 @@ class clonkXmlMode:
return ['code']
_stuff = ['funclink', 'version', 'extversion', 'rtype', 'author', 'date',
'type', 'code', 'code/i', 'code/b', 'name', 'func/title', 'const/title', 'literal_col']
'type', 'code', 'code/i', 'code/b', 'name', 'func/title', 'literal_col']
def _delete_stuff(self, node, msg):
#print "looking at " + str(node.name)
if node and node.children:

View File

@ -6,7 +6,7 @@
<xsl:variable name="procinst" select="processing-instruction('xml-stylesheet')" />
<xsl:param name="relpath" select="substring-after(substring-before($procinst, 'clonk.xsl'),'href=&quot;')" />
<xsl:param name="chm" />
<xsl:param name="webnotes" />
<xsl:param name="fileext" select="'.xml'" />
<xsl:template name="head">
<head>
@ -14,14 +14,32 @@
<link rel="stylesheet">
<xsl:attribute name="href"><xsl:value-of select="$relpath" />doku.css</xsl:attribute>
</link>
<xsl:if test="$webnotes">
<link rel="stylesheet" href="http://www.openclonk.org/header/header.css" />
</xsl:if>
<xsl:if test="descendant::table[bitmask]">
<script>
<xsl:attribute name="src"><xsl:value-of select="$relpath" />bitmasks.js</xsl:attribute>
</script>
<script type="text/javascript">
var BIT_COUNT = <xsl:value-of select="count(descendant::table[bitmask]/row)" />; // Anzahl der Bits
var PREFIX = "bit"; // Prefix für die numerierten IDs
</script>
<script type="text/javascript">
var BIT_COUNT = <xsl:value-of select="count(descendant::table[bitmask]/row)" />; // Anzahl der Bits
var PREFIX = "bit"; // Prefix für die numerierten IDs
</script>
</xsl:if>
<xsl:if test="$webnotes">
<!-- <xsl:processing-instruction name="php">
$g_page_language = '<xsl:choose><xsl:when test='lang("en")'>english</xsl:when><xsl:otherwise>german</xsl:otherwise></xsl:choose>';
require_once('<xsl:value-of select="$relpath" />../webnotes/core/api.html');
pwn_head();
?</xsl:processing-instruction> -->
<script type="text/javascript">
function switchLanguage() {
var loc = window.location.href;
if (loc.match(/\/en\//)) loc = loc.replace(/\/en\//, "/de/");
else loc = loc.replace(/\/de\//, "/en/");
window.location = loc;
}
</script>
</xsl:if>
</head>
</xsl:template>
@ -29,71 +47,86 @@
<xsl:template match="title" mode="head">
<title><xsl:value-of select="." /><xsl:apply-templates select="../deprecated" /> -
OpenClonk <xsl:choose>
<xsl:when test='lang("de")'>Referenz</xsl:when>
<xsl:otherwise>Reference</xsl:otherwise>
<xsl:when test='lang("en")'>Reference</xsl:when>
<xsl:otherwise>Referenz</xsl:otherwise>
</xsl:choose>
</title>
</xsl:template>
<xsl:template match="script">
<xsl:copy>
<xsl:for-each select="@*">
<xsl:copy />
</xsl:for-each>
<xsl:apply-templates />
</xsl:copy>
<xsl:copy><xsl:apply-templates select="@*|node()" /></xsl:copy>
</xsl:template>
<xsl:template match="func|const" mode="head">
<xsl:template match="*" mode="head">
<xsl:apply-templates mode="head" />
</xsl:template>
<xsl:template match="*" mode="head" />
<xsl:template match="title" />
<xsl:template name="header">
<xsl:apply-templates select="document('header.xml')" />
<xsl:if test="$webnotes">
<!--<xsl:processing-instruction name="php">
<xsl:choose><xsl:when test='lang("en")'>
readfile("http://www.openclonk.org/header/header.html?p=docs");
</xsl:when><xsl:otherwise>
readfile("http://www.openclonk.org/header/header.html?p=docsde");
</xsl:otherwise></xsl:choose>
?</xsl:processing-instruction> -->
<!-- <xsl:copy-of select='document("header.xml")/*/*' /> -->
<xsl:apply-templates select="document('header.xml')" />
</xsl:if>
</xsl:template>
<!-- <xsl:template match="header//@action">
<xsl:attribute name="action"><xsl:value-of select="concat($relpath, current())" /></xsl:attribute>
</xsl:template>-->
<xsl:template match="header|header//*|header//@*">
<xsl:copy><xsl:apply-templates select="@*|node()" /></xsl:copy>
</xsl:template>
<xsl:template match="deprecated">
(<xsl:choose><xsl:when test='lang("de")'>veraltet</xsl:when><xsl:otherwise>deprecated</xsl:otherwise></xsl:choose>)
(<xsl:choose><xsl:when test='lang("en")'>deprecated</xsl:when><xsl:otherwise>veraltet</xsl:otherwise></xsl:choose>)
</xsl:template>
<xsl:template match="doc|funcs">
<xsl:template match="funcs">
<html>
<xsl:call-template name="head" />
<body>
<xsl:if test="$chm">
<xsl:attribute name="id">chm</xsl:attribute>
<xsl:apply-templates />
</xsl:if>
<xsl:if test="not($chm)">
<xsl:call-template name="header" />
<div id="iframe"><iframe>
<xsl:attribute name="src"><xsl:value-of select="$relpath" />sdk/content<xsl:value-of select="$fileext" /></xsl:attribute>
</iframe></div>
<div id="content">
<xsl:apply-templates />
</div>
</xsl:if>
</body>
</html>
</xsl:template>
<xsl:template match="toc">
<html>
<xsl:call-template name="head" />
<body>
<div id="toc">
<xsl:apply-templates />
<xsl:call-template name="header" />
<div id="content">
<xsl:call-template name="nav" />
<xsl:for-each select="func">
<xsl:apply-templates select="." />
</xsl:for-each>
<xsl:apply-templates select="author" />
<xsl:if test="$webnotes">
<!-- <xsl:processing-instruction name="php">
pwn_body(basename (dirname(__FILE__)) . basename(__FILE__,".html"), $_SERVER['SCRIPT_NAME']);
?</xsl:processing-instruction> -->
</xsl:if>
<xsl:call-template name="nav" />
</div>
</body>
</html>
</xsl:template>
<xsl:template match="func|const">
<xsl:template match="doc">
<html>
<xsl:call-template name="head" />
<body>
<xsl:call-template name="header" />
<div id="content">
<xsl:call-template name="nav" />
<xsl:apply-templates />
<xsl:if test="$webnotes">
<!-- <xsl:processing-instruction name="php">
pwn_body(basename (dirname(__FILE__)) . basename(__FILE__,".html"), $_SERVER['SCRIPT_NAME']);
?</xsl:processing-instruction> -->
</xsl:if>
<xsl:call-template name="nav" />
</div>
</body>
</html>
</xsl:template>
<xsl:template match="func">
<h1>
<xsl:attribute name="id"><xsl:value-of select="title" /></xsl:attribute>
<xsl:value-of select="title" /><xsl:apply-templates select="deprecated" />
@ -104,16 +137,13 @@
<xsl:apply-templates select="version" />
</div>
<h2><xsl:choose>
<xsl:when test='lang("de")'>Beschreibung</xsl:when>
<xsl:otherwise>Description</xsl:otherwise>
<xsl:when test='lang("en")'>Description</xsl:when>
<xsl:otherwise>Beschreibung</xsl:otherwise>
</xsl:choose></h2>
<div class="text"><xsl:apply-templates select="desc" /></div>
<xsl:apply-templates select="syntax" />
<xsl:for-each select="syntax"><xsl:for-each select="params">
<h2><xsl:choose>
<xsl:when test='lang("de")'>Parameter</xsl:when>
<xsl:otherwise>Parameter<xsl:if test="count(param)!=1">s</xsl:if></xsl:otherwise>
</xsl:choose></h2>
<h2>Parameter<xsl:if test="count(param)!=1 and lang('en')">s</xsl:if></h2>
<dl><xsl:for-each select="param">
<dt><xsl:value-of select="name" />: </dt>
<dd><div class="text">
@ -125,16 +155,16 @@
<xsl:for-each select="remark">
<xsl:if test="generate-id(.)=generate-id(../remark[1])">
<h2><xsl:choose>
<xsl:when test='lang("de")'>Anmerkung<xsl:if test="count(../remark)!=1">en</xsl:if></xsl:when>
<xsl:otherwise>Remark<xsl:if test="count(../remark)!=1">s</xsl:if></xsl:otherwise>
<xsl:when test='lang("en")'>Remark<xsl:if test="count(../remark)!=1">s</xsl:if></xsl:when>
<xsl:otherwise>Anmerkung<xsl:if test="count(../remark)!=1">en</xsl:if></xsl:otherwise>
</xsl:choose></h2>
</xsl:if>
<div class="text"><xsl:apply-templates /></div>
</xsl:for-each>
<xsl:for-each select="examples">
<h2><xsl:choose>
<xsl:when test='lang("de")'>Beispiel<xsl:if test="count(example)!=1">e</xsl:if></xsl:when>
<xsl:otherwise>Example<xsl:if test="count(example)!=1">s</xsl:if></xsl:otherwise>
<xsl:when test='lang("en")'>Example<xsl:if test="count(example)!=1">s</xsl:if></xsl:when>
<xsl:otherwise>Beispiel<xsl:if test="count(example)!=1">e</xsl:if></xsl:otherwise>
</xsl:choose></h2>
<xsl:apply-templates />
</xsl:for-each>
@ -147,7 +177,7 @@
<span class="type"><xsl:apply-templates select="rtype" /></span>
<xsl:if test="not(contains(rtype[1],'&amp;'))"><xsl:text>&#160;</xsl:text></xsl:if>
<xsl:value-of select="../title" />
<xsl:if test="parent::func">(<xsl:apply-templates select="params" />);</xsl:if>
(<xsl:apply-templates select="params" />);
</div>
</xsl:template>
@ -169,8 +199,8 @@
<xsl:template match="category">
<b><xsl:choose>
<xsl:when test='lang("de")'>Kategorie: </xsl:when>
<xsl:otherwise>Category: </xsl:otherwise>
<xsl:when test='lang("en")'>Category: </xsl:when>
<xsl:otherwise>Kategorie: </xsl:otherwise>
</xsl:choose></b>
<xsl:value-of select="." /><xsl:apply-templates select="../subcat" />
</xsl:template>
@ -181,19 +211,19 @@
<xsl:template match="version">
<b><xsl:choose>
<xsl:when test='lang("de")'>Ab Engineversion: </xsl:when>
<xsl:otherwise>Since engine version: </xsl:otherwise>
<xsl:when test='lang("en")'>Since engine version: </xsl:when>
<xsl:otherwise>Ab Engineversion: </xsl:otherwise>
</xsl:choose></b>
<xsl:apply-templates />
</xsl:template>
<xsl:template match="extversion">
<xsl:choose>
<xsl:when test='lang("de")'>
(erweitert ab <xsl:value-of select="." />)
<xsl:when test='lang("en")'>
(extended in <xsl:value-of select="." />)
</xsl:when>
<xsl:otherwise>
(extended in <xsl:value-of select="." />)
(erweitert ab <xsl:value-of select="." />)
</xsl:otherwise>
</xsl:choose>
</xsl:template>
@ -216,7 +246,7 @@
<xsl:template match="doc/h">
<h1><xsl:apply-templates select="@id|node()" /></h1>
</xsl:template>
<xsl:template match="doc/part/h|toc/h">
<xsl:template match="doc/part/h">
<h2><xsl:apply-templates select="@id|node()" /></h2>
</xsl:template>
<xsl:template match="doc/part/part/h">
@ -226,36 +256,6 @@
<h4><xsl:apply-templates select="@id|node()" /></h4>
</xsl:template>
<!-- content.xml -->
<xsl:template match="toc//li">
<xsl:copy>
<xsl:for-each select="@*">
<xsl:copy />
</xsl:for-each>
<xsl:choose><xsl:when test="ul">
<xsl:if test="ancestor::ul/ancestor::ul/ancestor::ul">
<xsl:attribute name="class">invisi</xsl:attribute>
</xsl:if>
<img class='collapseimg'>
<xsl:attribute name="src">../images/<xsl:choose>
<xsl:when test="ancestor::ul/ancestor::ul/ancestor::ul">bullet_folder.png</xsl:when>
<xsl:otherwise>bullet_folder_open.png</xsl:otherwise>
</xsl:choose></xsl:attribute>
<xsl:attribute name="alt"><xsl:choose>
<xsl:when test="ancestor::ul/ancestor::ul/ancestor::ul">+</xsl:when>
<xsl:otherwise>-</xsl:otherwise>
</xsl:choose></xsl:attribute>
<xsl:attribute name="id">tgl<xsl:number level="any" count="ul"/></xsl:attribute>
<xsl:attribute name="onclick">tb(<xsl:number level="any" count="ul"/>)</xsl:attribute>
<xsl:attribute name="ondblclick">ta(<xsl:number level="any" count="ul"/>)</xsl:attribute>
</img>
</xsl:when><xsl:otherwise>
<img src='../images/bullet_sheet.png' alt='' />
</xsl:otherwise></xsl:choose>
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
<!-- copy some HTML elements literally -->
<xsl:template match="img|a|em|strong|br|code/i|code/b|ul|li">
<xsl:copy>
@ -283,8 +283,8 @@
<xsl:template match="related">
<div class="text">
<b><xsl:choose>
<xsl:when test='lang("de")'>Siehe auch: </xsl:when>
<xsl:otherwise>See also: </xsl:otherwise>
<xsl:when test='lang("en")'>See also: </xsl:when>
<xsl:otherwise>Siehe auch: </xsl:otherwise>
</xsl:choose></b>
<xsl:for-each select="*">
<xsl:sort />
@ -313,9 +313,6 @@
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:if test="/toc">
<xsl:attribute name="target">_top</xsl:attribute>
</xsl:if>
<xsl:value-of select="$text" />
</a>
</xsl:template>
@ -341,7 +338,7 @@
</xsl:if>
<xsl:if test="position() mod 2=0"><xsl:attribute name="class">dark</xsl:attribute></xsl:if>
<xsl:for-each select="col|literal_col">
<td><xsl:apply-templates select="@colspan|@id|node()"/></td>
<td><xsl:apply-templates select="@colspan|node()"/></td>
</xsl:for-each>
</tr>
</xsl:for-each>
@ -385,6 +382,62 @@
<xsl:template match="@colspan">
<xsl:attribute name="colspan"><xsl:value-of select="." /></xsl:attribute>
</xsl:template>
<xsl:template name="nav"><xsl:if test="$webnotes">
<ul class="nav">
<li><xsl:call-template name="link">
<xsl:with-param name="href" select="'index.html'" />
<xsl:with-param name="text"><xsl:choose>
<xsl:when test='lang("en")'>Introduction</xsl:when>
<xsl:otherwise>Einleitung</xsl:otherwise>
</xsl:choose></xsl:with-param>
</xsl:call-template></li>
<li><a>
<xsl:attribute name="href"><xsl:value-of select="$relpath" />sdk/content.html</xsl:attribute>
<xsl:choose>
<xsl:when test='lang("en")'>Contents</xsl:when>
<xsl:otherwise>Inhalt</xsl:otherwise>
</xsl:choose>
</a></li>
<li><a>
<xsl:attribute name="href"><xsl:value-of select="$relpath" />search.php</xsl:attribute>
<xsl:choose>
<xsl:when test='lang("en")'>Search</xsl:when>
<xsl:otherwise>Suche</xsl:otherwise>
</xsl:choose>
</a></li>
<li><xsl:call-template name="link">
<xsl:with-param name="href" select="'console.html'" />
<xsl:with-param name="text" select="'Engine'" />
</xsl:call-template></li>
<li><xsl:call-template name="link">
<xsl:with-param name="href" select="'cmdline.html'" />
<xsl:with-param name="text"><xsl:choose>
<xsl:when test='lang("en")'>Command Line</xsl:when>
<xsl:otherwise>Kommandozeile</xsl:otherwise>
</xsl:choose></xsl:with-param>
</xsl:call-template></li>
<li><xsl:call-template name="link">
<xsl:with-param name="href" select="'files.html'" />
<xsl:with-param name="text"><xsl:choose>
<xsl:when test='lang("en")'>Game Data</xsl:when>
<xsl:otherwise>Spieldaten</xsl:otherwise>
</xsl:choose></xsl:with-param>
</xsl:call-template></li>
<li><xsl:call-template name="link">
<xsl:with-param name="href" select="'script/index.html'" />
<xsl:with-param name="text" select="'Script'" />
</xsl:call-template></li>
<li class="switchlang"><xsl:choose>
<xsl:when test='lang("en")'><a href='javascript:switchLanguage()'><img src='/deco/dco_de_sml.gif' alt='German' border='0'/></a></xsl:when>
<xsl:otherwise><a href='javascript:switchLanguage()'><img src='/deco/dco_en_sml.gif' alt='English' border='0'/></a></xsl:otherwise>
</xsl:choose></li>
<!--<li><a><xsl:attribute name="href">index.xml</xsl:attribute>.</a></li>
<xsl:if test="starts-with($relpath, '../..')">
<li><a><xsl:attribute name="href">../index.xml</xsl:attribute>..</a></li>
</xsl:if>-->
</ul>
</xsl:if></xsl:template>
<!-- some code blocks are made into paragraphs -->
<xsl:template match="example/code|part/code|doc/code|dd/code">
@ -511,7 +564,7 @@
<xsl:template name="color2">
<xsl:param name="s" select="." />
<!-- the list of keywords -->
<xsl:param name="t" select="'#include|#appendto|#warning|public|private|protected|global|static|var|local|const|any|int|bool|def|effect|object|proplist|string|array|func|return|if|else|break|continue|while|for|new|true|false|nil|'" />
<xsl:param name="t" select="'#include|#appendto|public|private|protected|global|static|var|local|const|int|proplist|object|array|string|bool|return|if|else|break|continue|while|for|func|true|false|nil|'" />
<xsl:param name="w" select="substring-before($t, '|')" />
<!-- text before the keyword -->
<xsl:variable name="l" select="substring-before($s, $w)" />

19347
docs/de.po

File diff suppressed because it is too large Load Diff

View File

@ -1,55 +1,18 @@
@font-face{
font-family: Endeavour;
/*src: url('/Endeavour.eot');
src: local('Endeavour'),url('/Endeavour.ttf') format("truetype");*/
}
body {
margin: 0;
font-size: small;
font-family: Verdana, Arial, 'Trebuchet MS';
background-color: white;
color: black;
}
body {
font-size: small;
line-height: 1.6em;
}
#iframe {
position: absolute; top: 143px; left: 0; width: 300px; border: 0; bottom: 0; overflow: auto;
height: auto;
display: block;
}
#iframe > iframe {
border: 0; overflow: auto;
height: 100%;
width: 100%;
display: block;
}
#toc {
padding-left: 1em;
}
#toc h2 {
margin-bottom: 10px;
}
#chm {
margin: 1em;
}
#content {
padding: 0 1em;
margin: 0 auto;
position: absolute; top: 143px; left: 300px; right: 0; bottom: 0; overflow: auto;
background: white;
}
.text, pre.code, ul, ol, dl {
padding-top: 5px;
padding-bottom: 5px;
margin: 0;
margin: 8px 0 12px 0;
}
/* indent the parameters of the function if it's broken into multiple lines*/
div.fnsyntax {
@ -57,6 +20,11 @@ div.fnsyntax {
margin-left: 1em;
}
#content {
padding: 0 1em;
margin: 0 auto;
}
div.example {
margin-top: 12px;
margin-bottom: 36px;
@ -66,14 +34,14 @@ dd {
margin: 0;
}
.text img, dt img {
.text img {
vertical-align: middle;
margin-right: 6px;
}
img.cpem {
img#cpem {
float: left;
margin: 12px;
margin: 0 6px 6px 18px;
}
h1, h2, h3, h4, h5, h6 {
@ -81,7 +49,6 @@ color:#222222;
}
h1 {
font-family: Endeavour, Verdana, Sans-serif;
font-size: 2em;
font-weight: normal;
margin-top: 1.32em;
@ -92,22 +59,23 @@ h1 {
h2 {
font-weight: normal;
font-size: 140%;
font-size: 150%;
margin: 0;
padding: 0;
margin-top: 0.6em;
margin-bottom: 0.2em;
margin-top: 0.8em;
padding: .35em .1em 0 0;
border-bottom: 1px solid #eee;
border-bottom: 3px solid #eee;
}
h3, table caption, dt {
text-align: left;
font-weight: bold;
font-size:100%;
font-size:132%;
margin: 0;
margin-top:0.6em;
padding:0;
border-bottom:1px solid #eee;
margin-bottom:0.3em;
margin-top:1em;
padding:0.2em 0.1em 0.3em 0;
}
table {
@ -189,7 +157,6 @@ ul.contents li a {
}
ul.contents img {
vertical-align: middle;
margin-right: 4px;
}
ul.contents a {
color: navy;
@ -219,7 +186,7 @@ ul.contents ul li:not(:last-child)::after {
.collapseimg {
cursor: pointer;
}
.toggleinvisi li.invisi > ul {
.toggleinvisi .invisi {
display: none;
}
@ -243,10 +210,12 @@ ul.nav a {
text-decoration: none;
}
ul.nav a:hover, ul.nav a:hover {
background: #333 url(images/stripe-wide.gif) left repeat-x;
}
ul.nav li.switchlang img {
margin: 0;
}
a {
color: rgb(0, 102, 153);
}

View File

@ -10,10 +10,9 @@ import xml.sax
codeparents = {}
allcode = {}
c4scripter = None
c4scripter = file("Functions.txt", 'w')
class ExperimentParser(xml.sax.handler.ContentHandler):
def __init__(self):
global c4scripter
self.statestack = []
self.parameter = ""
self.type = ""
@ -22,7 +21,6 @@ class ExperimentParser(xml.sax.handler.ContentHandler):
self.title = ""
self.cur = ""
self.desc = ""
c4scripter = file("Functions.txt", 'w')
def startElement(self, name, attr):
self.statestack.append(name)
if name == 'params':

View File

@ -3,8 +3,4 @@
<doc>
<!-- Zum markieren von veralteten Funktionen im Inhaltsverzeichnis -->
<text>extended</text>
<ul><li>Functions by Category
<ul></ul></li>
<li>Functions by Version
<ul></ul></li></ul>
</doc>

View File

@ -3,50 +3,69 @@ Unfortunately, xml documents can only have one root, so there needs to be a dumm
header is an appropiate html element, so it's arbitrarily chosen.
clonk.xsl also uses it to match the processing for it. -->
<header>
<style type="text/css">@import url("https://www.openclonk.org/header/header.css");</style>
<!-- header -->
<div id="nav_header">
<div id="nav_doclangswitch">
<a href="https://docs.openclonk.org/en/sdk/" target="_top"><img src="https://forum.openclonk.org/flags/gb.png"/></a>
<a href="https://docs.openclonk.org/de/sdk/" target="_top"><img src="https://forum.openclonk.org/flags/de.png"/></a>
</div>
<div id="nav_search">
<form action="https://www.openclonk.org/header/search.php" id="nav_searchform" method="get" target="_top"><div>
<input id="nav_searchInput" name="s" type="text" value="search" onfocus="if(this.value == 'search') { this.value = ''; }" onblur="if(this.value == '') { this.value = 'search'; }"/> in the
<select value="docs" name="p">
<option value="blog">blog</option>
<option value="wiki">website</option>
<option value="forum">forum</option>
<option value="docs">documentation</option>
<option value="git">repository</option>
<option value="crucible">crucible</option>
<option value="bugtrack">bugtracker</option>
</select>
<input type='submit' id="nav_searchButton" value="Go" title="Search" />
</div></form>
</div>
<!-- logo -->
<div id="nav_logo">
<a href="https://www.openclonk.org/" target="_top"><img src="https://www.openclonk.org/header/logo.png" width="450" height="94" alt="OpenClonk"/></a>
</div>
<div id="nav_navigation">
<div id="nav_links">
<ul>
<li><a href="https://www.openclonk.org/" target="_top">Home</a></li>
<li><a href="https://www.openclonk.org/download/" target="_top">Download</a></li>
<li><a href="https://blog.openclonk.org/" target="_top">Blog</a></li>
<li><a href="https://forum.openclonk.org/" target="_top">Forum</a></li>
<li><a href="https://league.openclonk.org/" target="_top">League</a></li>
<li><a href="https://wiki.openclonk.org/w/C4Script_Documentation" target="_top">Docs</a></li>
<li><a href="https://wiki.openclonk.org/w/Development" target="_top">Developers</a></li>
<li><a href="https://git.openclonk.org/openclonk.git" target="_top">Repository</a></li>
<li><a href="https://bugs.openclonk.org" target="_top">Bugs</a></li>
</ul>
</div>
<a href="http://wiki.openclonk.org/"><img src="http://www.openclonk.org/header/logo.png" alt="OpenClonk"/></a>
</div>
</div>
<!-- Navigation Menu -->
<div id="nav_navigation">
<!-- search -->
<div id="nav_search">
<form action="http://www.openclonk.org/header/search.php" id="searchform" method="get"><div>
search <input id="searchInput" name="s" type="text" value="" /> in the
<select name="p">
<option value="blog">blog</option>
<option selected="selected" value="functions">c4script function list</option>
<option value="docs">c4script reference</option>
<option value="bugtrack">bugtracker</option>
<option value="forum">forum</option>
<option value="hg">hg changelog</option>
<option value="hg-resources">hg resources changelog</option>
<option value="wiki">website</option>
</select>
<input type='submit' class="nav_searchButton" id="searchButton" value="Go" title="Search" />
</div></form>
</div>
<ul>
<li><!--[if lt IE 9]><span><![endif]--><a href="http://www.openclonk.org/">Home</a><!--[if lt IE 9]></span><![endif]--> <ul>
<li><a href="http://wiki.openclonk.org/w/FAQ">FAQ</a></li>
<li><a href="http://wiki.openclonk.org/w/About">About</a></li>
</ul>
</li>
<li><!--[if lt IE 9]><span><![endif]--><a href="http://www.openclonk.org/w/download">Download</a><!--[if lt IE 9]></span><![endif]--> <ul>
<li><a href="http://www.openclonk.org/download">Latest Release</a></li>
<li><a href="http://www.openclonk.org/nightly-builds">Nightly builds</a></li>
</ul>
</li>
<li><!--[if lt IE 9]><span><![endif]--><a href="http://forum.openclonk.org/">Forum</a><!--[if lt IE 9]></span><![endif]--></li>
<li><!--[if lt IE 9]><span><![endif]--><a href="http://wiki.openclonk.org/w/Development">Development</a><!--[if lt IE 9]></span><![endif]--> <ul>
<li><a href="http://bugs.openclonk.org">Bugtracker</a></li>
<li><a href="http://hg.openclonk.org/openclonk/">Repository</a></li>
<li><a href="http://hg.openclonk.org/openclonk-resources/">Resource Repository</a></li>
</ul>
</li>
<li><a class="current" href="http://wiki.openclonk.org/w/C4Script_Documentation">Documentation</a> <ul>
<li><a href="http://docs.openclonk.org/en/sdk/">C4Script reference</a></li>
</ul>
</li>
<li><!--[if lt IE 9]><span><![endif]--><a href="http://blog.openclonk.org/">Blog</a><!--[if lt IE 9]></span><![endif]--></li>
</ul>
</div>
</header>

View File

@ -7,7 +7,7 @@
<!-- Take care: Apparently microsofts html help compiler doesn't parse the html properly,
and needs at least some of the whitespace added with xsl:text below, and perhaps that there not be any in other places. -->
<xsl:template match="toc">
<xsl:template match="doc">
<HTML>
<HEAD>
</HEAD>
@ -27,18 +27,15 @@ and needs at least some of the whitespace added with xsl:text below, and perhaps
</UL>
</xsl:template>
<xsl:template match="li[@class='index']">
</xsl:template>
<xsl:template match="li">
<LI><xsl:text> </xsl:text><OBJECT type="text/sitemap"><xsl:text>
</xsl:text>
<param name="Name">
<xsl:attribute name="value"><xsl:for-each select="text()|emlink/text()"><xsl:value-of select="normalize-space(string(.))" /></xsl:for-each></xsl:attribute>
<xsl:attribute name="value"><xsl:for-each select="text()|a/text()"><xsl:value-of select="normalize-space(string(.))" /></xsl:for-each></xsl:attribute>
</param><xsl:text>
</xsl:text>
<xsl:if test="emlink/@href"><param name="Local">
<xsl:attribute name="value">sdk\<xsl:value-of select="translate(string(emlink/@href), '/', '\\')" /></xsl:attribute>
<xsl:if test="a/@href"><param name="Local">
<xsl:attribute name="value">sdk\<xsl:value-of select="translate(string(a/@href), '/', '\\')" /></xsl:attribute>
</param><xsl:text>
</xsl:text></xsl:if>
</OBJECT>

View File

@ -1,44 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" encoding="cp1252" doctype-public="-//IETF//DTD HTML//EN" />
<!-- Take care: Apparently microsofts html help compiler doesn't parse the html properly,
and needs at least some of the whitespace added with xsl:text below, and perhaps that there not be any in other places. -->
<xsl:template match="toc">
<HTML>
<HEAD>
</HEAD>
<BODY>
<UL>
<xsl:apply-templates select=".//li[@class='index']/ul/li" />
</UL>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="li">
<LI><xsl:text> </xsl:text><OBJECT type="text/sitemap"><xsl:text>
</xsl:text>
<param name="Name">
<xsl:attribute name="value"><xsl:for-each select="text()|emlink/text()"><xsl:value-of select="normalize-space(string(.))" /></xsl:for-each></xsl:attribute>
</param><xsl:text>
</xsl:text>
<xsl:if test="emlink/@href"><param name="Local">
<xsl:attribute name="value">sdk\<xsl:value-of select="translate(string(emlink/@href), '/', '\\')" /></xsl:attribute>
</param><xsl:text>
</xsl:text></xsl:if>
</OBJECT>
<xsl:apply-templates />
</LI>
</xsl:template>
<xsl:template match="*">
<xsl:apply-templates select="*" />
</xsl:template>
<xsl:template match="text()" />
</xsl:stylesheet>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
docs/images/Hut.png 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1019 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 769 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

Some files were not shown because too many files have changed in this diff Show More