Remove patcher from this repo

This commit is contained in:
md_5 2014-09-09 16:59:01 +10:00
parent 754070bef2
commit eb0774655f
3 changed files with 0 additions and 206 deletions

View file

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-shared-configuration>
<!--
This file contains additional configuration written by modules in the NetBeans IDE.
The configuration is intended to be shared among all the users of project and
therefore it is assumed to be part of version control checkout.
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
-->
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
<!--
Properties that influence various parts of the IDE, especially code formatting and the like.
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
That way multiple projects can share the same settings (useful for formatting rules for example).
Any value defined here will override the pom.xml file value but is only applicable to the current project.
-->
<org-netbeans-modules-editor-indent.CodeStyle.usedProfile>project</org-netbeans-modules-editor-indent.CodeStyle.usedProfile>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.classDeclBracePlacement>NEW_LINE</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.classDeclBracePlacement>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.otherBracePlacement>NEW_LINE</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.otherBracePlacement>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.methodDeclBracePlacement>NEW_LINE</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.methodDeclBracePlacement>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceWithinMethodCallParens>true</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceWithinMethodCallParens>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceWithinSwitchParens>true</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceWithinSwitchParens>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceWithinCatchParens>true</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceWithinCatchParens>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceWithinTryParens>true</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceWithinTryParens>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceWithinSynchronizedParens>true</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceWithinSynchronizedParens>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceWithinArrayInitBrackets>true</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceWithinArrayInitBrackets>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceWithinParens>true</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceWithinParens>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceWithinWhileParens>true</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceWithinWhileParens>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceWithinIfParens>true</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceWithinIfParens>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceWithinForParens>true</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaceWithinForParens>
</properties>
</project-shared-configuration>

View file

@ -1,113 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.spigotmc</groupId>
<artifactId>patcher</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>SpigotPatcher</name>
<url>http://www.spigotmc.org/</url>
<description>Spigot patch applicator.</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>17.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.md-5</groupId>
<artifactId>jbeat</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.12.2</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.name}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>**/*.java</exclude>
<exclude>**/*.SF</exclude>
<exclude>**/*.DSA</exclude>
</excludes>
</filter>
</filters>
<minimizeJar>true</minimizeJar>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifestEntries>
<Main-Class>org.spigotmc.patcher.Main</Main-Class>
</manifestEntries>
</archive>
</configuration>
</plugin>
<!-- <plugin>
<groupId>com.github.wvengen</groupId>
<artifactId>proguard-maven-plugin</artifactId>
<version>2.0.7</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>proguard</goal>
</goals>
</execution>
</executions>
<configuration>
<options>
<option>-allowaccessmodification</option>
<option>-repackageclasses org.spigotmc.patcher</option>
<option>-renamesourcefileattribute SourceFile</option>
<option>-keepattributes SourceFile,LineNumberTable</option>
<option>-keep class * { public static void main(String[]); }</option>
</options>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
</exclusions>
<libs>
<lib>${java.home}/lib/rt.jar</lib>
</libs>
</configuration>
</plugin>-->
</plugins>
</build>
</project>

View file

@ -1,62 +0,0 @@
package org.spigotmc.patcher;
import com.google.common.hash.Hashing;
import com.google.common.io.Files;
import java.io.File;
import net.md_5.jbeat.Patcher;
public class Main
{
public static void main(String[] args) throws Exception
{
if ( args.length != 3 )
{
System.out.println( "Welcome to the Spigot patch applicator." );
System.out.println( "In order to use this tool you will need to specify three command line arguments as follows:" );
System.out.println( "\tjava -jar SpigotPatcher.jar original.jar patch.bps output.jar" );
System.out.println( "This will apply the specified patch to the original jar and save it to the output jar" );
System.out.println( "Please ensure that you save your original jar for later use." );
System.out.println( "If you have any queries, please direct them to http://www.spigotmc.org/" );
return;
}
File originalFile = new File( args[0] );
File patchFile = new File( args[1] );
File outputFile = new File( args[2] );
if ( !originalFile.exists() )
{
System.err.println( "Specified original file " + originalFile + " does not exist!" );
return;
}
if ( !patchFile.exists() )
{
System.err.println( "Specified patch file " + patchFile + " does not exist!" );
return;
}
if ( outputFile.exists() )
{
System.err.println( "Specified output file " + outputFile + " exists, please remove it before running this program!" );
return;
}
System.out.println( "***** Starting patching process, please wait." );
System.out.println( "\tInput md5 Checksum: " + Files.hash( originalFile, Hashing.md5() ) );
System.out.println( "\tPatch md5 Checksum: " + Files.hash( patchFile, Hashing.md5() ) );
try
{
new Patcher( patchFile, originalFile, outputFile ).patch();
} catch ( Exception ex )
{
System.err.println( "***** Exception occured whilst patching file!" );
ex.printStackTrace();
outputFile.delete();
return;
}
System.out.println( "***** Your file has been patched and verified! We hope you enjoy using Spigot!" );
System.out.println( "\tOutput md5 Checksum: " + Files.hash( outputFile, Hashing.md5() ) );
}
}