aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildall.bat2
-rw-r--r--building.txt46
-rw-r--r--tools/cleantree.py152
3 files changed, 6 insertions, 194 deletions
diff --git a/buildall.bat b/buildall.bat
index 978f27fc2..03013cb6a 100644
--- a/buildall.bat
+++ b/buildall.bat
@@ -1,4 +1,4 @@
-nasm -h >& nul
+nasm -h > nul 2>&1
if %errorlevel% NEQ 0 goto nasmerror
echo on
diff --git a/building.txt b/building.txt
index 4de5e0a0a..d59542ba3 100644
--- a/building.txt
+++ b/building.txt
@@ -1,54 +1,18 @@
Prerequisits:
- Visual C++ 2010
Visual C++ 2010 Express Edition is probably also ok (not tested)
- Microsoft Visual C++ 2008 (Express Edition) with SP1 (http://www.microsoft.com/express/vc/) is probably still working
- but is not actively supported anymore
- Perl (cygwin perl (http://www.cygwin.com/), strawberry perl (http://strawberryperl.com) or activestate perl (http://www.activestate.com/activeperl/) )
-- Python (2.7 used: http://www.python.org/)
+- Python (2.7 used: http://www.python.org/) + libxml2 python bindings
- Gnuwin32 gawk, gzip, flex, bison (and it's dependancies), sed (and it's dependancies (http://gnuwin32.sourceforge.net/)
- nasm (http://nasm.sourceforge.net). Make sure the nasm directory is in your path
- Make sure that the gnuwin32 binaries are in a directory path with no spaces, like 'C:\gnuwin32\bin'
- Make sure the environment PATH includes the directory where the gnuwin32 binaries are
- Make sure python, perl are in the environment PATH
- make sure the command prompt is set for compiling with the visual studio compiler (vcvars32.bat)
-- When using Visual C++ 2008 define the environment variable VS2008=1
+- To build the installer: nsis
-When you want to use the tools/cleantree.py script, also install svn command line client:
-- Download/install a command line version of svn. http://www.sliksvn.com/en/download (other versions are fine too).
-- Make sure that the directory where the svn.exe file is, is added to the System PATH
+Run the command buildall.bat. This will build everything including the installer.
-Building freetype:
-- open freetype\freetype.sln in Visual C++ 2008 Express Edition or freetype\freetypevc10.sln in Visual C++ 2010
- Build configurations 'Release Multithreaded' and 'Debug Multithreaded'
-
-Building openssl:
-- run 'perl Configure VC-WIN32' in the openssl directory
-- run 'ms\do_nasm.bat' in the openssl' directory
-- run 'nmake -f ms\nt.mak' in the openssl directory
-- run 'nmake DEBUG=1 -f ms\nt.mak' in the openssl directory (if you want to build the DEBUG version of vcxsrv)
-
-Building pthreads:
-- goto pthreads directory
-- run 'nmake VC-static'
-- run 'nmake VC-static-debug'
-
-Building mhmake
-- open tools\mhmake\mhmake.sln in Visual C++ 2008 or tools\mhmake\mhmakevc10.sln in Visual C++ 2010
-- Build the Debug and Release configurations
-- Copy Debug\mhmake_dbg.exe and Release\mhmake.exe to a directory in your environment PATH
-
-Add an environment variable named MHMAKECONF having as value the root directory of the sources.
-e.g.: set MHMAKECONF=c:\vcxsrv\trunk
-
-Building vcxsrv:
-- run 'mhmake DEBUG=1 MAKESERVER=1 vcxsrv_dbg.exe' in xorg-server directory for a debugable version (doing this first will cause the next
- step not to generate an error
-- run 'mhmake MAKESERVER=1' in xorg-server directory.
-
-To build installer:
-- install http://nsis.sourceforge.net
-- run 'packageall.bat' in xorg-server\installer
-
-To clean the project tree (uses svn) go to the top directory at a command prompt and type in 'python tools\cleantree.py -r'
-Do this only working on a source tree checked out with svn (svn co https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/trunk).
+To clean the project tree (uses git) go to the top directory at a command prompt
+and type in 'git clean -dfx'
diff --git a/tools/cleantree.py b/tools/cleantree.py
deleted file mode 100644
index e873723df..000000000
--- a/tools/cleantree.py
+++ /dev/null
@@ -1,152 +0,0 @@
-#!/usr/bin/python
-__doc__="""%prog [options] [<directory>]
-
-Removes all unversioned files from a subversion working copy directory
-<directory>.
-When <directory> is not specified the current directory is used.
-<directory can also be a white space seperated list of directories.
-"""
-import os,sys,re,subprocess
-from optparse import OptionParser
-
-parser = OptionParser(__doc__)
-parser.add_option("-r", "--recursive", action='store_true', dest="Recursive", default=False, help="Also clean subdirectories.")
-parser.add_option("-s", "--skiputil", action='store_true', dest="SkipUtil", default=False, help="Skip util and tools directory.")
-parser.add_option("-v", "--noverbose", action='store_true', dest="NoVerbose", default=False, help="No output.")
-
-(g_Options, g_Args) = parser.parse_args()
-
-if g_Args:
- for i in range(len(g_Args)):
- g_Args[i]=os.path.abspath(g_Args[i])
- if not os.path.isdir(g_Args[i]):
- parser.error("%s is not a valid directory"%g_Args[i])
-
-NotWorkRe=re.compile("'\.' is not a working copy")
-
-################################################################################
-
-def Print (Message,NoVerbose=None,Append='\n'):
- if NoVerbose!=1:
- Message+=Append
- sys.stdout.write(Message)
-
-################################################################################
-class RunCommandException(Exception):
- def __init__(this,CommandLine,Output=None):
- this.CommandLine=CommandLine
- this.Output=Output
- def __str__(this):
- Ret="\n!!! RunCommand exception:\n-> Commandline:\n"
- Ret+=this.CommandLine
- if this.Output:
- Ret+="\n-> Output:\n"
- Ret+=this.Output
- else:
- Ret+="\n-> Command not found"
- Ret+="\n"
- return Ret
-################################################################################
-PIPE=subprocess.PIPE
-STDOUT=subprocess.STDOUT
-
-def RunCommand(Command):
- try:
- if sys.platform=='linux2':
- Process=subprocess.Popen(Command, stdin=PIPE, stdout=PIPE, stderr=STDOUT, shell=True)
- else:
- CREATE_NO_WINDOW=0x8000000
- Process=subprocess.Popen(Command, stdin=PIPE, stdout=PIPE, stderr=STDOUT, creationflags=CREATE_NO_WINDOW, shell=True)
- import msvcrt
- msvcrt.setmode(Process.stdout.fileno(), os.O_TEXT) # Threat output as ascii noy binary
- except:
- raise RunCommandException(Command)
- return Process
-
-################################################################################
-def DelTreeNoJunctions(Dir):
- try:
- os.rmdir(Dir)
- # empty dir or it was a junction, so we can return immediately
- return
- except:
- pass
-
- for root, dirs, files in os.walk(Dir, topdown=True):
- for name in files:
- os.remove(os.path.join(root,name))
- for dir in dirs:
- # first try just to remove the directory. This is to be sure that when it is a symbolic link
- # just the link is removed and not the complete contents where it points to
- try:
- os.rmdir(os.path.join(root,dir))
- del dirs[dir] # do not walk this directory
- except:
- pass # go further in the directory tree
- # Now delete the empty directories left over from the previous walk
- for root, dirs, files in os.walk(Dir, topdown=False):
- for dir in dirs:
- os.rmdir(os.path.join(root,dir))
- os.rmdir(Dir)
-
-################################################################################
-def ProcessSvnLine(line,NoVerbose=None):
- if line:
- if NotWorkRe.search(line):
- Print(NotWorkRe.sub("'%s' is not a working copy directory. Not cleaning this directory."%(re.sub(r"\\",r"\\\\",Dir)),line))
- sys.exit(1)
- if line[0]=='?' or line[0]=='I':
- Item=re.sub("^\s+","",line[2:])
- if g_Options.SkipUtil:
- if Item[:5]=='util'+os.sep:
- return
- if Item[:6]=='tools'+os.sep:
- return
- if os.path.isdir(Item):
- Print('Deleting directory %s'%(os.path.abspath(Item)),NoVerbose)
- try:
- DelTreeNoJunctions(Item)
- except:
- print "Error deleting directory %s. Contains read-only files?"%Item
- else:
- Print('Deleting file %s'%(os.path.abspath(Item)),NoVerbose)
- try:
- os.remove(Item)
- except Exception,Details:
- print "Error deleting file %s. Is read-only? "%Item
- print Details
-################################################################################
-def CleanTree(Dir, NoVerbose=None):
- Print("Cleaning '"+Dir+"'")
- if g_Options.Recursive:
- Command='svn st --no-ignore'
- else:
- Command='svn st -N --no-ignore'
- Process=RunCommand(Command)
- StdOut=Process.stdout
- all_data=""
- while 1:
- done = Process.poll()
- if done == None or done == 0:
- line=StdOut.readline()
- all_data+=line
- line=line.rstrip()
- ProcessSvnLine(line,NoVerbose)
- if done == 0:
- data=StdOut.read()
- all_data+=data
- for line in data.splitlines():
- ProcessSvnLine(line,NoVerbose)
- break
- elif done != None:
- #error!
- print "error running svn command:", Command
- print all_data, StdOut.read()
- sys.exit(1)
-################################################################################
-if not g_Args:
- g_Args=["."]
-
-for Dir in g_Args:
- os.chdir(Dir)
- CleanTree(Dir, g_Options.NoVerbose)