Merge branch 'master' into repackage
Conflicts: eclipse/Clean/.classpath eclipse/Clean/.project eclipse/FML/.classpath eclipse/FML/.project install/fml.py
This commit is contained in:
commit
edb4e08b22
23 changed files with 68 additions and 335 deletions
1
fml/.gitignore
vendored
1
fml/.gitignore
vendored
|
@ -10,3 +10,4 @@ fmlbranding.properties
|
|||
/commands.py.bck
|
||||
/mcp*.zip
|
||||
/mcp
|
||||
/eclipse
|
||||
|
|
|
@ -24,12 +24,8 @@
|
|||
<format pattern="yyMMddHHmmss" property="timestamp" />
|
||||
</tstamp>
|
||||
<property environment="env" />
|
||||
<property file="fmlbuild.properties" />
|
||||
<property name="modname" value="fml" />
|
||||
<condition property="dev.home" value="${env.WORKSPACE}" else="${default.dev.home}">
|
||||
<isset property="env.WORKSPACE" />
|
||||
</condition>
|
||||
<condition property="mcp.home" value="${env.WORKSPACE}/mcpworkspace" else="${default.mcp.home}">
|
||||
<condition property="mcp.home" value="${env.WORKSPACE}/mcp" else="${basedir}/mcp">
|
||||
<isset property="env.WORKSPACE" />
|
||||
</condition>
|
||||
<property name="fml.python.dir" location="${basedir}/python" />
|
||||
|
@ -55,6 +51,7 @@
|
|||
<condition property="version.build" value="${env.BUILD_NUMBER}" else="1">
|
||||
<isset property="env.BUILD_NUMBER" />
|
||||
</condition>
|
||||
<available file="eclipse" property="eclipse.exists"/>
|
||||
</target>
|
||||
|
||||
<target name="makeversion" depends="buildenvsetup">
|
||||
|
@ -78,9 +75,9 @@
|
|||
|
||||
<target name="clean" depends="buildenvsetup,makeclean" if="mcp.exists">
|
||||
<exec executable="${python.exe}" dir="${mcp.home}">
|
||||
<arg value="${mcp.home}/runtime/decompile.py" />
|
||||
<arg value="-d" />
|
||||
<arg value="-n" />
|
||||
<arg value="${basedir}/decompile.py" />
|
||||
<arg value="${mcp.home}" />
|
||||
<arg value="${basedir}" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
|
@ -239,6 +236,7 @@
|
|||
<fileset dir="${mcp.srcdir}"/>
|
||||
</copy>
|
||||
<antcall target="writeversion"/>
|
||||
<antcall target="makeeclipse"/>
|
||||
<echo>Setup complete! You should now be able to open ${basedir}/eclipse as a workspace in eclipse and import/refresh the FML project</echo>
|
||||
</target>
|
||||
|
||||
|
@ -314,6 +312,13 @@
|
|||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="makeeclipse" depends="buildenvsetup" unless="eclipse.exists">
|
||||
<echo>
|
||||
Extracting fresh eclipse workspace to ${basedir}/eclipse
|
||||
</echo>
|
||||
<unzip file="${basedir}/eclipse_workspace.zip" dest="${basedir}" verbose="true"/>
|
||||
</target>
|
||||
|
||||
<target name="makerenamedsource" depends="buildenvsetup,repatch,merge-client,merge-common,reobfuscate">
|
||||
<copy todir="${tmp.mcp.srcdir}">
|
||||
<fileset dir="${mcp.srcdir}"/>
|
||||
|
|
BIN
fml/eclipse-workspace.zip
Normal file
BIN
fml/eclipse-workspace.zip
Normal file
Binary file not shown.
43
fml/eclipse/.gitignore
vendored
43
fml/eclipse/.gitignore
vendored
|
@ -1,43 +0,0 @@
|
|||
/*
|
||||
!.gitignore
|
||||
!/Clean/
|
||||
/Clean/*
|
||||
!/Clean/.classpath
|
||||
!/Clean/.project
|
||||
!/Clean/.settings/
|
||||
/Clean/.settings/*
|
||||
!/Clean/.settings/org.eclipse.jdt.core.prefs
|
||||
!/FML/
|
||||
/FML/*
|
||||
!/FML/.classpath
|
||||
!/FML/.project
|
||||
!/FML/.settings/
|
||||
/FML/.settings/*
|
||||
!/FML/.settings/org.eclipse.jdt.core.prefs
|
||||
!/.metadata/
|
||||
/.metadata/*
|
||||
!/.metadata/.plugins/
|
||||
/.metadata/.plugins/*
|
||||
!/.metadata/.plugins/org.eclipse.core.runtime/
|
||||
/.metadata/.plugins/org.eclipse.core.runtime/*
|
||||
!/.metadata/.plugins/org.eclipse.core.runtime/.settings/
|
||||
/.metadata/.plugins/org.eclipse.core.runtime/.settings/*
|
||||
!/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs
|
||||
!/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs
|
||||
!/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.epp.usagedata.gathering.prefs
|
||||
!/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs
|
||||
!/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs
|
||||
!/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs
|
||||
!/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs
|
||||
!/.metadata/.plugins/org.eclipse.debug.core/
|
||||
/.metadata/.plugins/org.eclipse.debug.core/*
|
||||
!/.metadata/.plugins/org.eclipse.debug.core/.launches/
|
||||
/.metadata/.plugins/org.eclipse.debug.core/.launches/*
|
||||
!/.metadata/.plugins/org.eclipse.debug.core/.launches/CleanClient.launch
|
||||
!/.metadata/.plugins/org.eclipse.debug.core/.launches/CleanServer.launch
|
||||
!/.metadata/.plugins/org.eclipse.debug.core/.launches/FMLClient.launch
|
||||
!/.metadata/.plugins/org.eclipse.debug.core/.launches/FMLServer.launch
|
||||
!/.metadata/.plugins/org.eclipse.debug.ui/
|
||||
/.metadata/.plugins/org.eclipse.debug.ui/*
|
||||
!/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml
|
||||
|
Binary file not shown.
|
@ -1,4 +0,0 @@
|
|||
#Sun Jun 05 18:58:07 CEST 2011
|
||||
version=1
|
||||
eclipse.preferences.version=1
|
||||
refresh.enabled=true
|
|
@ -1,6 +0,0 @@
|
|||
Console.highWaterMark=88000
|
||||
StringVariablePreferencePage=130,107,107,86,
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\n<launchPerspectives/>\n
|
||||
org.eclipse.debug.ui.UseContextualLaunch=false
|
||||
org.eclipse.debug.ui.user_view_bindings=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<viewBindings>\r\n<view id\="org.eclipse.ui.console.ConsoleView">\r\n<perspective id\="org.eclipse.jdt.ui.JavaPerspective" userAction\="opened"/>\r\n</view>\r\n</viewBindings>\r\n
|
|
@ -1,3 +0,0 @@
|
|||
#Sun Jun 05 18:58:07 CEST 2011
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.epp.usagedata.gathering.enabled=false
|
|
@ -1,14 +0,0 @@
|
|||
#Sun Sep 18 16:44:39 NZST 2011
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.deprecation=ignore
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedImport=ignore
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
|
@ -1,4 +0,0 @@
|
|||
#Sun Jun 05 18:58:05 CEST 2011
|
||||
spacesForTabs=true
|
||||
eclipse.preferences.version=1
|
||||
overviewRuler_migration=migrated_3.1
|
|
@ -1,9 +0,0 @@
|
|||
IMPORT_FILES_AND_FOLDERS_MODE=prompt
|
||||
IMPORT_FILES_AND_FOLDERS_VIRTUAL_FOLDER_MODE=prompt
|
||||
PROBLEMS_FILTERS_MIGRATE=true
|
||||
SAVE_ALL_BEFORE_BUILD=true
|
||||
TASKS_FILTERS_MIGRATE=true
|
||||
eclipse.preferences.version=1
|
||||
platformState=1349115159163
|
||||
quickStart=false
|
||||
tipsAndTricks=true
|
|
@ -1,2 +0,0 @@
|
|||
eclipse.preferences.version=1
|
||||
showIntro=false
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchHistory>
|
||||
<launchGroup id="org.eclipse.ui.externaltools.launchGroup">
|
||||
<mruHistory/>
|
||||
<favorites/>
|
||||
</launchGroup>
|
||||
<launchGroup id="org.eclipse.debug.ui.launchGroup.profile">
|
||||
<mruHistory/>
|
||||
<favorites/>
|
||||
</launchGroup>
|
||||
<launchGroup id="org.eclipse.debug.ui.launchGroup.debug">
|
||||
<mruHistory>
|
||||
<launch memento="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration local="true" path="Client"/> "/>
|
||||
<launch memento="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration local="true" path="Server"/> "/>
|
||||
</mruHistory>
|
||||
<favorites/>
|
||||
</launchGroup>
|
||||
<launchGroup id="org.eclipse.debug.ui.launchGroup.run">
|
||||
<mruHistory>
|
||||
<launch memento="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration local="true" path="Client"/> "/>
|
||||
<launch memento="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration local="true" path="Server"/> "/>
|
||||
</mruHistory>
|
||||
<favorites/>
|
||||
</launchGroup>
|
||||
</launchHistory>
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="mc-client"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="lib" path="jars/bin/jinput.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Client/jars/bin/natives"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="jars/bin/lwjgl_util.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Client/jars/bin/natives"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="jars/bin/lwjgl.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Client/jars/bin/natives"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="jars/bin/minecraft.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -1,64 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>Clean</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>jars</name>
|
||||
<type>2</type>
|
||||
<locationURI>MCP_LOC/jars</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>mc-client</name>
|
||||
<type>2</type>
|
||||
<locationURI>MCP_LOC/src-base/minecraft</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>0</id>
|
||||
<name>jars</name>
|
||||
<type>13</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-bin</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>0</id>
|
||||
<name>jars/bin</name>
|
||||
<type>5</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-*.jar</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
<filter>
|
||||
<id>0</id>
|
||||
<name>jars/bin/natives</name>
|
||||
<type>6</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-*</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
<variableList>
|
||||
<variable>
|
||||
<name>MCP_LOC</name>
|
||||
<value>$%7BPARENT-2-WORKSPACE_LOC%7D</value>
|
||||
</variable>
|
||||
</variableList>
|
||||
</projectDescription>
|
|
@ -1,12 +0,0 @@
|
|||
#Thu Jun 02 15:56:40 CEST 2011
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
|
@ -1,27 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="fml-client"/>
|
||||
<classpathentry kind="src" path="fml-common"/>
|
||||
<classpathentry kind="src" path="mc-client"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="lib" path="jars/bin/jinput.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="FML/jars/bin/natives"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="jars/bin/lwjgl_util.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="FML/jars/bin/natives"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="jars/bin/lwjgl.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="FML/jars/bin/natives"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="jars/bin/minecraft.jar"/>
|
||||
<classpathentry kind="lib" path="lib/argo-2.25.jar"/>
|
||||
<classpathentry kind="lib" path="lib/asm-all-4.0.jar" sourcepath="lib/asm-all-4.0-source.jar"/>
|
||||
<classpathentry kind="lib" path="lib/guava-12.0.1.jar" sourcepath="lib/guava-12.0.1-sources.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -1,70 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>FML</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>fml-client</name>
|
||||
<type>2</type>
|
||||
<locationURI>FML_LOC/client</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>fml-common</name>
|
||||
<type>2</type>
|
||||
<locationURI>FML_LOC/common</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>jars</name>
|
||||
<type>2</type>
|
||||
<locationURI>MCP_LOC/jars</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>lib</name>
|
||||
<type>2</type>
|
||||
<locationURI>MCP_LOC/lib</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>mc-client</name>
|
||||
<type>2</type>
|
||||
<locationURI>MCP_LOC/src-work/minecraft</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>fml-common/fmlversion.properties</name>
|
||||
<type>1</type>
|
||||
<locationURI>FML_LOC/fmlversion.properties</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>0</id>
|
||||
<name>jars</name>
|
||||
<type>13</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-bin</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
<variableList>
|
||||
<variable>
|
||||
<name>FML_LOC</name>
|
||||
<value>$%7BPARENT-1-WORKSPACE_LOC%7D</value>
|
||||
</variable>
|
||||
<variable>
|
||||
<name>MCP_LOC</name>
|
||||
<value>$%7BPARENT-2-WORKSPACE_LOC%7D</value>
|
||||
</variable>
|
||||
</variableList>
|
||||
</projectDescription>
|
|
@ -1,12 +0,0 @@
|
|||
#Thu Jun 02 15:56:50 CEST 2011
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
|
@ -54,9 +54,11 @@ def main():
|
|||
branch, _ = process.communicate()
|
||||
except OSError:
|
||||
print("Git not found")
|
||||
branch="none"
|
||||
branch="master"
|
||||
else:
|
||||
branch=os.getenv("GIT_BRANCH").rpartition('/')[2]
|
||||
if branch == 'HEAD':
|
||||
branch = "master"
|
||||
|
||||
with open("fmlversion.properties","w") as f:
|
||||
f.write("%s=%s\n" %("fmlbuild.major.number",major))
|
||||
|
|
|
@ -274,12 +274,12 @@ def setup_fml(fml_dir, mcp_dir):
|
|||
forkcmd = ('%s -classpath "{classpath}" cpw.mods.fml.common.asm.transformers.AccessTransformer "{jar}" "{fmlconfig}"' % self.cmdjava).format(
|
||||
classpath=class_path, jar=jars[side], fmlconfig=os.path.join(fml_dir, 'common', 'fml_at.cfg'))
|
||||
|
||||
forge_cfg = os.path.join(mcp_dir, 'forge', 'common', 'forge_at.cfg')
|
||||
forge_cfg = os.path.join(fml_dir, '..', 'common', 'forge_at.cfg')
|
||||
if os.path.isfile(forge_cfg):
|
||||
self.logger.info(' Forge config detected')
|
||||
forkcmd += ' "%s"' % forge_cfg
|
||||
|
||||
for dirname, dirnames, filenames in os.walk(os.path.join(mcp_dir, 'forge', 'accesstransformers')):
|
||||
for dirname, dirnames, filenames in os.walk(os.path.join(fml_dir, '..', 'accesstransformers')):
|
||||
for filename in filenames:
|
||||
accesstransformer = os.path.join(dirname, filename)
|
||||
if os.path.isfile(accesstransformer):
|
||||
|
@ -383,6 +383,48 @@ def get_joined_srg(mcp_dir):
|
|||
values[pts[0]][pts[1]] = pts[2]
|
||||
|
||||
return values
|
||||
|
||||
def merge_client_server(mcp_dir):
|
||||
client = os.path.join(mcp_dir, 'src', 'minecraft')
|
||||
shared = os.path.join(mcp_dir, 'src', 'common')
|
||||
|
||||
client_jar = os.path.join(mcp_dir, 'jars', 'bin', 'minecraft.jar')
|
||||
server_jar = os.path.join(mcp_dir, 'jars', 'minecraft_server.jar')
|
||||
joined_srg = get_joined_srg(mcp_dir)['CL:']
|
||||
|
||||
if not os.path.isfile(client_jar) or not os.path.isfile(server_jar):
|
||||
return
|
||||
|
||||
if not os.path.isdir(shared):
|
||||
os.makedirs(shared)
|
||||
|
||||
server_classes = []
|
||||
|
||||
zip = ZipFile(server_jar)
|
||||
for i in zip.filelist:
|
||||
if i.filename.endswith('.class'):
|
||||
server_classes.append(i.filename[:-6])
|
||||
|
||||
for cls in server_classes:
|
||||
if cls in joined_srg.keys():
|
||||
cls = joined_srg[cls]
|
||||
cls += '.java'
|
||||
|
||||
f_client = os.path.normpath(os.path.join(client, cls.replace('/', os.path.sep))).replace(os.path.sep, '/')
|
||||
f_shared = os.path.normpath(os.path.join(shared, cls.replace('/', os.path.sep))).replace(os.path.sep, '/')
|
||||
|
||||
if not os.path.isfile(f_client):
|
||||
print 'Issue Merging File Not Found: ' + cls
|
||||
continue
|
||||
|
||||
if not cls.rfind('/') == -1:
|
||||
new_dir = os.path.join(shared, cls.rsplit('/', 1)[0])
|
||||
if not os.path.isdir(new_dir):
|
||||
os.makedirs(new_dir)
|
||||
|
||||
shutil.move(f_client, f_shared)
|
||||
|
||||
cleanDirs(client)
|
||||
|
||||
def apply_fml_patches(fml_dir, mcp_dir, src_dir, copy_files=True):
|
||||
#Delete /common/cpw to get rid of the Side/SideOnly classes used in decompilation
|
||||
|
@ -689,13 +731,13 @@ def setup_mcp(fml_dir, mcp_dir, dont_gen_conf=True):
|
|||
|
||||
gen_renamed_conf(mcp_dir, fml_dir)
|
||||
|
||||
#update workspace
|
||||
print 'Fixing MCP Workspace'
|
||||
if not os.path.isdir(os.path.join(fml_dir, 'install')):
|
||||
mcp_eclipse = os.path.join(mcp_dir, 'eclipse')
|
||||
if os.path.isdir(mcp_eclipse):
|
||||
shutil.rmtree(mcp_eclipse)
|
||||
shutil.copytree(os.path.join(fml_dir, 'eclipse'), mcp_eclipse)
|
||||
# #update workspace
|
||||
# print 'Fixing MCP Workspace'
|
||||
# if not os.path.isdir(os.path.join(fml_dir, 'eclipse', 'Clean-Client')):
|
||||
# mcp_eclipse = os.path.join(mcp_dir, 'eclipse')
|
||||
# if os.path.isdir(mcp_eclipse):
|
||||
# shutil.rmtree(mcp_eclipse)
|
||||
# shutil.copytree(os.path.join(fml_dir, 'eclipse'), mcp_eclipse)
|
||||
|
||||
def normaliselines(in_filename):
|
||||
in_filename = os.path.normpath(in_filename)
|
||||
|
|
Loading…
Reference in a new issue