Changeset 9

Show
Ignore:
Timestamp:
02/12/06 13:47:01 (3 years ago)
Author:
spog
Message:

added msvc dlls to install.py; added svn revision lookup to makeversion.py; updated COMPILING

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • GtkRadiant/trunk/COMPILING

    r3 r9  
    2525- scons = 0.96 (radiant is built with scons rather than make) 
    2626- python >= 2.3.0 (scons requires python, some build steps use python) 
     27- svn >= 1.1 (some build steps use svn) 
    2728 
    2829dependencies: 
     
    5253- visual studio .net 2003 
    5354- 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) 
    5557 
    5658dependencies are prepackaged archives, extract them to the directory above GtkRadiant.sln: 
     
    6163- http://zerowing.idsoftware.com/files/radiant/developer/1.5/libpng-1.2.5.zip (for imagepng module) 
    6264- 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) 
    6366 
    6467build: 
    6568Open GtkRadiant.sln. 
    66 In tools > options > projects > VC++ Directories > executables, add the path to python.exe (e.g. c:\python23\) 
     69In tools > options > projects > VC++ Directories > executables, add the paths to python.exe (e.g. c:\python23\) and svn.exe (e.g. c:\svn\)  
    6770Hit 'Build > Build Solution' (F7) 
    6871 
  • GtkRadiant/trunk/gen.vcproj

    r1 r9  
    125125                                                CommandLine="run_python.bat makeversion.py 
    126126" 
    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
    128128                                                Outputs="$(InputDir)include\version.h;$(InputDir)include\aboutmsg.h"/> 
    129129                                </FileConfiguration> 
     
    134134                                                CommandLine="run_python.bat makeversion.py 
    135135" 
    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
    137137                                                Outputs="$(InputDir)include\version.h;$(InputDir)include\aboutmsg.h"/> 
    138138                                </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""" 
     20Builds the ./install directory. 
     21 
     22Copies 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""" 
    128 
    229import os 
    330import shutil 
    431 
    5  
     32def assertMessage(condition, message): 
     33  if not condition: 
     34    raise Exception(message) 
     35     
    636def copyFile(source, target): 
    7   assert os.path.isfile(source) 
     37  assertMessage(os.path.isfile(source), "failed to find file: " + source) 
    838  targetFile = target 
    939  if os.path.isdir(targetFile): 
     
    1747     
    1848def copySvn(source, target): 
    19   assert os.path.isdir(source) 
     49  assertMessage(os.path.isdir(source), "failed to find directory: " + source) 
    2050  if not os.path.exists(target): 
    2151    os.mkdir(target) 
     
    3060       
    3161def 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) 
    3464  root = os.path.join(source, os.path.normpath(game[0])) 
    3565  if os.path.exists(root): 
     
    88118zlib = os.path.normpath(os.path.join(thisDir, "../zlib1-1.2/zlib1.dll")) 
    89119copyFileIfExists(zlib, installRoot) 
     120 
     121msvcr71 = os.path.normpath(os.path.join(thisDir, "../msvc_redist/msvcr71.dll")) 
     122copyFileIfExists(msvcr71, installRoot) 
     123 
     124dbghelp = os.path.normpath(os.path.join(thisDir, "../msvc_redist/dbghelp.dll")) 
     125copyFileIfExists(dbghelp, installRoot) 
     126 
     127# create version files 
     128version = open(os.path.join(thisDir, "include/version.default"), "rt").readline().split(".") 
     129assertMessage(len(version) == 3, "failed to parse include/version.default") 
     130open(os.path.join(thisDir, "install/RADIANT_MAJOR"), "wt").write(str(version[1])) 
     131open(os.path.join(thisDir, "install/RADIANT_MINOR"), "wt").write(str(version[2])) 
  • GtkRadiant/trunk/makeversion.py

    r1 r9  
    3333#   otherwise, use environment variable $RADIANT_ABOUTMSG 
    3434# input: 
    35 #   include/aboutmsg.default 
    36 #   or file pointed to by $RADIANT_ABOUTMSG if exists 
     35#   file pointed to by $RADIANT_ABOUTMSG if exists 
     36#   else include/aboutmsg.default 
    3737# ouput: 
    3838#   include/aboutmsg.h 
    3939 
    4040import sys, re, string, os 
     41 
     42import svn 
    4143 
    4244def get_version(): 
     
    7476  if ( os.environ.has_key('RADIANT_ABOUTMSG') ): 
    7577    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())) 
    8186  # optional additional message 
    8287  if ( not append_about is None ): 
  • GtkRadiant/trunk/setup/win32/build.py

    r1 r9  
    11# Copyright (C) 2001-2006 William Joseph. 
    2 # For a list of contributors, see the accompanying CONTRIBUTORS file. 
    32#  
    43# This file is part of GtkRadiant. 
  • GtkRadiant/trunk/setup/win32/installer.py

    r1 r9  
    11# Copyright (C) 2001-2006 William Joseph. 
    2 # For a list of contributors, see the accompanying CONTRIBUTORS file. 
    32#  
    43# This file is part of GtkRadiant. 
  • GtkRadiant/trunk/setup/win32/msi.py

    r1 r9  
    11# Copyright (C) 2001-2006 William Joseph. 
    2 # For a list of contributors, see the accompanying CONTRIBUTORS file. 
    32#  
    43# This file is part of GtkRadiant.