172 lines
7.9 KiB
Diff
172 lines
7.9 KiB
Diff
*** mcp.cfg Fri Sep 20 23:29:06 2013
|
|
--- mcp.cfg Sat Feb 5 06:14:08 2022
|
|
***************
|
|
*** 147,163 ****
|
|
Fernflower = %(DirRuntime)s/bin/fernflower.jar
|
|
Exceptor = %(DirRuntime)s/bin/mcinjector.jar
|
|
SpecialSource = %(DirRuntime)s/bin/specialsource.jar
|
|
CmdPatch = %s -p1 -u -i {patchfile} -d {srcdir}
|
|
CmdJad = %s -b -d {outdir} -dead -o -r -s .java -stat -ff {classes}
|
|
! CmdAStyle = %s --suffix=none --quiet --options={conffile} {classes}
|
|
CmdRG = %s -cp "{classpath}" RetroGuard -searge {conffile}
|
|
CmdRGReobf = %s -cp "{classpath}" RetroGuard -notch {conffile}
|
|
CmdSS = %s -cp "{classpath}" -jar %s -i {injar} -o {outjar} -m {mapfile} --kill-source
|
|
CmdSSReobf = %s -cp "{classpath}" -jar %s -i {injar} -o {outjar} -r -m {mapfile} -d {identifier} -e %s
|
|
CmdJadretro = %s -jar %s {targetdir}
|
|
CmdFernflower = %s -jar %s -din=0 -rbr=0 -dgs=1 -asc=1 -log=WARN {indir} {outdir}
|
|
CmdExceptor = %s -jar %s {input} {output} {conf} {log}
|
|
! CmdRecomp = %s -Xlint:-options -deprecation -g -source 1.6 -target 1.6 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs}
|
|
! CmdRecompScala = %s -encoding UTF-8 -deprecation -target:jvm-1.6 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs}
|
|
! CmdStartSrv = %s -Xincgc -Xms1024M -Xmx1024M -cp "{classpath}" net.minecraft.server.MinecraftServer
|
|
! CmdStartClt = %s -Xincgc -Xms1024M -Xmx1024M -cp "{classpath}" -Djava.library.path={natives} Start
|
|
--- 147,165 ----
|
|
Fernflower = %(DirRuntime)s/bin/fernflower.jar
|
|
Exceptor = %(DirRuntime)s/bin/mcinjector.jar
|
|
SpecialSource = %(DirRuntime)s/bin/specialsource.jar
|
|
CmdPatch = %s -p1 -u -i {patchfile} -d {srcdir}
|
|
CmdJad = %s -b -d {outdir} -dead -o -r -s .java -stat -ff {classes}
|
|
! #CmdAStyle = %s --suffix=none --quiet --options={conffile} {classes}
|
|
! CmdAStyle = %s --suffix=none --options={conffile} {classes}
|
|
CmdRG = %s -cp "{classpath}" RetroGuard -searge {conffile}
|
|
CmdRGReobf = %s -cp "{classpath}" RetroGuard -notch {conffile}
|
|
CmdSS = %s -cp "{classpath}" -jar %s -i {injar} -o {outjar} -m {mapfile} --kill-source
|
|
CmdSSReobf = %s -cp "{classpath}" -jar %s -i {injar} -o {outjar} -r -m {mapfile} -d {identifier} -e %s
|
|
CmdJadretro = %s -jar %s {targetdir}
|
|
CmdFernflower = %s -jar %s -din=0 -rbr=0 -dgs=1 -asc=1 -log=WARN {indir} {outdir}
|
|
CmdExceptor = %s -jar %s {input} {output} {conf} {log}
|
|
! CmdRecomp = %s -Xlint:-options -deprecation -g -source 1.8 -target 1.8 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs}
|
|
! CmdRecompScala = %s -encoding UTF-8 -deprecation -target:jvm-1.8 -classpath "{classpath}" -sourcepath {sourcepath} -d {outpath} {pkgs}
|
|
! CmdStartSrv = %s -Xms1024M -Xmx1024M -cp "{classpath}" net.minecraft.server.MinecraftServer
|
|
! CmdStartClt = %s -Xms1024M -Xmx1024M -cp "{classpath}" -Djava.library.path={natives} Start
|
|
! CmdStartHyb = %s -Xms1024M -Xmx1024M -cp "{classpath}" -Djava.library.path={natives} StartServer
|
|
*** commands.py Sat Feb 5 14:54:08 2022
|
|
--- commands.py Sat Feb 5 06:14:19 2022
|
|
***************
|
|
*** 394,403 ****
|
|
--- 394,404 ----
|
|
self.cmdrecompscala = None
|
|
else:
|
|
self.cmdrecompscala = self.config.get('COMMANDS', 'CmdRecompScala', raw=1) % self.cmdscalac
|
|
self.cmdstartsrv = self.config.get('COMMANDS', 'CmdStartSrv', raw=1) % self.cmdjava
|
|
self.cmdstartclt = self.config.get('COMMANDS', 'CmdStartClt', raw=1) % self.cmdjava
|
|
+ self.cmdstarthyb = self.config.get('COMMANDS', 'CmdStartHyb', raw=1) % self.cmdjava
|
|
|
|
def startlogger(self):
|
|
self.logger = logging.getLogger()
|
|
self.logger.setLevel(logging.DEBUG)
|
|
# create file handler which logs even debug messages
|
|
***************
|
|
*** 1345,1354 ****
|
|
--- 1346,1364 ----
|
|
classpath = os.pathsep.join(classpath)
|
|
os.chdir(self.dirjars)
|
|
forkcmd = self.cmdstartsrv.format(classpath=classpath, mainclass=mainclass, extraargs=extraargs)
|
|
self.runmc(forkcmd)
|
|
|
|
+ def starthybridserver(self, mainclass, extraargs):
|
|
+ classpath = [self.binclient, self.srcclient] + self.cpathclient
|
|
+ classpath = [os.path.join('..', p) for p in classpath]
|
|
+ classpath = os.pathsep.join(classpath)
|
|
+ natives = os.path.join('..', self.dirnatives)
|
|
+ os.chdir(self.dirjars)
|
|
+ forkcmd = self.cmdstarthyb.format(classpath=classpath, natives=natives, mainclass=mainclass, extraargs=extraargs)
|
|
+ self.runmc(forkcmd)
|
|
+
|
|
def startclient(self, mainclass, extraargs):
|
|
classpath = [self.binclient, self.srcclient] + self.cpathclient
|
|
classpath = [os.path.join('..', p) for p in classpath]
|
|
classpath = os.pathsep.join(classpath)
|
|
natives = os.path.join('..', self.dirnatives)
|
|
***************
|
|
*** 1998,2003 ****
|
|
assert 'Unknown type %s' % line
|
|
|
|
if reverse:
|
|
for type,map in srg.items():
|
|
srg[type] = dict([[v,k] for k,v in map.items()])
|
|
! return srg
|
|
\ No newline at end of file
|
|
--- 2008,2013 ----
|
|
assert 'Unknown type %s' % line
|
|
|
|
if reverse:
|
|
for type,map in srg.items():
|
|
srg[type] = dict([[v,k] for k,v in map.items()])
|
|
! return srg
|
|
*** startserver.py Thu Jul 4 01:09:57 2013
|
|
--- startserver.py Sat Feb 5 06:11:56 2022
|
|
***************
|
|
*** 9,25 ****
|
|
import sys
|
|
import logging
|
|
import json
|
|
from optparse import OptionParser
|
|
|
|
! from commands import Commands, SERVER
|
|
|
|
|
|
def main():
|
|
parser = OptionParser(version='MCP %s' % Commands.fullversion())
|
|
parser.add_option('-c', '--config', dest='config', help='additional configuration file')
|
|
! parser.add_option('-m', '--main', dest='mainclass', help='Main class to start', default='net.minecraft.server.MinecraftServer')
|
|
parser.add_option('-j', '--json', dest='json',action='store_true', help='Use the json file to setup parameters', default=False)
|
|
options, _ = parser.parse_args()
|
|
startserver(options.config, options.mainclass, options.json)
|
|
|
|
|
|
--- 9,25 ----
|
|
import sys
|
|
import logging
|
|
import json
|
|
from optparse import OptionParser
|
|
|
|
! from commands import Commands, CLIENT
|
|
|
|
|
|
def main():
|
|
parser = OptionParser(version='MCP %s' % Commands.fullversion())
|
|
parser.add_option('-c', '--config', dest='config', help='additional configuration file')
|
|
! parser.add_option('-m', '--main', dest='mainclass', help='Main class to start', default='StartServer')
|
|
parser.add_option('-j', '--json', dest='json',action='store_true', help='Use the json file to setup parameters', default=False)
|
|
options, _ = parser.parse_args()
|
|
startserver(options.config, options.mainclass, options.json)
|
|
|
|
|
|
***************
|
|
*** 31,47 ****
|
|
# mainclass = "net.minecraft.server.MinecraftServer"
|
|
|
|
extraargs = ""
|
|
if jsonoverride:
|
|
jsonData = json.load(open(commands.jsonFile))
|
|
! mainclass = jsonData['mainClass']
|
|
extraargs = jsonData['minecraftArguments']
|
|
|
|
! if not commands.checkbins(SERVER):
|
|
commands.logger.warning('!! Can not find server bins !!')
|
|
sys.exit(1)
|
|
! commands.startserver(mainclass, extraargs)
|
|
except Exception: # pylint: disable-msg=W0703
|
|
logging.exception('FATAL ERROR')
|
|
sys.exit(1)
|
|
|
|
|
|
--- 31,47 ----
|
|
# mainclass = "net.minecraft.server.MinecraftServer"
|
|
|
|
extraargs = ""
|
|
if jsonoverride:
|
|
jsonData = json.load(open(commands.jsonFile))
|
|
! mainclass = jsonData['mainServerClass']
|
|
extraargs = jsonData['minecraftArguments']
|
|
|
|
! if not commands.checkbins(CLIENT):
|
|
commands.logger.warning('!! Can not find server bins !!')
|
|
sys.exit(1)
|
|
! commands.starthybridserver(mainclass, extraargs)
|
|
except Exception: # pylint: disable-msg=W0703
|
|
logging.exception('FATAL ERROR')
|
|
sys.exit(1)
|
|
|
|
|