BuildTools Updater

Oct 1, 2016
BuildTools Updater
  • Plugin is now a resource on Spigot as a Standalone. Click Here to get the resource ;)

    BuildTools Updater

    Simple and easy to use script to where you can update buildtools and preform tasks without opening any browser to find all your needs.



    For this to work, check BuildTools article to get the necessary software from the BuildTools page, or this wont work.

    Unless you tell me about the modifications, or rollback of this wiki page, let me know instead of modifying just to increase your edits. I am sick of reverting the wiki page back because of someone who gave no permission to edit. If you have a question, PM me instead of taking advantage of the wiki.

    Warning: If you save the batch file in the wrong place (mainly Downloads, Desktop, Server Folder, or Temp folder), you are expecting buildtools to possibly break other important files on your machine. Please save these batch files inside your buildtools folder. This batch file will open Git if you set the destination folder correctly.
    Notice: Before updating to 1.9, please note that some plugins will break (mostly world generating type plugins and disguise plugins) and may lead to unexpected results. Make sure you backup your server(s) before upgrading.

    Setup(top)

    I added this section so that there can be contribution, but i do expect these scripts to contain issues, and possibly not run at all since i may not have tested them. If you want to contribute, or create a branch, you may do so.
    Link: https://github.com/Legoman99573/Buildtools-Updater-Dev/.

    Progress in beta:
    • Added folders for organizing to prevent buildtools from breaking.
    • Added checker.bat to fix any missing dependencys
    • Added menu.bat for the menu.bat fir menu customization.
    Planned features:
    • Checker will function better on its own.
    • Checker will update script on launch.
    • Add subcommands. (Mainly for help command)

    Installation(top)

    1. Download Buildtools Updater
    2. Extract inside its own folder
    3. Run Buildtools.bat
    4. Folders like confg, api, and files should appear (if they exist, this step will be skipped)
    5. Go to config and configure gitlocation.txt and (Optional) version.txt, and (Optional) plugin.txt
    6. (If generated only) Delete folder files and run buildtools.bat again
    7. Everything should work if you configured gitlocation.txt correctly.
    8. Buildtools.bat will be renamed to buildtools-(version).bat (that is where auto-updater comes into play)
    9. Enjoy. (Any bugs or issues, create an issue on the github page stating the version you used. Old versions will not be supported , that I may have fixed that issue)

    Command List:(top)

    • run -runs buildtools.bat (will support copying api's to api folder in the future)
    • help -runs help menu
    • update -updates buildtools
    • plugin -runs plugin-fixer
    • bungee -updates BungeeCord and its modules
    • exit -safely closes batch file
    For this to work, you will have to configure the following files in your config folder.
    Code (version.txt):
    1.10.2
    Changes version for what server version you want
    Code (gitversion.txt):
    C:\Program Files\Git\bin\bash.exe
    Location to launch Git inside script.

    Config for pluginfixer:
    Code (plugin.txt):
    MyPlugin
    Plugin to execute through "plugin" command

    Planned additions that will be in config thst isnt supported yet or implemented:

    Config for copy command:
    Code (serverdir.txt):
    C:\Users\User\Desktop\Server
    Where to place Spigot or Craftbukkit at.
    Code (serverprovider.txt):
    Spigot
    Choose from Spigot or Craftbukkit. (May support lowercase to prevent case sensitivity to capitol letter.)
    This code will have to rely on this script which will go in your server folder:
    Code (server.bat):
    @echo off

    :restart
    java -jar Xmx=1024MB spigot-*.jar
    cls
    goto restart

    Credits(top)


    If you have changes for this script, you may freely change it around to make it easier, Messing with code and little knowledge could affect someone who actually wants to use this script. Thank Legoman99573 for modifying the script from the buildtools section called Windows. If Mac and Linux users can make a script just like this in program Terminal, or whatever the name is, feel free to edit this wiki and add-in a section of the OS you used.

    Thank the following for making this possible:
    • DJ_1420 for making the name of this wiki make more sense and made description better..
    • Willsr71 for fixing the faq's
    • NatonBoram for making an alt version (may test and post as a contributor on exit command)

    FAQ(top)

    1. Q: Is this a type of plugin to run my server?
    A: This is not a type of plugin for the server folder. This is a batch file for BuildTools, and its components, so that I can make it less painful for people to update their server. All you will do is configure it, and run the program.

    2. Q: Why do I always get the same boring messages when it fails?
    A: Script is updated, shouldnt be anymore boring default messages.

    3. Q: Will this work on mac/linux?
    A: No. Batch scripts are windows only.

    4. Q: Can I modify the script(s)?
    A: It is not recommended to do so, but if you know what your doing, Go right at it, I don't own Command Prompt, so you may make any changes you want.

    5. Q: Is it ok if I place my batch file inside any folder?
    A: It is recommended that you place the batch file in an empty folder, or it can affect other programs (mainly program files). Also if you place it inside folders like Desktop, Downloads, Temp, System32, etc. The batch file could break the programs, or leave alot of buildtools files extracted all over the machine.

    6. Q: May I contribute to this script?
    A: Have no problems. That is why I posted a github link in beta section. You can fork the script and start a pull request. I will test it. If I find it helpful and virus free, I will push it to the master and place your name in contribution.

    7. Q: Can I update this Wiki?
    A: PM me the changes you plan to make, so I know ahead of time you will update the wiki.

    8. Q: Can I redistribute this script?
    A: Under the copyright rule, I will allow modifications for personal use only. Copyjng, and saying you own the script will result in a DMCA takedown in github for stealing/redistributing script file for yourself.


    Any issues, or requests. Send me a PM, and ill try my best to answer it.

    To-Do's(top)

    • Merge all scripts together to make BuildTools.bat. (Will need to add a menu option to allow a user to choose an option, and allow the user to go to file and change the paste location and rerun the copy and paste part from the menu to save closing and relaunching the script unless i make a folder called temp and it will store the necessary info to allow locations to work.)
    • If user doesn't have git. It will download it for you and create a folder called dependency.

    Views/Edits(top)

    Thanks for reaching almost over 13000 Views, I am so glad I was of help to you all. This page went through several edits to become the success it has become today.

    Sources(top)

    I know this was hard, but here is sources that I found out how some scripts worked that helped make this possible.

    • ss64.com
    • stackoverflow.com
    • spigotmc.org :D

    Changelog(top)

    Alternative(top)

    You can also create your own BuildTools updater. First, navigate to the folder you want to install BuildTools. Create a .txt file and rename it BuildTools.sh. Windows will automatically open .sh files with Git, the tool used to open BuildTools.jar. Open the file with Notepad++ and paste in the following :
    Code (BuildTools.sh):
    curl -o BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastBuild/artifact/target/BuildTools.jar
    java -jar BuildTools.jar --rev latest
    rm BuildTools.jar
    exit
    Double-click on your new auto-updater and enjoy the ride!
  • Loading...
  • Loading...