Changeset 9
- Timestamp:
- 02/12/06 13:47:01 (3 years ago)
- Files:
-
- GtkRadiant/trunk/COMPILING (modified) (3 diffs)
- GtkRadiant/trunk/gen.vcproj (modified) (2 diffs)
- GtkRadiant/trunk/include/aboutmsg.default (deleted)
- GtkRadiant/trunk/install.py (modified) (4 diffs)
- GtkRadiant/trunk/makeversion.py (modified) (2 diffs)
- GtkRadiant/trunk/setup/win32/build.py (modified) (1 diff)
- GtkRadiant/trunk/setup/win32/installer.py (modified) (1 diff)
- GtkRadiant/trunk/setup/win32/msi.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
GtkRadiant/trunk/COMPILING
r3 r9 25 25 - scons = 0.96 (radiant is built with scons rather than make) 26 26 - python >= 2.3.0 (scons requires python, some build steps use python) 27 - svn >= 1.1 (some build steps use svn) 27 28 28 29 dependencies: … … 52 53 - visual studio .net 2003 53 54 - microsoft c++ compiler 7.1 (comes with vs.net 2003) 54 - python 2.3.0 or later 55 - python 2.3.0 or later (some build steps use python) 56 - subversion 1.1 or later (some build steps use svn) 55 57 56 58 dependencies are prepackaged archives, extract them to the directory above GtkRadiant.sln: … … 61 63 - http://zerowing.idsoftware.com/files/radiant/developer/1.5/libpng-1.2.5.zip (for imagepng module) 62 64 - http://zerowing.idsoftware.com/files/radiant/developer/1.5/mhash-0.9.1.zip (for q3map2) 65 - http://zerowing.idsoftware.com/files/radiant/developer/1.5/msvc_redist.zip (msvc runtime libraries) 63 66 64 67 build: 65 68 Open GtkRadiant.sln. 66 In tools > options > projects > VC++ Directories > executables, add the path to python.exe (e.g. c:\python23\)69 In tools > options > projects > VC++ Directories > executables, add the paths to python.exe (e.g. c:\python23\) and svn.exe (e.g. c:\svn\) 67 70 Hit 'Build > Build Solution' (F7) 68 71 GtkRadiant/trunk/gen.vcproj
r1 r9 125 125 CommandLine="run_python.bat makeversion.py 126 126 " 127 AdditionalDependencies="$(InputDir)include\version.default;$(InputDir)include\aboutmsg.default "127 AdditionalDependencies="$(InputDir)include\version.default;$(InputDir)include\aboutmsg.default;$(InputDir)svn.py;$(InputDir).svn\entriest" 128 128 Outputs="$(InputDir)include\version.h;$(InputDir)include\aboutmsg.h"/> 129 129 </FileConfiguration> … … 134 134 CommandLine="run_python.bat makeversion.py 135 135 " 136 AdditionalDependencies="$(InputDir) include\version.default;$(InputDir)include\aboutmsg.default"136 AdditionalDependencies="$(InputDir).svn\entries;$(InputDir)include\version.default;$(InputDir)include\aboutmsg.default;$(InputDir)svn.py" 137 137 Outputs="$(InputDir)include\version.h;$(InputDir)include\aboutmsg.h"/> 138 138 </FileConfiguration> GtkRadiant/trunk/install.py
r2 r9 1 # Copyright (C) 2001-2006 William Joseph. 2 # 3 # This file is part of GtkRadiant. 4 # 5 # GtkRadiant is free software; you can redistribute it and/or modify 6 # it under the terms of the GNU General Public License as published by 7 # the Free Software Foundation; either version 2 of the License, or 8 # (at your option) any later version. 9 # 10 # GtkRadiant is distributed in the hope that it will be useful, 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 # GNU General Public License for more details. 14 # 15 # You should have received a copy of the GNU General Public License 16 # along with GtkRadiant; if not, write to the Free Software 17 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 19 """ 20 Builds the ./install directory. 21 22 Copies files from various locations: 23 ./setup/data/tools/ 24 ./games/<gamepack>/ 25 ../<library>/<library>.dll 26 ./include/version.default is used to generate RADIANT_MAJOR and RADIANT_MINOR 27 """ 1 28 2 29 import os 3 30 import shutil 4 31 5 32 def assertMessage(condition, message): 33 if not condition: 34 raise Exception(message) 35 6 36 def copyFile(source, target): 7 assert os.path.isfile(source)37 assertMessage(os.path.isfile(source), "failed to find file: " + source) 8 38 targetFile = target 9 39 if os.path.isdir(targetFile): … … 17 47 18 48 def copySvn(source, target): 19 assert os.path.isdir(source)49 assertMessage(os.path.isdir(source), "failed to find directory: " + source) 20 50 if not os.path.exists(target): 21 51 os.mkdir(target) … … 30 60 31 61 def copyGame(source, game, target): 32 assert os.path.isdir(source)33 assert os.path.isdir(target)62 assertMessage(os.path.isdir(source), "failed to find directory: " + source) 63 assertMessage(os.path.isdir(target), "failed to find directory: " + target) 34 64 root = os.path.join(source, os.path.normpath(game[0])) 35 65 if os.path.exists(root): … … 88 118 zlib = os.path.normpath(os.path.join(thisDir, "../zlib1-1.2/zlib1.dll")) 89 119 copyFileIfExists(zlib, installRoot) 120 121 msvcr71 = os.path.normpath(os.path.join(thisDir, "../msvc_redist/msvcr71.dll")) 122 copyFileIfExists(msvcr71, installRoot) 123 124 dbghelp = os.path.normpath(os.path.join(thisDir, "../msvc_redist/dbghelp.dll")) 125 copyFileIfExists(dbghelp, installRoot) 126 127 # create version files 128 version = open(os.path.join(thisDir, "include/version.default"), "rt").readline().split(".") 129 assertMessage(len(version) == 3, "failed to parse include/version.default") 130 open(os.path.join(thisDir, "install/RADIANT_MAJOR"), "wt").write(str(version[1])) 131 open(os.path.join(thisDir, "install/RADIANT_MINOR"), "wt").write(str(version[2])) GtkRadiant/trunk/makeversion.py
r1 r9 33 33 # otherwise, use environment variable $RADIANT_ABOUTMSG 34 34 # input: 35 # include/aboutmsg.default36 # or file pointed to by $RADIANT_ABOUTMSG if exists35 # file pointed to by $RADIANT_ABOUTMSG if exists 36 # else include/aboutmsg.default 37 37 # ouput: 38 38 # include/aboutmsg.h 39 39 40 40 import sys, re, string, os 41 42 import svn 41 43 42 44 def get_version(): … … 74 76 if ( os.environ.has_key('RADIANT_ABOUTMSG') ): 75 77 aboutfile = os.environ['RADIANT_ABOUTMSG'] 76 sys.stdout.write("about message is in %s\n" % aboutfile) 77 f = open(aboutfile, 'r') 78 buffer = f.read() 79 line = string.split(buffer, '\n')[0] 80 f.close() 78 line = None 79 if os.path.isfile(aboutfile): 80 sys.stdout.write("about message is in %s\n" % aboutfile) 81 f = open(aboutfile, 'r') 82 line = f.readline() 83 f.close() 84 else: 85 line = "Custom build based on revision " + str(svn.getRevision(os.getcwd())) 81 86 # optional additional message 82 87 if ( not append_about is None ): GtkRadiant/trunk/setup/win32/build.py
r1 r9 1 1 # Copyright (C) 2001-2006 William Joseph. 2 # For a list of contributors, see the accompanying CONTRIBUTORS file.3 2 # 4 3 # This file is part of GtkRadiant. GtkRadiant/trunk/setup/win32/installer.py
r1 r9 1 1 # Copyright (C) 2001-2006 William Joseph. 2 # For a list of contributors, see the accompanying CONTRIBUTORS file.3 2 # 4 3 # This file is part of GtkRadiant. GtkRadiant/trunk/setup/win32/msi.py
r1 r9 1 1 # Copyright (C) 2001-2006 William Joseph. 2 # For a list of contributors, see the accompanying CONTRIBUTORS file.3 2 # 4 3 # This file is part of GtkRadiant.
