Fix src distrabution, and got rid of pesky common folder in eclipse workspace. src is now installable.

This commit is contained in:
LexManos 2013-07-01 15:50:49 -07:00
parent ddbec7d9dd
commit ed5d8fa2e6
7 changed files with 14 additions and 24 deletions

View file

@ -195,6 +195,7 @@
<property name="srcpack.jarname" value="${modname}-src-${version.minecraft}-${version}-${version.branch}" />
<zip destfile="${basedir}/target/${srcpack.jarname}.zip">
<zipfileset dir="${basedir}" includes="LICENSE-fml.txt,difflist.txt,commands.patch,mcp_merge.cfg,mc_versions.cfg" prefix="fml" />
<zipfileset dir="${basedir}/jsons" includes="${version.minecraft}-dev.json" fullpath="fml/fml.json"/>
<zipfileset dir="${basedir}" includes="deobfuscation_data-${version.minecraft}.lzma" prefix="fml/common" />
<zipfileset dir="${common.src.dir}" includes="**/*.java" prefix="fml/common" />
<zipfileset dir="${client.src.dir}" includes="**/*.java" prefix="fml/client" />

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/Minecraft/common/net/minecraft/server/MinecraftServer.java"/>
<listEntry value="/Minecraft/src/net/minecraft/server/MinecraftServer.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>

View file

@ -5,7 +5,8 @@
<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/libraries/org/ow2/asm/asm-all/4.1/asm-all-4.1.jar" sourcepath="jars/libraries/org/ow2/asm/asm-all/4.1/asm-all-4.1-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/net/minecraft/launchwrapper/1.3/launchwrapper-1.3.jar"/>
<classpathentry kind="lib" path="jars/versions/1.6/1.6.jar"/>
<classpathentry kind="lib" path="jars/versions/1.6.1/1.6.1.jar"/>
<classpathentry kind="lib" path="jars/libraries/lzma/lzma/0.0.1/lzma-0.0.1.jar"/>
<classpathentry kind="lib" path="jars/libraries/net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5.jar" sourcepath="jars/libraries/net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/com/paulscode/codecjorbis/20101023/codecjorbis-20101023.jar"/>
<classpathentry kind="lib" path="jars/libraries/com/paulscode/codecwav/20101023/codecwav-20101023.jar"/>
@ -21,17 +22,17 @@
<classpathentry kind="lib" path="jars/libraries/com/google/code/gson/gson/2.2.2/gson-2.2.2.jar" sourcepath="jars/libraries/com/google/code/gson/gson/2.2.2/gson-2.2.2-sources.jar"/>
<classpathentry kind="lib" path="jars/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar" sourcepath="jars/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5-sources.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Minecraft/natives"/>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Minecraft/jars/versions/1.6.1/1.6.1-natives"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="jars/libraries/org/lwjgl/lwjgl/lwjgl/2.9.0/lwjgl-2.9.0.jar" sourcepath="jars/libraries/org/lwjgl/lwjgl/lwjgl/2.9.0/lwjgl-2.9.0-sources.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Minecraft/natives"/>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Minecraft/jars/versions/1.6.1/1.6.1-natives"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="jars/libraries/org/lwjgl/lwjgl/lwjgl_util/2.9.0/lwjgl_util-2.9.0.jar" sourcepath="jars/libraries/org/lwjgl/lwjgl/lwjgl_util/2.9.0/lwjgl_util-2.9.0-sources.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Minecraft/natives"/>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="Minecraft/jars/versions/1.6.1/1.6.1-natives"/>
</attributes>
</classpathentry>
</classpath>

View file

@ -30,11 +30,6 @@
<type>2</type>
<locationURI>MCP_LOC/lib</locationURI>
</link>
<link>
<name>natives</name>
<type>2</type>
<locationURI>MCP_LOC/jars/libraries/natives</locationURI>
</link>
</linkedResources>
<filteredResources>
<filter>
@ -73,15 +68,6 @@
<arguments>1.0-name-matches-false-false-*.jar</arguments>
</matcher>
</filter>
<filter>
<id>1307293480435</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>

View file

@ -506,7 +506,7 @@ def copytree(src, dst, verbose=0, symlinks=False):
#==========================================================================
# MCP Related Functions
#==========================================================================
def download_mcp(mcp_dir, fml_dir, version=None):
def download_mcp(fml_dir, mcp_dir, version=None):
if os.path.isfile(os.path.join(mcp_dir, 'runtime', 'commands.py')):
print 'MCP Detected already, not downloading'
return True
@ -517,6 +517,7 @@ def download_mcp(mcp_dir, fml_dir, version=None):
mc_info = read_mc_versions(fml_dir, version=version)
print('Checking MCP zip (may take time to download)')
if not download_file(mc_info['mcp_url'], mc_info['mcp_file'], mc_info['mcp_md5']):
sys.exit(1)
@ -1285,7 +1286,7 @@ def download_assets(mcp_dir):
if failed:
print(' Downloading assets failed, please review log for more details')
sys.exit(1)
#==========================================================================
# Transformers
#==========================================================================

View file

@ -1,10 +1,11 @@
import os, os.path, sys
from optparse import OptionParser
from fml import setup_fml, finish_setup_fml, apply_fml_patches, setup_mcp, download_mcp
def fml_main(fml_dir, mcp_dir, gen_conf=True, disable_patches=False, disable_at=False, disable_merge=False, enable_server=False,
disable_client=False, disable_rename=False, disable_assets=False, decompile=False):
sys.path.append(fml_dir)
from fml import download_mcp, setup_mcp, decompile_minecraft, apply_fml_patches, finish_setup_fml
print '================ Forge ModLoader Setup Start ==================='
download_mcp(fml_dir, mcp_dir)
setup_mcp(fml_dir, mcp_dir, gen_conf)
@ -30,7 +31,7 @@ if __name__ == '__main__':
parser.add_option('-c', '--no-client', action="store_true", dest='no_client', help='Disable decompilation of server', default=False)
parser.add_option('-e', '--no-merge', action="store_true", dest='no_merge', help='Disable merging server code into client', default=False)
parser.add_option('-n', '--no-rename', action="store_true", dest='no_rename', help='Disable running updatenames', default=False)
parser.add_option('-a', '--no-assets', action="store_true", dest='no_assets', help='Disable downloading of assets folder', default=False)
parser.add_option( '--no-assets', action="store_true", dest='no_assets', help='Disable downloading of assets folder', default=False)
parser.add_option('-d', '--decompile', action="store_true", dest='decompile', help='Decompile minecraft and apply patches', default=True)
options, _ = parser.parse_args()
@ -51,5 +52,5 @@ if __name__ == '__main__':
fml_main(fml_dir, mcp_dir, disable_patches=options.no_patch,
disable_at=options.no_access, disable_merge=options.no_merge,
enable_server=options.enable_server, disable_client=options.no_client,
disable_rename=options.no_rename, disable_assets=options.assets,
disable_rename=options.no_rename, disable_assets=options.no_assets,
decompile=options.decompile, gen_conf=False)