pkulchenko / ZeroBranePackage

Packages for ZeroBrane Studio (https://studio.zerobrane.com)
MIT License
246 stars 148 forks source link

LuaRocks package #97

Open Propagram opened 12 months ago

Propagram commented 12 months ago

Hello @pkulchenko,

I've developed a package for ZeroBrane Studio to search, install, and manage LuaRocks.org modules directly within the IDE. Additionally, the plugin can manage packages directly within the IDE. Users will be able to submit packages directly to LuaRocks.org for display/installation via the plugin.

The plugin can self-update.

zbstudio

I've tested it on both Windows and Ubuntu. Unfortunately, I don't have access to other operating systems for testing.

Project link: https://github.com/Propagram/ZeroBranePackage-LuaRocks

I still need to conduct further tests and improvements. My plan is to maintain the plugin, fixing bugs, and possibly adding more features (pull requests welcome).

Question: Is there a possibility to bundle this package with the installer if it's genuinely useful for the community?

pkulchenko commented 12 months ago

Interesting project, thank you for sharing and working on it!

I've tested it on both Windows and Ubuntu. Unfortunately, I don't have access to other operating systems for testing.

I'd say if it works on Windows and Ubuntu, it's likely to work on macOS as well.

Project link: https://github.com/Propagram/ZeroBranePackage-LuaRocks

You can replace editorFilename with ide:GetRootPath(), as I'm trying to steer users away from using ide properties (with osname being an exception).

I still need to conduct further tests and improvements. My plan is to maintain the plugin, fixing bugs, and possibly adding more features (pull requests welcome).

That's a good idea. I was thinking about adding a section to README for third-party plugins that are hosted in external repositories.

Question: Is there a possibility to bundle this package with the installer if it's genuinely useful for the community?

It's unlikely. There are several popular packages, but right now none of them are distributed with the IDE itself. It's fairly simple to add a package, so I'd expect the users to do that and from that point they can use your package to install other modules.

Propagram commented 12 months ago

You can replace editorFilename with ide:GetRootPath(), as I'm trying to steer users away from using ide properties (with osname being an exception).

Fixed, thanks! Is there any method to get the user settings directory? (ide.configs.user)

That's a good idea. I was thinking about adding a section to README for third-party plugins that are hosted in external repositories.

It would be cool!

It's unlikely. There are several popular packages, but right now none of them are distributed with the IDE itself. It's fairly simple to add a package, so I'd expect the users to do that and from that point they can use your package to install other modules.

It makes sense! If you include my package together, you'd need to include LuaRocks as well :)

pkulchenko commented 12 months ago

Is there any method to get the user settings directory? (ide.configs.user)

I don't think so. Why do you need the config location?

Propagram commented 12 months ago

The IDE packages downloaded from LuaRocks.org are extracted to this folder. (<user>/packages)

My plugin prefers a per-user approach. This avoids permission issues.

pkulchenko commented 12 months ago

There is ide:GetPackagePath(packname) that returns the package path; it will use oshome value if configured, so should place the package correctly.

Propagram commented 12 months ago

Fixed. Thanks!