X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=install.py;h=3a2f284fba37e2e6da425a8337f5301709f69e0f;hp=2a0f8fab87df362b33f7944bf9dea94c8cc74561;hb=35afb8e83e19ad68aabcbfcf0bbe5cfde1e4881f;hpb=d0cf6ff0a19f0e4957b30e8d3f676848744ae013 diff --git a/install.py b/install.py index 2a0f8fab..3a2f284f 100644 --- a/install.py +++ b/install.py @@ -1,17 +1,17 @@ # Copyright (C) 2001-2006 William Joseph. -# +# # This file is part of GtkRadiant. -# +# # GtkRadiant 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. -# +# # GtkRadiant 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 GtkRadiant; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA @@ -22,7 +22,6 @@ Builds the ./install directory. Copies files from various locations: ./setup/data/tools/ ./games// -..//.dll ./include/version.default is used to generate RADIANT_MAJOR and RADIANT_MINOR """ @@ -32,16 +31,16 @@ import shutil def assertMessage(condition, message): if not condition: raise Exception(message) - + def copyFile(source, target): assertMessage(os.path.isfile(source), "failed to find file: " + source) print source, "->", target shutil.copy2(source, target) - + def copyFileIfExists(source, target): if os.path.exists(source): copyFile(source, target) - + def copySvn(source, target): assertMessage(os.path.isdir(source), "failed to find directory: " + source) if not os.path.exists(target): @@ -54,7 +53,7 @@ def copySvn(source, target): copySvn(absolute, absTarget) else: copyFile(absolute, absTarget) - + def copyGame(source, game, target): assertMessage(os.path.isdir(source), "failed to find directory: " + source) assertMessage(os.path.isdir(target), "failed to find directory: " + target) @@ -65,15 +64,15 @@ def copyGame(source, game, target): gamesDir = os.path.join(target, "games") if not os.path.exists(gamesDir): os.mkdir(gamesDir) - copyFile(os.path.join(root, "games", gamename), os.path.join(gamesDir, gamename)) - + copyFile(os.path.join(root, "games", gamename), os.path.join(gamesDir, gamename)) + thisDir = os.path.dirname(__file__) gamesRoot = os.path.join(thisDir, "games") installRoot = os.path.join(thisDir, "install") if not os.path.exists(installRoot): os.mkdir(installRoot) - + # copy generic data copySvn(os.path.join(thisDir, os.path.normpath("setup/data/tools")), installRoot) @@ -91,7 +90,10 @@ games = [ ("Q4Pack/tools", "q4"), ("Sof2Pack", "sof2"), ("STVEFPack", "stvef"), - ("WolfPack/bin", "wolf") + ("WolfPack/bin", "wolf"), + ("NexuizPack", "nexuiz"), + ("DarkPlacesPack", "darkplaces"), + ("WarsowPack/tools", "warsow") ] # copy games @@ -99,24 +101,17 @@ for game in games: copyGame(gamesRoot, game, installRoot) # copy win32 dlls -gtk2Root = os.path.normpath(os.path.join(thisDir, "../gtk2-2.4")) +gtk2Root = os.path.normpath(os.path.join(thisDir, "../gtk2-2.10/install")) if os.path.exists(gtk2Root): - copySvn(os.path.join(gtk2Root, "install"), installRoot) - -libxml2 = os.path.normpath(os.path.join(thisDir, "../libxml2-2.6/win32/install/libxml2.dll")) + copySvn(gtk2Root, installRoot) + +libxml2 = os.path.normpath(os.path.join(thisDir, "../libxml2-2.6/bin/libxml2.dll")) copyFileIfExists(libxml2, installRoot) - -libpng = os.path.normpath(os.path.join(thisDir, "../libpng-1.2/lib/libpng13.dll")) -copyFileIfExists(libpng, installRoot) - + libmhash = os.path.normpath(os.path.join(thisDir, "../mhash-0.9/win32/libmhash/Release/libmhash.dll")) copyFileIfExists(libmhash, installRoot) - -zlib = os.path.normpath(os.path.join(thisDir, "../zlib1-1.2/zlib1.dll")) -copyFileIfExists(zlib, installRoot) -msvcr71 = os.path.normpath(os.path.join(thisDir, "../msvc_redist/msvcr71.dll")) -copyFileIfExists(msvcr71, installRoot) +copySvn("../msvc_redist", installRoot) dbghelp = os.path.normpath(os.path.join(thisDir, "../msvc_redist/dbghelp.dll")) copyFileIfExists(dbghelp, installRoot)