Jump to content
Sign in to follow this  
Deluxes

Deluxes Tribot Repository Updater

Recommended Posts

GitHub:

Source: https://github.com/deluxes/Tribot-Repository-Updater/tree/master/updater

JAR Release: https://github.com/deluxes/Tribot-Repository-Updater/releases/tag/1

 

Features:

Script Packing (Credits to @AlphaDog for his packer)

Custom paths for packing

Submission status tracking

Submission Queue viewer

2fa login (Not tested tell me if it works)

How To Use

Download sources

Load up in IDE

Run the program

Fill in your login information and login

Scripts that you currently have on the repository will show in the list

Click global path and assign it to your src folder.

Add paths to to each of your scripts if you have weird path structures.

Press the pack button to generate the zips

Check the scripts you need to update and press Update Selected

Path data as well as login cookies are saved upon retrieval. If you do not want your cookies to be saved, delete cookies.ini after use.

 

 

Screenshots

r0INN8m.png

71qfSkL.pngfeILOKZ.png

sL9WP29.png

Edited by Deluxes
  • Like 3

Share this post


Link to post
Share on other sites
1 minute ago, Azuz53487 said:

Nice, I like the GUI as well. But isn't scripts automatically updated on each start? Like the scripts I use always says "Downloading %Script Name%" Which I assume it downloads the most recent script update? :o

It's automatically updated for you, the user.

The scripter still needs to update the script though and this is just a tool which makes that easier than doing it manually.

  • Like 1

Share this post


Link to post
Share on other sites
Just now, Worthy said:

It's automatically updated for you, the user.

The scripter still needs to update the script though and this is just a tool which makes that easier than doing it manually.

Oh I see, my bad. Didn't even read which section this thread was created in. Apparently this is useful for Script Publishers :)

Share this post


Link to post
Share on other sites

Massive refactoring of the script packing. Now automatically detects scripts that use a parent class that inherits Script instead of the script inheriting it directly. Made names of variables represent what they actually are.

 

If you are having issues detecting packs after packing, make sure the script name on the repository is the same as what is in your ScriptManifest.

Share this post


Link to post
Share on other sites
Just now, Worthy said:

i have at least a hundred or so.

Really? Why do you process all of the scripts? I only pack 1?

Pretty sure I made it only pack the selected ones. Try running it from the command line and see if there are any errors.

Edited by Deluxes

Share this post


Link to post
Share on other sites

It still freezes when I try to pack the script. I think it's related to it not extending Script directly. My scripts are 2 children down of the abstract class which extends Script.

I get this message:

DRf2D8I.png

 

However after further testing it also breaks on scripts which do extend the Script class directly.

But it also prints the same message as above in the debug:

 

I think the issue is that you perhaps index all of my scripts somewhere in your code and because one of them does not extend Script directly (2 children down) it breaks/freezes.

Share this post


Link to post
Share on other sites

Looks pretty cool, decided to give it a try.

 

This error pops up any time i try to pack one of my scripts

Found super script: scripts/lanapi/game/script/LANScript
java.nio.file.NoSuchFileException: C:\<snip>\.tribot\src\scripts
        at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
        at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
        at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
        at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)
        at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)
        at sun.nio.fs.WindowsFileSystemProvider.readAttributes(Unknown Source)
        at java.nio.file.Files.readAttributes(Unknown Source)
        at java.nio.file.FileTreeWalker.getAttributes(Unknown Source)
        at java.nio.file.FileTreeWalker.visit(Unknown Source)
        at java.nio.file.FileTreeWalker.walk(Unknown Source)
        at java.nio.file.Files.walkFileTree(Unknown Source)
        at java.nio.file.Files.walkFileTree(Unknown Source)
        at updater.packer.Packer.getDirFiles(Packer.java:247)
        at updater.packer.Packer.loadScript(Packer.java:149)
        at updater.packer.Packer.load(Packer.java:165)
        at updater.Controller.packScripts(Controller.java:367)
        at updater.Controller.onPackButtonAction(Controller.java:389)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.reflect.misc.Trampoline.invoke(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.reflect.misc.MethodUtil.invoke(Unknown Source)
        at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1769)
        at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1657)
        at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
        at javafx.event.Event.fireEvent(Event.java:198)
        at javafx.scene.Node.fireEvent(Node.java:8413)
        at javafx.scene.control.Button.fire(Button.java:185)
        at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182)
        at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96)
        at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
        at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
        at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
        at javafx.event.Event.fireEvent(Event.java:198)
        at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
        at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
        at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
        at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:380)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:294)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$354(GlassViewEventHandler.java:416)
        at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:415)
        at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
        at com.sun.glass.ui.View.notifyMouse(View.java:937)
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
        at java.lang.Thread.run(Unknown Source)

Share this post


Link to post
Share on other sites
On 15-11-2016 at 10:15 PM, laniax said:

Looks pretty cool, decided to give it a try.

 

This error pops up any time i try to pack one of my scripts

 

  Reveal hidden contents

 


Found super script: scripts/lanapi/game/script/LANScript
java.nio.file.NoSuchFileException: C:\<snip>\.tribot\src\scripts
        at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
        at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
        at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
        at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)
        at sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(Unknown Source)
        at sun.nio.fs.WindowsFileSystemProvider.readAttributes(Unknown Source)
        at java.nio.file.Files.readAttributes(Unknown Source)
        at java.nio.file.FileTreeWalker.getAttributes(Unknown Source)
        at java.nio.file.FileTreeWalker.visit(Unknown Source)
        at java.nio.file.FileTreeWalker.walk(Unknown Source)
        at java.nio.file.Files.walkFileTree(Unknown Source)
        at java.nio.file.Files.walkFileTree(Unknown Source)
        at updater.packer.Packer.getDirFiles(Packer.java:247)
        at updater.packer.Packer.loadScript(Packer.java:149)
        at updater.packer.Packer.load(Packer.java:165)
        at updater.Controller.packScripts(Controller.java:367)
        at updater.Controller.onPackButtonAction(Controller.java:389)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.reflect.misc.Trampoline.invoke(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.reflect.misc.MethodUtil.invoke(Unknown Source)
        at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1769)
        at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1657)
        at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
        at javafx.event.Event.fireEvent(Event.java:198)
        at javafx.scene.Node.fireEvent(Node.java:8413)
        at javafx.scene.control.Button.fire(Button.java:185)
        at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:182)
        at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:96)
        at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
        at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
        at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
        at javafx.event.Event.fireEvent(Event.java:198)
        at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
        at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
        at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
        at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:380)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:294)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$354(GlassViewEventHandler.java:416)
        at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:415)
        at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
        at com.sun.glass.ui.View.notifyMouse(View.java:937)
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
        at java.lang.Thread.run(Unknown Source)

 

 

@Deluxes @Worthy

I've fixed the issue myself, it didn't pick up script files which were in sub directories, also made the table stretch horizontal and vertically.

https://github.com/Laniax/Tribot-Repository-Updater

 

if you want a PR let me know.

Share this post


Link to post
Share on other sites
4 hours ago, laniax said:

@Deluxes @Worthy

I've fixed the issue myself, it didn't pick up script files which were in sub directories, also made the table stretch horizontal and vertically.

https://github.com/Laniax/Tribot-Repository-Updater

 

if you want a PR let me know.

Still doesn't pack it correctly.

 

What I do:

I select the script I want to check and press pack.

The application freezes for about 1-2 minutes.

Debug prints: Found super script: scripts/api/framework/script/core/BasicScript

Alert comes up saying "you're scripts have been successfully package"

 

but not a single script has the Pack Name checked to true.

 

 

Why do you pack every script when I only check one @Deluxes, it unnecessarily takes so long because I have so many scripts.

 

Share this post


Link to post
Share on other sites
29 minutes ago, Worthy said:

Still doesn't pack it correctly.

 

What I do:

I select the script I want to check and press pack.

The application freezes for about 1-2 minutes.

Debug prints: Found super script: scripts/api/framework/script/core/BasicScript

Alert comes up saying "you're scripts have been successfully package"

 

but not a single script has the Pack Name checked to true.

 

 

Why do you pack every script when I only check one @Deluxes, it unnecessarily takes so long because I have so many scripts.

 

I'm fairly sure it doesn't pack every script, and only the ones selected. Make sure the name of the script in your script manifest is the same as it is on the repository. It takes some time for it to analyze all the class files to search for super scripts then pack the found scripts off of that. 

Share this post


Link to post
Share on other sites
39 minutes ago, Deluxes said:

I'm fairly sure it doesn't pack every script, and only the ones selected. Make sure the name of the script in your script manifest is the same as it is on the repository. It takes some time for it to analyze all the class files to search for super scripts then pack the found scripts off of that. 

Make sure every script name is identical to the one on the repo?

Or just the one I pack?

 

I assume it packs every script because it updates the Pack field of every single row.

Share this post


Link to post
Share on other sites
15 minutes ago, Worthy said:

Make sure every script name is identical to the one on the repo?

Or just the one I pack?

 

I assume it packs every script because it updates the Pack field of every single row.

It updates the pack field of every one, but only creates the zip for the selected ones. I do think there is some things that I could change to make it more efficient, but can't be bothered to fix em atm.

Share this post


Link to post
Share on other sites
11 minutes ago, Deluxes said:

It updates the pack field of every one, but only creates the zip for the selected ones. I do think there is some things that I could change to make it more efficient, but can't be bothered to fix em atm.

 

You never answered my question:

27 minutes ago, Worthy said:

Make sure every script name is identical to the one on the repo?

Or just the one I pack?

 

Share this post


Link to post
Share on other sites

I believe I found the issue.
The packer doesn't find a script if it extends something which extends Script (basically two layers of abstraction).
You can do a quick test by creating an abstract class A that extends Script. Create another abstract class B that extends A. And create the script class with a ScriptManifest which extends B and you will see that while searching through the classfiles it will not pick it up.
@Deluxes 

 

Share this post


Link to post
Share on other sites
48 minutes ago, Worthy said:

I believe I found the issue.
The packer doesn't find a script if it extends something which extends Script (basically two layers of abstraction).
You can do a quick test by creating an abstract class A that extends Script. Create another abstract class B that extends A. And create the script class with a ScriptManifest which extends B and you will see that while searching through the classfiles it will not pick it up.
@Deluxes 

 

Yea, I didn't think anyone would do that so I didn't code that in nor do I plan to.

Share this post


Link to post
Share on other sites
1 hour ago, Deluxes said:

Yea, I didn't think anyone would do that so I didn't code that in nor do I plan to.

Well, the thing is it also doesn't work even if you don't extend Script twice.

I only do this for my new scripts (built on a new framework), but for my old scripts it will just hang for 2 mins and fail to locate it and then not create a zip.

It is just the poor design. I debugged the program and it gathers over 4,000 class files from my TRiBot folder and indexes across every single one of them.

Share this post


Link to post
Share on other sites
3 minutes ago, Worthy said:

Well, the thing is it also doesn't work even if you don't extend Script twice.

I only do this for my new scripts (built on a new framework), but for my old scripts it will just hang for 2 mins and fail to locate it and then not create a zip.

It is just the poor design. I debugged the program and it gathers over 4,000 class files from my TRiBot folder and indexes across every single one of them.

Works fine for me, as well as a few others :). Feel free to modify it to your needs.

Share this post


Link to post
Share on other sites
22 minutes ago, Deluxes said:

Works fine for me, as well as a few others :). Feel free to modify it to your needs.

It's all good. I just found the source code for AlphaDog's packer.

Found a way to have it find abstract scripts dynamically and packs scripts / loads instantly.

Edited by Worthy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×