90c643183e
This is done in preperation for MCP to roll out SpecialSource support and the new 1.6 structure. Also done for my sanity while reading through the code. Intruduced a new function. If there is a 'mcp_data' folder in the FML folder, it will be copied to the MCP work directory after MCP is extracted. It DOES overwrite anything that already exists. This is intended for places like BuildServer to place libraries/assets to prevent them from needing to be downloaded every version. Introduced a dev-env json. Need to write the eclipse workspace references to the new libraries. Out custom json includes asm and legacylauncher. Added proper OptionParsing to decompile.py
24 lines
1.1 KiB
Python
24 lines
1.1 KiB
Python
import urllib
|
|
import zipfile
|
|
import sys
|
|
import os
|
|
from optparse import OptionParser
|
|
|
|
|
|
if __name__ == '__main__':
|
|
parser = OptionParser()
|
|
parser.add_option('-g', '--gen-conf', action="store_true", dest='gen_conf', help='Generate merged MCP conf folder', default=False)
|
|
parser.add_option('-m', '--mcp-dir', action='store', dest='mcp_dir', help='Path to download/extract MCP to', default=None )
|
|
parser.add_option('-f', '--fml-dir', action='store', dest='fml_dir', help='Path to FML install folder', default=None )
|
|
options, _ = parser.parse_args()
|
|
|
|
if options.fml_dir is None or options.mcp_dir is None:
|
|
print 'Invalid arguments, must supply mcp folder and fml folder: decompile.py --mcp-dir <MCPFolder> --fml-dir <FMLFolder>'
|
|
else:
|
|
sys.path.append(os.path.join(options.fml_dir, 'install'))
|
|
|
|
from fml import decompile_minecraft, setup_mcp, download_mcp
|
|
|
|
download_mcp(fml_dir=options.fml_dir, mcp_dir=options.mcp_dir)
|
|
setup_mcp(options.fml_dir, options.mcp_dir, gen_conf=options.gen_conf)
|
|
decompile_minecraft(options.fml_dir, options.mcp_dir)
|