Spigot Patcher

Discussion in 'Wiki Discussion' started by jtaylor69, Sep 9, 2014.

  1. jtaylor69

    jtaylor69 Retired Moderator
    Retired

    Spigot Patcher

    Spigot Patcher

    Patching your Spigot build with the latest changes



    Spigot Patcher is no longer required in the official CraftBukkit/Spigot 1.8; 1.9; 10. For instruction on how to compile the latest CraftBukkit/Spigot 1.10, please visit the Spigot Installation Guide.
    These tools are no longer available or supported.
    Spigot Patcher is a tool that is used to update the last public build #1649 with latest updates.
    Spigot updates will come in the form of binary patches. These patches will be issued nightly, based on the day’s current date, and will contain a summary of all changes issued since build #1649.

    What are binary patches?(top)

    Binary patches are a safe method of distributing and applying updates as they do not contain any copyrighted code, and are something which have been pioneered within the ROMhacking / homebrew community for over twenty years. In order to apply these patches you will need the special Spigot specific tool named “SpigotPatcher”, which you may download from the links below. The patching format is currently based on the beat or BPS-1 specification, however this is subject to change, and as such you should always use the official tool we have provided.

    Downloads(top)

    You can check the checksum of your files by uploading them to onlinemd5.com

    How to apply the patches(top)

    Below are instructions for how to apply the patches on your particular operating system.

    Windows(top)

    1. Download the Spigot Patcher (here) and the patch file (here).
    2. Place all downloaded files into a new folder, for example patcher within your Downloads folder. Ensure that your copy of Spigot build #1649 is placed in the same directory.
    3. Open CMD (easiest way is to press Windows Key + R and type cmd.exe followed by enter)
    4. Type the following command, presuming the files are stored in C:\Users\<user>\Downloads\patcher
      Code (Text):
      cd Downloads/patcher
    5. Now type the following to patch your Spigot build
      Code (Text):
      java -jar SpigotPatcher-1.0.jar spigot-1649.jar spigot-20140909a.bps spigot-patched.jar
      In this case, we've named our Spigot build "spigot-1649.jar" and chosen the output to be "spigot-patched.jar".
    6. Your build will now be patched and saved under the name "spigot-patched.jar". If you see something similar to the below screenshot, you have successfully patched.
    [​IMG]

    Mac OS X(top)

    1. Download the Spigot Patcher (here) and the patch file (here).
    2. Place all of the files in a new directory dedicated to Spigot.
    3. Open Terminal and enter your directory you made. For example, you can make a folder called "tmp" in the Downloads folder. To enter the folder in Terminal, type the following:
    Code (Text):
    cd Downloads/tmp/
    4. Now, type into Terminal:
    Code (Text):
    java -jar SpigotPatcher-1.0.jar spigot-1649.jar spigot-20140909a.bps spigot-patched.jar
    5. Congratulations! You successfully applied the Spigot patch! The spigot-patched.jar file will appear in "tmp" after you run the above command.

    [​IMG]

    Linux(top)

    These instructions assume you have ssh access to your linux server.
    In your shell, create a spigotwork folder under /home , we will use this folder to do our patch work.
    • cd /home
    • mkdir spigotwork
    • cd spigotwork
    Use wget to get the patch jar and patch bps files.
    • Copy the spigot1649.jar into the folder the folder
    • In your spigotwork folder you should now have 3 files:
    • [​IMG]
    • Run the command:
      • Code (Text):
        java -jar /home/spigotwork/SpigotPatcher-1.0.jar /home/spigotwork/spigot1649.jar /home/spigotwork/spigot-20140909b.bps /home/spigotwork/spigot-patched.jar
      • The output should look like this:
      • [​IMG]
      • You will now have spigot-patched.jar in the folder too. This is the file you will now run on your server.
    • Copy spigot-patched.jar to your server folder
    • Rename it to your desired name
    • Stop and Restart your spigot server
    • Type /version and you should get:
      • "This server is running CraftBukkit version git-Spigot-1.7.9-R0.2-204-g534549b"
    If you wish you can put the command into a sh script to make running it multiple times easier.
    Open you favorite editor:

    Example for Vi:
    • vi fixspigot.sh
      • press insert (to start insert mode)
      • Type in the following command line:
      • Code (Text):
         java -jar /home/spigotwork/SpigotPatcher-1.0.jar /home/spigotwork/spigot1649.jar /home/spigotwork/spigot-20140909a.bps /home/spigotwork/spigot-patched.jar
      • press [Esc]
      • press :
      • press x [ENTER]
    Example for Nano:
    • nano fixspigot.sh
      • Type in the following command line:
      • Code (Text):
         java -jar /home/spigotwork/SpigotPatcher-1.0.jar /home/spigotwork/spigot1649.jar /home/spigotwork/spigot-20140909a.bps /home/spigotwork/spigot-patched.jar
      • press ctrl-o and press [ENTER] to save
      • press ctrl-x to exit
    • You should now be back at the command prompt.
    • Make the script runnable by typing: chmod +x fixspigot.sh
    • Now you can run it with this command:
      • ./fixspigot.sh
     
    • Like Like x 1
    • Informative Informative x 1
  2. jtaylor69

    jtaylor69 Retired Moderator
    Retired

    Page is currently locked to certain editors whilst the DMCA is in effect as to prevent linking to "illegal" JARs.
    You may suggest changes on this thread whereby an editor will apply your changes if accepted.

    Thanks all :)
     
    • Agree Agree x 1
  3. Probably a good idea to add instructions on how to verify the md5 of the jars :) (please forgive me if it's already there, I just skimmed through it).
     
  4. jtaylor69

    jtaylor69 Retired Moderator
    Retired

    Added a link to a online tool that does this.
    I've placed it under Downloads
     
  5. hmm what is this bps?
     
  6. I think that these are the patch files.

    I made a small batch code in 15 minutes to patch the spigot jar:
    (if there are things i can do easier or that i can remove please say so :) )

    Maybe something to add like the .sh script but then in the windows section :D @brajo
    Code (Text):
    @ECHO off

    set "D=%date%"
    set hour=%time:~0,2%
    if "%hour:~0,1%" == " " set hour=0%hour:~1,1%
    set min=%time:~3,2%
    if "%min:~0,1%" == " " set min=0%min:~1,1%
    set "T=%hour%-%min%"

    IF EXIST ".\Patcher.jar" (
    ECHO Jar already exists!
    GOTO renbps
    )
    ELSE
    (
    REN SpigotPatcher-*.jar Patcher.jar
    ECHO Jar renamed!
    CLS
    GOTO renbps
    )

    :renbps
    IF EXIST ".\patch.bps" (
    ECHO BPS file already exists!
    CLS
    GOTO patch
    )
    ELSE
    (
    REN *.bps patch.bps
    ECHO BPS file renamed!
    CLS
    GOTO patch
    )

    :patch
    java -jar Patcher.jar spigot-1.7.10-R0.1-SNAPSHOT.jar patch.bps spigot.jar
    REN "spigot.jar" "spigot-%D%_%T%.jar"
    ECHO Patched!
    IF NOT EXIST ".\output" (
    MKDIR ".\output"
    )
    MOVE /y "spigot-%D%_%T%.jar" .\output
    COPY .\output\"spigot-%D%_%T%.jar" ".\output\spigot.jar"
    ECHO Done!
    PAUSE
    EXIT

    It creates two jars one named "spigot-date_hours-minuts" and one named "spigot.jar" in a folder named "output"
     
  7. http://www.majorgeeks.com/files/details/hashtab.html

    This is the easiest way in my opinion esp since this will be installed on your PC and accessed by right clicking a file and it looks like Spigot will be released this way as patches for some time.
     
  8. I haven't ran the patcher yet, been a bit busy between work and classes the last couple days. How long does patcher take to make the changes? If it's only a mere few seconds or less, implementing the update/patch commands in with most startup scripts wouldn't hurt anything it seems.

    Start script runs.
    Run patcher command line.
    Copy patched spigot file to proper directory(ies).
    Start server(s).
     
  9. So do I apply the oldest patch then the latest one or what way do I apply them? Also is there a changelog of what changes are added in these patches? Im curious thats all.
     
  10. Just the latest patch will do all the updates to the spigot.jar file. No need to chain the update files.
    MD_5 has been making new threads of each update currently. http://www.spigotmc.org/forums/spigot-updates.74/
     
    • Informative Informative x 1
  11. Thanks.
     
  12. I can't get this to work!!!!!!

    Im working on windows and its not working
     
    #13 revengcreeper, Sep 10, 2014
    Last edited by a moderator: Sep 10, 2014
  13. Dmck2b

    Services Staff

    'it's not working' is nothing we can help you with. Please provide some errors.
     
    • Agree Agree x 3
  14. Or at least tell us what steps you are doing until the point of the error or wall that you hit.
     
  15. Well i've figured it out java unrecognized command internal external
     
  16. Did you rename the #1649 build jar to spigot-1649.jar? Because the patch builds upon that jar.

    And if you did, is it in the same folder?
     
  17. Sorry i am on a mobile phone so its hard to see pictures.

    I can be wrong but could there be a space between the dash and the 1649 or the dash and the 1.0?
     
  18. And in the code aren't spaces right?

    So in the .jar names there are spaces and in the batch code there arent.
    could that be the problem?
     
  19. Oh alright, well then i am not sure what it could be.
    I will keep thinking but at this moment i dont know any other solutions.
     

Share This Page