Update of /cvsroot/webware/Webware/bin
In directory sc8-pr-cvs1:/tmp/cvs-serv28486/bin
Modified Files:
MakeAppWorkDir.py
Log Message:
Small changes to MakeAppWorkDir:
* Only install OS-appropriate startup scripts, i.e., AppServer.bat
on Windows, AppServer on Posix.
* Don't put in Cans/ directory
* Don't install OneShot.cgi
* Use "Context" for the sample context, not "MyContext" -- I hate
the term "My", even though I guess it helps people see where they
can make their own changes.
Index: MakeAppWorkDir.py
===================================================================
RCS file: /cvsroot/webware/Webware/bin/MakeAppWorkDir.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** MakeAppWorkDir.py 9 Oct 2002 05:24:06 -0000 1.9
--- MakeAppWorkDir.py 22 Nov 2002 09:51:21 -0000 1.10
***************
*** 45,49 ****
"""
! def __init__(self, webWareDir, workDir, verbose=1, sampleContext="MyContext"):
"""Initializer for MakeAppWorkDir. Pass in at least the
Webware directory and the target working directory. If you
--- 45,50 ----
"""
! def __init__(self, webWareDir, workDir, verbose=1,
! sampleContext="Context", osType=None):
"""Initializer for MakeAppWorkDir. Pass in at least the
Webware directory and the target working directory. If you
***************
*** 64,68 ****
if sampleContext is not None:
self._substVals["DEFAULT"] = sampleContext
!
def buildWorkDir(self):
--- 65,71 ----
if sampleContext is not None:
self._substVals["DEFAULT"] = sampleContext
! if osType is None:
! osType = os.name
! self._osType = osType
def buildWorkDir(self):
***************
*** 83,87 ****
theDirs = [ self._workDir,
os.path.join(self._workDir, "Cache"),
- os.path.join(self._workDir, "Cans"), # TODO: should this one be here?
os.path.join(self._workDir, "Configs"),
os.path.join(self._workDir, "ErrorMsgs"),
--- 86,89 ----
***************
*** 97,105 ****
self.msg("\t%s created." % aDir)
- # Copy the contents of the Cans directory from WebKit/Cans
- for name in glob.glob(os.path.join(self._webKitDir, "Cans", "*.py")):
- newname = os.path.join(self._workDir, "Cans", os.path.basename(name))
- shutil.copyfile(name, newname)
-
self.msg("\n")
--- 99,102 ----
***************
*** 120,130 ****
"""
self.msg("Copying files.")
! otherFiles = [("404Text.txt", 0),
! ("AppServer", 1),
! ("AppServer.bat", 1),
! ("Adapters/OneShot.cgi", 0),
! ("Adapters/WebKit.cgi", 0),
]
! for name, doChmod in otherFiles:
oldname = os.path.join(self._webKitDir, name)
newname = os.path.join(self._workDir, os.path.basename(name))
--- 117,128 ----
"""
self.msg("Copying files.")
! otherFiles = [("404Text.txt", 0, None),
! ("AppServer", 1, 'posix'),
! ("AppServer.bat", 1, 'nt'),
! ("Adapters/WebKit.cgi", 0, None),
]
! for name, doChmod, osType in otherFiles:
! if osType and osType != self._osType:
! continue
oldname = os.path.join(self._webKitDir, name)
newname = os.path.join(self._workDir, os.path.basename(name))
***************
*** 144,151 ****
"""
self.msg("Creating launcher scripts.")
! scripts = [ ("Launch.py", _Launch_py),
! ("NTService.py", _NTService_py),
]
! for name, template in scripts:
filename = os.path.join(self._workDir, name)
open(filename, "w").write(template % self._substVals)
--- 142,151 ----
"""
self.msg("Creating launcher scripts.")
! scripts = [ ("Launch.py", _Launch_py, None),
! ("NTService.py", _NTService_py, 'nt'),
]
! for name, template, osType in scripts:
! if osType and osType != self._osType:
! continue
filename = os.path.join(self._workDir, name)
open(filename, "w").write(template % self._substVals)
***************
*** 153,157 ****
self.msg("\t%s created." % filename)
! for name in ["OneShot.cgi", "WebKit.cgi"]:
filename = os.path.join(self._workDir, name)
content = open(filename).readlines()
--- 153,157 ----
self.msg("\t%s created." % filename)
! for name in ["WebKit.cgi"]:
filename = os.path.join(self._workDir, name)
content = open(filename).readlines()
|