Fix packaging and install to not have the src/ folder, making it align better with the dev env.
This commit is contained in:
parent
34706d6acf
commit
18aec5b257
3 changed files with 14 additions and 17 deletions
|
@ -194,11 +194,11 @@
|
|||
<property name="jarname" value="${modname}-src-${version}" />
|
||||
<zip destfile="${basedir}/target/${jarname}.zip">
|
||||
<zipfileset dir="${basedir}" includes="LICENSE-fml.txt,difflist.txt,commands.patch" prefix="fml" />
|
||||
<zipfileset dir="${common.src.dir}" includes="**/*.java" prefix="fml/src/common" />
|
||||
<zipfileset dir="${client.src.dir}" includes="**/*.java" prefix="fml/src/minecraft" />
|
||||
<zipfileset dir="${server.src.dir}" includes="**/*.java" prefix="fml/src/minecraft_server" />
|
||||
<zipfileset dir="${basedir}" includes="fmlversion.properties" prefix="fml/src/common" />
|
||||
<zipfileset dir="${common.src.dir}" includes="fml_at.cfg" prefix="fml/src/common" />
|
||||
<zipfileset dir="${common.src.dir}" includes="**/*.java" prefix="fml/common" />
|
||||
<zipfileset dir="${client.src.dir}" includes="**/*.java" prefix="fml/client" />
|
||||
<zipfileset dir="${server.src.dir}" includes="**/*.java" prefix="fml/server" />
|
||||
<zipfileset dir="${basedir}" includes="fmlversion.properties" prefix="fml/common" />
|
||||
<zipfileset dir="${common.src.dir}" includes="fml_at.cfg" prefix="fml/common" />
|
||||
<zipfileset dir="${patch.src.dir}" includes="**/*.patch" prefix="fml/patches" />
|
||||
<mappedresources>
|
||||
<concat>
|
||||
|
|
|
@ -262,8 +262,8 @@ def apply_fml_patches(fml_dir, mcp_dir, src_dir, copy_files=True):
|
|||
apply_patches(mcp_dir, os.path.join(fml_dir, 'patches', 'minecraft'), src_dir)
|
||||
if os.path.isdir(os.path.join(fml_dir, 'patches', 'common')):
|
||||
apply_patches(mcp_dir, os.path.join(fml_dir, 'patches', 'common'), src_dir, '/common/', '/minecraft/')
|
||||
if copy_files and os.path.isdir(os.path.join(fml_dir, 'src', 'minecraft')):
|
||||
copytree(os.path.join(fml_dir, 'src', 'minecraft'), os.path.join(src_dir, 'minecraft'))
|
||||
if copy_files and os.path.isdir(os.path.join(fml_dir, 'client')):
|
||||
copytree(os.path.join(fml_dir, 'client'), os.path.join(src_dir, 'minecraft'))
|
||||
#delete argo
|
||||
if os.path.isdir(os.path.join(src_dir, 'minecraft', 'argo')):
|
||||
shutil.rmtree(os.path.join(src_dir, 'minecraft', 'argo'))
|
||||
|
@ -273,13 +273,13 @@ def apply_fml_patches(fml_dir, mcp_dir, src_dir, copy_files=True):
|
|||
apply_patches(mcp_dir, os.path.join(fml_dir, 'patches', 'minecraft_server'), src_dir)
|
||||
if os.path.isdir(os.path.join(fml_dir, 'patches', 'common')):
|
||||
apply_patches(mcp_dir, os.path.join(fml_dir, 'patches', 'common'), src_dir, '/common/', '/minecraft_server/')
|
||||
if copy_files and os.path.isdir(os.path.join(fml_dir, 'src', 'minecraft_server')):
|
||||
copytree(os.path.join(fml_dir, 'src', 'minecraft_server'), os.path.join(src_dir, 'minecraft_server'))
|
||||
if copy_files and os.path.isdir(os.path.join(fml_dir, 'server')):
|
||||
copytree(os.path.join(fml_dir, 'server'), os.path.join(src_dir, 'minecraft_server'))
|
||||
|
||||
if os.path.isdir(os.path.join(fml_dir, 'patches', 'common')):
|
||||
apply_patches(mcp_dir, os.path.join(fml_dir, 'patches', 'common'), src_dir)
|
||||
if copy_files and os.path.isdir(os.path.join(fml_dir, 'src', 'common')):
|
||||
copytree(os.path.join(fml_dir, 'src', 'common'), os.path.join(src_dir, 'common'))
|
||||
if copy_files and os.path.isdir(os.path.join(fml_dir, 'common')):
|
||||
copytree(os.path.join(fml_dir, 'common'), os.path.join(src_dir, 'common'))
|
||||
|
||||
def finish_setup_fml(fml_dir, mcp_dir):
|
||||
sys.path.append(mcp_dir)
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
import os, os.path, sys
|
||||
|
||||
fml_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
mcp_dir = os.path.abspath('..')
|
||||
|
||||
from fml import setup_fml, finish_setup_fml, apply_fml_patches, setup_mcp
|
||||
|
||||
def main():
|
||||
def fml_main(fml_dir, mcp_dir):
|
||||
print '================ Forge ModLoader Setup Start ==================='
|
||||
setup_mcp(fml_dir, mcp_dir)
|
||||
setup_fml(fml_dir, mcp_dir)
|
||||
apply_fml_patches(fml_dir, mcp_sir, os.path.join(mcp_dir, 'src'))
|
||||
apply_fml_patches(fml_dir, mcp_dir, os.path.join(mcp_dir, 'src'))
|
||||
finish_setup_fml(fml_dir, mcp_dir)
|
||||
print '================ Forge ModLoader Setup End ==================='
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
fml_main(os.path.dirname(os.path.abspath(__file__)), os.path.abspath('..'))
|
Loading…
Reference in a new issue