Cleaned up commands.patch, removed debug print in fml.py

This commit is contained in:
LexManos 2012-08-02 21:14:06 -07:00
parent 79ed963c4a
commit 56153c43d6
2 changed files with 16 additions and 22 deletions

View file

@ -1,22 +1,16 @@
--- commands.py --- commands.py
+++ commands.py +++ commands.py
@@ -22,6 +22,7 @@ @@ -582,6 +582,9 @@
import errno self.has_astyle_cfg = False
import shlex if os.path.isfile(self.astyleconf):
import platform self.has_astyle_cfg = True
+import pprint +
from hashlib import md5 # pylint: disable-msg=E0611 + #FML Entries
from contextlib import closing
from textwrap import TextWrapper
@@ -502,6 +503,7 @@
self.binclienttmp = os.path.normpath(config.get('OUTPUT', 'BinClientTemp'))
self.binservertmp = os.path.normpath(config.get('OUTPUT', 'BinServerTemp'))
self.srcclient = os.path.normpath(config.get('OUTPUT', 'SrcClient'))
+ self.srcshared = os.path.normpath(os.path.join(self.dirsrc, 'common')) + self.srcshared = os.path.normpath(os.path.join(self.dirsrc, 'common'))
self.srcserver = os.path.normpath(config.get('OUTPUT', 'SrcServer'))
self.testclient = config.get('OUTPUT', 'TestClient') def creatergcfg(self, reobf=False, keep_lvt=False, keep_generics=False, rg_update=False):
self.testserver = config.get('OUTPUT', 'TestServer') """Create the files necessary for RetroGuard"""
@@ -1039,6 +1041,7 @@ @@ -1039,6 +1042,7 @@
all_files = True all_files = True
append_pattern = False append_pattern = False
pkglist = filterdirs(pathsrclk[side], '*.java', append_pattern=append_pattern, all_files=all_files) pkglist = filterdirs(pathsrclk[side], '*.java', append_pattern=append_pattern, all_files=all_files)
@ -24,7 +18,7 @@
dirs = ' '.join(pkglist) dirs = ' '.join(pkglist)
classpath = os.pathsep.join(cplk[side]) classpath = os.pathsep.join(cplk[side])
forkcmd = self.cmdrecomp.format(classpath=classpath, sourcepath=pathsrclk[side], outpath=pathbinlk[side], forkcmd = self.cmdrecomp.format(classpath=classpath, sourcepath=pathsrclk[side], outpath=pathbinlk[side],
@@ -1238,6 +1241,11 @@ @@ -1238,6 +1242,11 @@
# HINT: We pathwalk the sources # HINT: We pathwalk the sources
for path, _, filelist in os.walk(pathsrclk[side], followlinks=True): for path, _, filelist in os.walk(pathsrclk[side], followlinks=True):
@ -36,7 +30,7 @@
for cur_file in fnmatch.filter(filelist, '*.java'): for cur_file in fnmatch.filter(filelist, '*.java'):
updatefile(os.path.normpath(os.path.join(path, cur_file))) updatefile(os.path.normpath(os.path.join(path, cur_file)))
return True return True
@@ -1320,12 +1328,14 @@ @@ -1320,12 +1329,14 @@
pathsrclk = {CLIENT: self.srcclient, SERVER: self.srcserver} pathsrclk = {CLIENT: self.srcclient, SERVER: self.srcserver}
strip_comments(pathsrclk[side]) strip_comments(pathsrclk[side])
@ -51,7 +45,7 @@
def process_javadoc(self, side): def process_javadoc(self, side):
"""Add CSV descriptions to methods and fields as javadoc""" """Add CSV descriptions to methods and fields as javadoc"""
@@ -1334,6 +1344,21 @@ @@ -1334,6 +1345,21 @@
if not self.has_doc_csv: if not self.has_doc_csv:
self.logger.warning('!! javadoc disabled due to no csvs !!') self.logger.warning('!! javadoc disabled due to no csvs !!')
return False return False
@ -73,7 +67,7 @@
#HINT: We read the relevant CSVs #HINT: We read the relevant CSVs
methodsreader = csv.DictReader(open(self.csvmethods, 'r')) methodsreader = csv.DictReader(open(self.csvmethods, 'r'))
@@ -1420,6 +1445,7 @@ @@ -1420,6 +1446,7 @@
# HINT: We create the list of source directories based on the list of packages # HINT: We create the list of source directories based on the list of packages
pkglist = filterdirs(pathsrclk[side], '*.java', append_pattern=True) pkglist = filterdirs(pathsrclk[side], '*.java', append_pattern=True)
@ -81,7 +75,7 @@
dirs = ' '.join(pkglist) dirs = ' '.join(pkglist)
forkcmd = self.cmdastyle.format(classes=dirs, conffile=self.astyleconf) forkcmd = self.cmdastyle.format(classes=dirs, conffile=self.astyleconf)
self.runcmd(forkcmd) self.runcmd(forkcmd)
@@ -1592,6 +1618,9 @@ @@ -1592,6 +1619,9 @@
sys.exit(1) sys.exit(1)
for entry in newfiles: for entry in newfiles:

View file

@ -159,7 +159,7 @@ def setup_fml(fml_dir, mcp_dir):
forkcmd = ('%s -Xlint:-options -deprecation -g -source 1.6 -target 1.6 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {target}' % self.cmdjavac).format( forkcmd = ('%s -Xlint:-options -deprecation -g -source 1.6 -target 1.6 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {target}' % self.cmdjavac).format(
classpath=os.pathsep.join(['.', os.path.join(mcp_dir, 'lib', '*')]), sourcepath=os.path.join(fml_dir, 'common'), outpath=os.path.join(fml_dir, 'bin'), classpath=os.pathsep.join(['.', os.path.join(mcp_dir, 'lib', '*')]), sourcepath=os.path.join(fml_dir, 'common'), outpath=os.path.join(fml_dir, 'bin'),
target=os.path.join(fml_dir, 'transformers', 'cpw', 'mods', 'fml', 'common', 'asm', 'transformers', 'AccessTransformer.java')) target=os.path.join(fml_dir, 'transformers', 'cpw', 'mods', 'fml', 'common', 'asm', 'transformers', 'AccessTransformer.java'))
print forkcmd #print forkcmd
self.runcmd(forkcmd) self.runcmd(forkcmd)
#Run AccessTransformer #Run AccessTransformer