mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
And finally, fix up the release install script to have a parameter to specity the MCP directory.
This commit is contained in:
1 parent
5792c7fb76
commit
2761b5deab
1 file changed
+14
-5
+14
-5
@@ -2,18 +2,18 @@ import os, os.path, sys
|
||||
import urllib, zipfile
|
||||
import shutil, glob, fnmatch
|
||||
import subprocess, logging
|
||||
from optparse import OptionParser
|
||||
|
||||
forge_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
mcp_dir = os.path.abspath('..')
|
||||
src_dir = os.path.join(mcp_dir, 'src')
|
||||
fml_dir = os.path.join(forge_dir, 'fml')
|
||||
|
||||
sys.path.append(fml_dir)
|
||||
from forge import apply_forge_patches
|
||||
from fml import setup_fml, finish_setup_fml, apply_fml_patches, setup_mcp, reset_logger
|
||||
|
||||
def main():
|
||||
|
||||
def main(mcp_dir):
|
||||
src_dir = os.path.join(mcp_dir, 'src')
|
||||
|
||||
print '================ Forge ModLoader Setup Start ==================='
|
||||
setup_mcp(fml_dir, mcp_dir, True)
|
||||
setup_fml(fml_dir, mcp_dir)
|
||||
@@ -37,4 +37,13 @@ def main():
|
||||
print '=============================== Minecraft Forge Setup Finished ================================='
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
parser = OptionParser()
|
||||
parser.add_option('-m', '--mcp-dir', action='store_true', dest='mcp_dir', help='Path to download/extract MCP to', default=None)
|
||||
options, _ = parser.parse_args()
|
||||
|
||||
if not options.mcp_dir is None:
|
||||
main(os.path.abspath(options.mcp_dir))
|
||||
elif os.path.isfile(os.path.join('..', 'runtime', 'commands.py')):
|
||||
main(os.path.abspath('..'))
|
||||
else:
|
||||
main(os.path.abspath('mcp'))
|
||||
Reference in new issue
Block a user