Skip to content

Releases: Vurv78/Autorun-rs

Autorun-rs v1.2.0

11 Apr 16:38
Compare
Choose a tag to compare

This update brings a file system, major optimizations to file size and a lot of changes you'd normally overlook to the lua api 🌑.

No Breaking Changes 🚫 🔨

Optimized File Size 📦

Autorun was getting pretty big from all of the dependencies.
Things were removed and replaced, human-panic was removed since it'd only show up for a few frames until gmod crashed since this is used as a dll, chrono replaced with time, etc.

📦 Old New
32 Bit 1 MB 570 KB
64 Bit 1.2 MB 663 KB

Fixes 🛠️

Initial Freezing 🧊

Due to the autorun/settings.toml file not existing, your game would freeze. This was fixed.
Now Autorun will properly create all essential folders and the settings file for you

32 Bit? 💻

As of this version, 32 bit seems to work properly.
Note it is missing the lua executor commands from the cli, which are still unable to be provided unfortunately.

File System 🗄️

In order to accompany some new features here, I wrote a file system for Autorun that'll make the process of taking input paths from the user much easier, and adding functions like Autorun.readFile and Autorun.require much easier.

This brings local paths to the lua api!

Plugin overrides 🧩

You can now return a string or boolean from a plugin's src/hook.lua, just as you can from autorun/hook.lua, to override the script!

New setting(s) ⚙️

autorun.nocolor

This setting is under the [autorun] tab as "nocolor", and disables the color in case your system doesn't support truecolor, or you simply don't want the colors.

New command(s) 🖥️

plugin

This is a general command for managing and creating plugins with Autorun, subcommands below:

  • new <name> - Creates a new plugin with template code at folder <folder>
  • list - Lists all currently (would-be) active plugins and info about them.
  • help - Explains the other subcommands to you in greater detail

image

Updated Autorun functions 🔧

Autorun.require 🌔

This function has been fixed to allow for calling it without having a .lua extension, bringing it closer to vanilla lua.

Additionally it now allows usage between local folders, so you can finally use it inside of your plugins 🧩!

Previously it only allowed you to Autorun.require files inside of your global autorun/scripts folder, but now you can require local to the running script.

Example

-- In autorun/plugins/myplugin/src/autorun.lua
local TheString = Autorun.require("myfile")
print(TheString) -- Hello world!
-- In autorun/plugins/myplugin/src/myfile.lua
return "Hello world!"

New Autorun functions 🧰

Autorun.readFile 📂

The long awaited function to read a file is here!
Call it with a filename and read a file local to the currently running script, same as Autorun.require now can.

Once Again...

That's pretty much it. It took a while to get here, so if you could support with a 🌟 or join the discord to ask any questions or report issues, it would be greatly appreciated. (This took way too long to write, so could support me for that as well.. 😵‍💫 )

Autorun-rs v1.1.0

25 Mar 04:38
Compare
Choose a tag to compare

A lot of not very minor but also not too crazy changes were made in 1.1.0

Breaking Changes 🔨

Autorun.require

This will now pass errors encountered in the function being ran, if any, instead of failing silently.

New Logger 📋

I replaced the very ugly logger with a custom implementation, which saves them in YYYY-MM-DD format for file sorting, and logs them with colors to the external console.
image
image

Asynchronous Lua Dumping 🌔

When joining servers, lua will be dumped asynchronously on a different thread, dumping around 50 files a second max to avoid using too much of your disk. (There could also be a setting to change the cooldown, bug me if you need it)

Console Enhancements ✨

The console finally has proper colors, a command system for easy extension and descriptions builtin.
Check it out:
image

New command: clear 🌀

This new command will clear the console, very useful when you're using something like Safety which prints a lot to the console..

New Autorun functions 🧰

Autorun.requirebin(name: string) ⚙️

This function is used to execute binary modules (Rust, C++ programs) located in your autorun/bin folder, as long as they are named accordingly: e.g. gmcl_mymodule_win64.dll for Autorun.requirebin("mymodule")

Autorun.print(...) 💻

Accompanying the colors in the console, you can now print with color using the Autorun.print command, which accepts any type of arguments, including tables, which, if they contain a number as the first index, will be considered a color.

Example Use:

Autorun.print( {255, 0, 0}, "Hello world!", {0, 0, 255}, "Now in blue!!", {0, 255, 0}, "Now with a function!!!", print )

image

Once Again...

That's pretty much it. It took a while to get here, so if you could support with a 🌟 or join the discord to ask any questions or report issues, it would be greatly appreciated. (This took way too long to write, so could support me for that as well.. 😵‍💫 )

Autorun-rs v1.0.0

06 Mar 01:56
Compare
Choose a tag to compare

🔨 Breaking Changes

The sautorun-rs folder is no longer being used.

Autorun will now use simply autorun.
If you're wondering why that was the name previously, it was supposed to be short for "Simple Autorun-rs", following the folder my original Autorun used. Since this is has gotten much bigger, the "simple" part is not really applicable.

Scripthook will use Autorun, not sautorun

For the same reason as the sautorun-rs folder being changed, plus one other detail, scripthook will now be passed Autorun, instead of sautorun.

Another reason for this is so that there's no use of a lowercase for a global, which violates a lot of basic naming conventions, and just looks awkward, especially when the constants are SCREAMING_SNAKE_CASE.

sautorun.NAME -> Autorun.NAME.
Much better.

🧩 Plugins System

Added a plugins system to distribute your creations for Autorun and have configurable settings, etc.
With the plugins comes new fields for Autorun:

Plugin = {
	VERSION: string,
	AUTHOR: string,
	NAME: string,
	DESCRIPTION: string,
	// Runtime table of settings, retrieved from YourPlugin/plugin.toml in the ``[settings]`` section.
	Settings = {}
}

Settings should be in a plugin.toml file located in the root of your plugin folder. You can use Safety as an example
Additionally, the autorun.lua and hook.lua should be in a folder named src.

Hopefully with this an ecosystem for Autorun creations can exist.
Safety has been updated to be a plugin

⚙️ Settings

First, Autorun started as mainly a lua dumper. However, as the name implies, this has grown to focus on being a scripting engine for clients before autorun and a scripthook.

@YohSambre originally had asked for a way to disable this, however I ended up creating a whole system for settings.

Settings are stored as a toml file in your autorun folder.
You will find it at autorun/settings.toml, where it will be generated by Autorun automatically, if it is missing.

List of Settings & Their defaults

  • [autorun]
    • hide = false
  • [plugins]
    • enabled = true
  • [logging]
    • enabled = true
  • [filesteal]
    • enabled = true
    • format = "<ip>"

You can find the default toml file here alongside comments as to what these settings mean.

settings command

You can see your current overview of settings with the new settings command!

📜 New Scripthook Fields

Alongside the Plugin field added, there is now a CODE_LEN field in case of null chars in the script hooked.
Additionally, the STARTUP field will work properly for hook.lua if it is running before autorun. So you can migrate a folder from autorun.lua to hook.lua, if you need to.

🐛 Squashing Bugs

Autorun was unstable. You'd crash even leaving a server sometimes. This was from heavy use of global variables across threads and just generally a very bad codebase. Since the refactor of 0.7.0 and many after, it's become a lot easier to maintain.

The biggest change, however, was getting rglua to v3.0.0, which added easier bindings and bindings to INetChannel, so that we could do stuff like grab the IP and Lua State dynamically, instead of unnecessarily hooking into the menu state and lua api. This leaves us with only two necessary detours, one for the lua executor, and the other for hooking lua scripts running.

I've yet to experience a crash with 1.0.0

Quality of Life

1.0.0 has also 'fixed' the random Unknown nb_ctl request: 4 prints in your console, so there's only prints from Autorun now.
See #26

📖 Documentation

As you might've noticed with the readme, I changed things up a bit.
Added some emojis and made it more concise for a better read. You can also find examples on the repo now.

There is now a default EmmyLua annotations file provided, for working with Autorun. You can find that here in the examples

That's pretty much it. It took a while to get here, so if you could support with a 🌟 or join the discord to ask any questions or report issues, it would be greatly appreciated. (This took way too long to write, so could support me for that as well.. 😵‍💫 )

Autorun-rs v1.0.0-beta5

03 Mar 00:34
Compare
Choose a tag to compare
  • Fixed presumably all crash bugs

Will have the rest of the changelogs (from 0.7.0 to 1.0.0) in 1.0.0 stable release.
Waiting on #22

Autorun-rs v1.0.0-beta

26 Jan 05:37
Compare
Choose a tag to compare
Pre-release

Doesn't include the gui.
This is a complete rewrite of Autorun. Much nicer codebase, so should be easier to add new features to.

The biggest effort in this update is stability. There are much less unwraps and unhandled exceptions, and the whole thing is secured to not crash gmod (at least on startup.) If a panic does occur, it will print a proper 'human' error log.

  • rglua has been updated from an ancient <1.0 version to 2.1
  • Added human-error on panic
  • Properly handle most exceptions to avoid crashes

Autorun-rs v0.7.0

03 Mar 00:32
Compare
Choose a tag to compare

🎄

    • Add indoc as a dependency
    • Add systrayx as a dependency (my fork of systray)
    • Add hide command which hides the console and can be opened from system tray.
  • ~ Fix double-loading errors which would cause crashes and other UB.
  • ~ Logging is enabled by default again

Builds generated by github actions below

Autorun-rs v0.7.0-beta

05 Dec 21:20
Compare
Choose a tag to compare
Pre-release

Autorun-rs v0.6.0

24 Nov 22:34
940ca63
Compare
Choose a tag to compare

'Fixed' crash caused by logging unit by disabling logging.
Can reenable it by compiling with the logging cfg flag.

No 32 Bit Build as it is currently broken. Get one from https://github.com/Vurv78/Autorun-rs/releases/tag/v0.4.0 until #22 is fixed.

~ Rust Edition 2021
~ Move to Rust Stable
~ Refactor

Autorun-rs v0.5.1

08 Aug 17:59
Compare
Choose a tag to compare
  • +Add source manipulation (Fix #13)
  • ~hook.lua will now also run during lua/includes/init.lua (autorun)

Builds generated by github actions below

Autorun-rs v0.5.0

02 Aug 04:13
6bf714d
Compare
Choose a tag to compare

Fixed multithreading issues with lua_run/lua_openscript that would cause random crashes with completely unrelated errors.

  • -lua_run
  • -lua_openscript
  • +lua_run_cl
  • +lua_openscript_cl
  • +lua_run_menu
  • +lua_openscript_menu

Builds generated by github actions below