Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MinecraftForge
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mirrors
Minecraft
MinecraftForge
Commits
3f15cd54
Commit
3f15cd54
authored
Jun 30, 2013
by
Christian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Functional client @ 1.6.1
parent
12c928c5
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
71 additions
and
24 deletions
+71
-24
build.xml
build.xml
+23
-2
common/cpw/mods/fml/common/asm/transformers/MCPMerger.java
common/cpw/mods/fml/common/asm/transformers/MCPMerger.java
+4
-4
common/cpw/mods/fml/common/launcher/FMLTweaker.java
common/cpw/mods/fml/common/launcher/FMLTweaker.java
+1
-0
common/cpw/mods/fml/common/patcher/ClassPatchManager.java
common/cpw/mods/fml/common/patcher/ClassPatchManager.java
+42
-17
install/fml.py
install/fml.py
+1
-1
No files found.
build.xml
View file @
3f15cd54
...
...
@@ -30,9 +30,13 @@
<isset
property=
"env.WORKSPACE"
/>
</condition>
<property
name=
"fml.python.dir"
location=
"${basedir}/python"
/>
<property
name=
"fml.lzma.dir"
location=
"${basedir}/lzmabin"
/>
<condition
property=
"python.exe"
value=
"${fml.python.dir}/python_fml"
else=
"python"
>
<os
family=
"Windows"
/>
</condition>
<condition
property=
"lzma.exe"
value=
"${fml.lzma.dir}/xz.exe"
else=
"xz"
>
<os
family=
"Windows"
/>
</condition>
<condition
property=
"mcp.exists"
>
<available
file=
"${mcp.home}/runtime/commands.py"
/>
</condition>
...
...
@@ -150,7 +154,7 @@
</jar>
<antcall
target=
"signjar"
/>
<zip
update=
"true"
destfile=
"${basedir}/target/${universal.jarname}.zip"
>
<
zipfileset
dir=
"${basedir}/binpatch"
prefix=
"binpatch"
includes=
"**/*.binpatch
"
/>
<
fileset
dir=
"${basedir}"
includes=
"binpatches.pack.lzma,deobfuscation_data-${version.minecraft}.lzma
"
/>
<fileset
dir=
"${client.mcp.obfoutput}"
includes=
"*.class"
/>
<zipfileset
dir=
"${basedir}"
includes=
"fmlversion.properties"
/>
<zipfileset
dir=
"${basedir}"
includes=
"LICENSE-fml.txt"
/>
...
...
@@ -216,7 +220,8 @@
<globmapper
from=
"packaged.srg"
to=
"deobfuscation_data-${version.minecraft}"
/>
</mappedresources>
</copy>
<exec
executable=
"lzma"
>
<exec
executable=
"${lzma.exe}"
>
<arg
line=
"--format=lzma"
/>
<arg
line=
"build-tmp-deobf/deobfuscation_data-${version.minecraft}"
/>
<arg
line=
"-v"
/>
</exec>
...
...
@@ -402,5 +407,21 @@
<arg
path=
"${basedir}/binpatch/server"
/>
<arg
value=
"true"
/>
</java>
<mkdir
dir=
"binpatch-tmp"
/>
<zip
destfile=
"binpatch-tmp/binpatches.jar"
basedir=
"${basedir}"
>
<include
name=
"binpatch/**/*.binpatch"
/>
</zip>
<apply
executable=
"pack200"
>
<arg
line=
"--no-gzip"
/>
<arg
line=
"binpatch-tmp/binpatches.pack"
/>
<fileset
dir=
"binpatch-tmp"
includes=
"binpatches.jar"
/>
</apply>
<apply
executable=
"${lzma.exe}"
>
<arg
line=
"--format=lzma"
/>
<arg
line=
"-v"
/>
<fileset
dir=
"binpatch-tmp"
includes=
"binpatches.pack"
/>
</apply>
<move
file=
"binpatch-tmp/binpatches.pack.lzma"
todir=
"${basedir}"
/>
<delete
dir=
"binpatch-tmp"
failonerror=
"false"
/>
</target>
</project>
common/cpw/mods/fml/common/asm/transformers/MCPMerger.java
View file @
3f15cd54
common/cpw/mods/fml/common/launcher/FMLTweaker.java
View file @
3f15cd54
...
...
@@ -47,6 +47,7 @@ public class FMLTweaker implements ITweaker {
classLoader
.
addTransformerExclusion
(
"cpw.mods.fml.repackage."
);
classLoader
.
addTransformerExclusion
(
"cpw.mods.fml.relauncher."
);
classLoader
.
addTransformerExclusion
(
"cpw.mods.fml.common.asm.transformers."
);
classLoader
.
addClassLoaderExclusion
(
"LZMA."
);
FMLLaunchHandler
.
configureForClientLaunch
(
classLoader
,
this
);
}
...
...
common/cpw/mods/fml/common/patcher/ClassPatchManager.java
View file @
3f15cd54
package
cpw.mods.fml.common.patcher
;
import
java.io.ByteArrayInputStream
;
import
java.io.ByteArrayOutputStream
;
import
java.io.File
;
import
java.io.FilenameFilter
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.net.URISyntaxException
;
import
java.security.CodeSource
;
import
java.util.Collections
;
...
...
@@ -10,9 +13,14 @@ import java.util.List;
import
java.util.Locale
;
import
java.util.jar.JarEntry
;
import
java.util.jar.JarFile
;
import
java.util.jar.JarInputStream
;
import
java.util.jar.JarOutputStream
;
import
java.util.jar.Pack200
;
import
java.util.logging.Level
;
import
java.util.regex.Pattern
;
import
LZMA.LzmaInputStream
;
import
com.google.common.base.Joiner
;
import
com.google.common.base.Strings
;
import
com.google.common.base.Throwables
;
...
...
@@ -83,18 +91,20 @@ public class ClassPatchManager {
public
void
setup
(
Side
side
)
{
Pattern
binpatchMatcher
=
Pattern
.
compile
(
String
.
format
(
"binpatch/%s/.*.binpatch"
,
side
.
toString
().
toLowerCase
(
Locale
.
ENGLISH
)));
Jar
File
fmlJar
;
Jar
InputStream
jis
;
try
{
FMLRelaunchLog
.
fine
(
"FML URI is %s"
,
FMLTweaker
.
getJarLocation
());
File
fmlJarFile
=
new
File
(
FMLTweaker
.
getJarLocation
());
if
(!
fmlJarFile
.
exists
()
||
!
fmlJarFile
.
isFile
())
InputStream
binpatchesCompressed
=
getClass
().
getResourceAsStream
(
"/binpatches.pack.lzma"
);
if
(
binpatchesCompressed
==
null
)
{
FMLRelaunchLog
.
log
(
Level
.
INFO
,
"Not found an FML jar, I assume you're developing FML. Hi cpw or Lex!"
);
patches
=
ArrayListMultimap
.
create
();
FMLRelaunchLog
.
log
(
Level
.
SEVERE
,
"The binary patch set is missing. Things are probably about to go very wrong."
);
return
;
}
fmlJar
=
new
JarFile
(
fmlJarFile
);
LzmaInputStream
binpatchesDecompressed
=
new
LzmaInputStream
(
binpatchesCompressed
);
ByteArrayOutputStream
jarBytes
=
new
ByteArrayOutputStream
();
JarOutputStream
jos
=
new
JarOutputStream
(
jarBytes
);
Pack200
.
newUnpacker
().
unpack
(
binpatchesDecompressed
,
jos
);
jis
=
new
JarInputStream
(
new
ByteArrayInputStream
(
jarBytes
.
toByteArray
()));
}
catch
(
Exception
e
)
{
...
...
@@ -104,28 +114,43 @@ public class ClassPatchManager {
patches
=
ArrayListMultimap
.
create
();
for
(
JarEntry
entry
:
Collections
.
list
(
fmlJar
.
entries
()))
do
{
try
{
JarEntry
entry
=
jis
.
getNextJarEntry
();
if
(
entry
==
null
)
{
break
;
}
if
(
binpatchMatcher
.
matcher
(
entry
.
getName
()).
matches
())
{
ClassPatch
cp
=
readPatch
(
entry
,
fmlJar
);
ClassPatch
cp
=
readPatch
(
entry
,
jis
);
if
(
cp
!=
null
)
{
patches
.
put
(
cp
.
sourceClassName
,
cp
);
}
}
else
{
jis
.
closeEntry
();
}
}
catch
(
IOException
e
)
{
}
FMLLog
.
fine
(
"Read %d binary patches from %s"
,
patches
.
size
(),
fmlJar
.
getName
());
}
while
(
true
);
FMLLog
.
fine
(
"Read %d binary patches"
,
patches
.
size
());
FMLLog
.
fine
(
"Patch list :\n\t%s"
,
Joiner
.
on
(
"\t\n"
).
join
(
patches
.
asMap
().
entrySet
()));
}
private
ClassPatch
readPatch
(
JarEntry
patchEntry
,
Jar
File
jarFile
)
private
ClassPatch
readPatch
(
JarEntry
patchEntry
,
Jar
InputStream
jis
)
{
FMLLog
.
finest
(
"Reading patch data from %s
in file %s"
,
patchEntry
.
getName
(),
jarFile
.
getName
());
FMLLog
.
finest
(
"Reading patch data from %s
"
,
patchEntry
.
getName
());
ByteArrayDataInput
input
;
try
{
input
=
ByteStreams
.
newDataInput
(
ByteStreams
.
toByteArray
(
j
arFile
.
getInputStream
(
patchEntry
)
));
input
=
ByteStreams
.
newDataInput
(
ByteStreams
.
toByteArray
(
j
is
));
}
catch
(
IOException
e
)
{
...
...
install/fml.py
View file @
3f15cd54
...
...
@@ -85,7 +85,7 @@ def read_mc_versions(fml_dir, version=None, work_dir=None):
mc_info
[
'library_dir'
]
=
os
.
path
.
join
(
work_dir
,
'libraries'
)
mc_info
[
'client_file'
]
=
os
.
path
.
join
(
version_dir
,
'%s.jar'
%
version
)
mc_info
[
'json_file'
]
=
os
.
path
.
join
(
version_dir
,
'%s.json'
%
version
)
mc_info
[
'server_file'
]
=
os
.
path
.
join
(
work_dir
,
'minecraft_server.
jar'
)
mc_info
[
'server_file'
]
=
os
.
path
.
join
(
work_dir
,
'minecraft_server.
%s.jar'
%
version
)
mc_info
[
'asset_dir'
]
=
os
.
path
.
join
(
work_dir
,
'assets'
)
else
:
mc_info
[
'new_launcher'
]
=
False
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment