mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +00:00
added msvc dlls to install.py; added svn revision lookup to makeversion.py; updated COMPILING
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@9 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
parent
3cbc246f85
commit
e483272c36
8 changed files with 66 additions and 20 deletions
|
@ -24,6 +24,7 @@ environment:
|
||||||
- gcc3 (preferably)
|
- gcc3 (preferably)
|
||||||
- scons = 0.96 (radiant is built with scons rather than make)
|
- scons = 0.96 (radiant is built with scons rather than make)
|
||||||
- python >= 2.3.0 (scons requires python, some build steps use python)
|
- python >= 2.3.0 (scons requires python, some build steps use python)
|
||||||
|
- svn >= 1.1 (some build steps use svn)
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- gtk+ >= 2.4.0 (requires glib, atk, pango, iconv, etc)
|
- gtk+ >= 2.4.0 (requires glib, atk, pango, iconv, etc)
|
||||||
|
@ -51,7 +52,8 @@ Win32 (2000 or XP)
|
||||||
environment:
|
environment:
|
||||||
- visual studio .net 2003
|
- visual studio .net 2003
|
||||||
- microsoft c++ compiler 7.1 (comes with vs.net 2003)
|
- microsoft c++ compiler 7.1 (comes with vs.net 2003)
|
||||||
- python 2.3.0 or later
|
- python 2.3.0 or later (some build steps use python)
|
||||||
|
- subversion 1.1 or later (some build steps use svn)
|
||||||
|
|
||||||
dependencies are prepackaged archives, extract them to the directory above GtkRadiant.sln:
|
dependencies are prepackaged archives, extract them to the directory above GtkRadiant.sln:
|
||||||
- http://zerowing.idsoftware.com/files/radiant/developer/1.5/gtk2-2.4.14.zip (gtk-wimp, gtkglext, gtk, glib, atk, pango, iconv etc)
|
- http://zerowing.idsoftware.com/files/radiant/developer/1.5/gtk2-2.4.14.zip (gtk-wimp, gtkglext, gtk, glib, atk, pango, iconv etc)
|
||||||
|
@ -60,10 +62,11 @@ dependencies are prepackaged archives, extract them to the directory above GtkRa
|
||||||
- http://zerowing.idsoftware.com/files/radiant/developer/1.5/zlib1-1.2.1.zip (for archivezip module)
|
- http://zerowing.idsoftware.com/files/radiant/developer/1.5/zlib1-1.2.1.zip (for archivezip module)
|
||||||
- http://zerowing.idsoftware.com/files/radiant/developer/1.5/libpng-1.2.5.zip (for imagepng module)
|
- http://zerowing.idsoftware.com/files/radiant/developer/1.5/libpng-1.2.5.zip (for imagepng module)
|
||||||
- http://zerowing.idsoftware.com/files/radiant/developer/1.5/mhash-0.9.1.zip (for q3map2)
|
- http://zerowing.idsoftware.com/files/radiant/developer/1.5/mhash-0.9.1.zip (for q3map2)
|
||||||
|
- http://zerowing.idsoftware.com/files/radiant/developer/1.5/msvc_redist.zip (msvc runtime libraries)
|
||||||
|
|
||||||
build:
|
build:
|
||||||
Open GtkRadiant.sln.
|
Open GtkRadiant.sln.
|
||||||
In tools > options > projects > VC++ Directories > executables, add the path to python.exe (e.g. c:\python23\)
|
In tools > options > projects > VC++ Directories > executables, add the paths to python.exe (e.g. c:\python23\) and svn.exe (e.g. c:\svn\)
|
||||||
Hit 'Build > Build Solution' (F7)
|
Hit 'Build > Build Solution' (F7)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
|
|
@ -124,7 +124,7 @@
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="run_python.bat makeversion.py
|
CommandLine="run_python.bat makeversion.py
|
||||||
"
|
"
|
||||||
AdditionalDependencies="$(InputDir)include\version.default;$(InputDir)include\aboutmsg.default"
|
AdditionalDependencies="$(InputDir)include\version.default;$(InputDir)include\aboutmsg.default;$(InputDir)svn.py;$(InputDir).svn\entriest"
|
||||||
Outputs="$(InputDir)include\version.h;$(InputDir)include\aboutmsg.h"/>
|
Outputs="$(InputDir)include\version.h;$(InputDir)include\aboutmsg.h"/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
|
@ -133,7 +133,7 @@
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="run_python.bat makeversion.py
|
CommandLine="run_python.bat makeversion.py
|
||||||
"
|
"
|
||||||
AdditionalDependencies="$(InputDir)include\version.default;$(InputDir)include\aboutmsg.default"
|
AdditionalDependencies="$(InputDir).svn\entries;$(InputDir)include\version.default;$(InputDir)include\aboutmsg.default;$(InputDir)svn.py"
|
||||||
Outputs="$(InputDir)include\version.h;$(InputDir)include\aboutmsg.h"/>
|
Outputs="$(InputDir)include\version.h;$(InputDir)include\aboutmsg.h"/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Custom SPoG experimental build
|
|
52
install.py
52
install.py
|
@ -1,10 +1,40 @@
|
||||||
|
# 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
|
||||||
|
|
||||||
|
"""
|
||||||
|
Builds the ./install directory.
|
||||||
|
|
||||||
|
Copies files from various locations:
|
||||||
|
./setup/data/tools/
|
||||||
|
./games/<gamepack>/
|
||||||
|
../<library>/<library>.dll
|
||||||
|
./include/version.default is used to generate RADIANT_MAJOR and RADIANT_MINOR
|
||||||
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
|
def assertMessage(condition, message):
|
||||||
|
if not condition:
|
||||||
|
raise Exception(message)
|
||||||
|
|
||||||
def copyFile(source, target):
|
def copyFile(source, target):
|
||||||
assert os.path.isfile(source)
|
assertMessage(os.path.isfile(source), "failed to find file: " + source)
|
||||||
targetFile = target
|
targetFile = target
|
||||||
if os.path.isdir(targetFile):
|
if os.path.isdir(targetFile):
|
||||||
targetFile = os.path.join(target, os.path.basename(source))
|
targetFile = os.path.join(target, os.path.basename(source))
|
||||||
|
@ -16,7 +46,7 @@ def copyFileIfExists(source, target):
|
||||||
copyFile(source, target)
|
copyFile(source, target)
|
||||||
|
|
||||||
def copySvn(source, target):
|
def copySvn(source, target):
|
||||||
assert os.path.isdir(source)
|
assertMessage(os.path.isdir(source), "failed to find directory: " + source)
|
||||||
if not os.path.exists(target):
|
if not os.path.exists(target):
|
||||||
os.mkdir(target)
|
os.mkdir(target)
|
||||||
for name in os.listdir(source):
|
for name in os.listdir(source):
|
||||||
|
@ -29,8 +59,8 @@ def copySvn(source, target):
|
||||||
copyFile(absolute, absTarget)
|
copyFile(absolute, absTarget)
|
||||||
|
|
||||||
def copyGame(source, game, target):
|
def copyGame(source, game, target):
|
||||||
assert os.path.isdir(source)
|
assertMessage(os.path.isdir(source), "failed to find directory: " + source)
|
||||||
assert os.path.isdir(target)
|
assertMessage(os.path.isdir(target), "failed to find directory: " + target)
|
||||||
root = os.path.join(source, os.path.normpath(game[0]))
|
root = os.path.join(source, os.path.normpath(game[0]))
|
||||||
if os.path.exists(root):
|
if os.path.exists(root):
|
||||||
gamename = game[1] + ".game"
|
gamename = game[1] + ".game"
|
||||||
|
@ -87,3 +117,15 @@ copyFileIfExists(libmhash, installRoot)
|
||||||
|
|
||||||
zlib = os.path.normpath(os.path.join(thisDir, "../zlib1-1.2/zlib1.dll"))
|
zlib = os.path.normpath(os.path.join(thisDir, "../zlib1-1.2/zlib1.dll"))
|
||||||
copyFileIfExists(zlib, installRoot)
|
copyFileIfExists(zlib, installRoot)
|
||||||
|
|
||||||
|
msvcr71 = os.path.normpath(os.path.join(thisDir, "../msvc_redist/msvcr71.dll"))
|
||||||
|
copyFileIfExists(msvcr71, installRoot)
|
||||||
|
|
||||||
|
dbghelp = os.path.normpath(os.path.join(thisDir, "../msvc_redist/dbghelp.dll"))
|
||||||
|
copyFileIfExists(dbghelp, installRoot)
|
||||||
|
|
||||||
|
# create version files
|
||||||
|
version = open(os.path.join(thisDir, "include/version.default"), "rt").readline().split(".")
|
||||||
|
assertMessage(len(version) == 3, "failed to parse include/version.default")
|
||||||
|
open(os.path.join(thisDir, "install/RADIANT_MAJOR"), "wt").write(str(version[1]))
|
||||||
|
open(os.path.join(thisDir, "install/RADIANT_MINOR"), "wt").write(str(version[2]))
|
||||||
|
|
|
@ -32,13 +32,15 @@
|
||||||
# for non-official builds, we have a default message
|
# for non-official builds, we have a default message
|
||||||
# otherwise, use environment variable $RADIANT_ABOUTMSG
|
# otherwise, use environment variable $RADIANT_ABOUTMSG
|
||||||
# input:
|
# input:
|
||||||
# include/aboutmsg.default
|
# file pointed to by $RADIANT_ABOUTMSG if exists
|
||||||
# or file pointed to by $RADIANT_ABOUTMSG if exists
|
# else include/aboutmsg.default
|
||||||
# ouput:
|
# ouput:
|
||||||
# include/aboutmsg.h
|
# include/aboutmsg.h
|
||||||
|
|
||||||
import sys, re, string, os
|
import sys, re, string, os
|
||||||
|
|
||||||
|
import svn
|
||||||
|
|
||||||
def get_version():
|
def get_version():
|
||||||
# version
|
# version
|
||||||
f = open('include/version.default', 'r')
|
f = open('include/version.default', 'r')
|
||||||
|
@ -73,11 +75,14 @@ def radiant_makeversion(append_about):
|
||||||
aboutfile = 'include/aboutmsg.default'
|
aboutfile = 'include/aboutmsg.default'
|
||||||
if ( os.environ.has_key('RADIANT_ABOUTMSG') ):
|
if ( os.environ.has_key('RADIANT_ABOUTMSG') ):
|
||||||
aboutfile = os.environ['RADIANT_ABOUTMSG']
|
aboutfile = os.environ['RADIANT_ABOUTMSG']
|
||||||
sys.stdout.write("about message is in %s\n" % aboutfile)
|
line = None
|
||||||
f = open(aboutfile, 'r')
|
if os.path.isfile(aboutfile):
|
||||||
buffer = f.read()
|
sys.stdout.write("about message is in %s\n" % aboutfile)
|
||||||
line = string.split(buffer, '\n')[0]
|
f = open(aboutfile, 'r')
|
||||||
f.close()
|
line = f.readline()
|
||||||
|
f.close()
|
||||||
|
else:
|
||||||
|
line = "Custom build based on revision " + str(svn.getRevision(os.getcwd()))
|
||||||
# optional additional message
|
# optional additional message
|
||||||
if ( not append_about is None ):
|
if ( not append_about is None ):
|
||||||
line += append_about
|
line += append_about
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Copyright (C) 2001-2006 William Joseph.
|
# Copyright (C) 2001-2006 William Joseph.
|
||||||
# For a list of contributors, see the accompanying CONTRIBUTORS file.
|
|
||||||
#
|
#
|
||||||
# This file is part of GtkRadiant.
|
# This file is part of GtkRadiant.
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Copyright (C) 2001-2006 William Joseph.
|
# Copyright (C) 2001-2006 William Joseph.
|
||||||
# For a list of contributors, see the accompanying CONTRIBUTORS file.
|
|
||||||
#
|
#
|
||||||
# This file is part of GtkRadiant.
|
# This file is part of GtkRadiant.
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
# Copyright (C) 2001-2006 William Joseph.
|
# Copyright (C) 2001-2006 William Joseph.
|
||||||
# For a list of contributors, see the accompanying CONTRIBUTORS file.
|
|
||||||
#
|
#
|
||||||
# This file is part of GtkRadiant.
|
# This file is part of GtkRadiant.
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue