Page 1 of 1

Working & wonderfull Mintest IDE, based on ZeroBrane Studio

PostPosted: Mon Jul 27, 2015 15:26
by wintermute
Dear Minetest-Community,

I am happy to announce that, the thing nobody waited for and one may actually use and like is ready.
We can hope that this lowers the burden of developing mods and brings fun in to programing.
Minetest lives and dies with its Mods, for Minetest to survive and to strive for better content, one thing is inevitable a environment which produces code. While in the past one may wrote his Mods in notepad.exe or notepad+, Vim or Emacs. We can now strive for unity, one experience across Mac, Linux and Windows. The ZeroBrane Studio IDE, a lightweight, easy-to-learn, highly-customizable piece of Free Software allows for this.

It provides not only keyword highlighting of LUA words, but an excellent autocompletion enriched with the wisest comments from celeron55 and the community.
It unites in a heroic afford the dev.minetest wiki and the Minetest Lua Modding API Reference. This was possible due ZeroBrane Studio is highly modable and has many parts written in Lua.

wintermute

Examples
Try to type these examples:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.get_worldpath():lower():reverse():upper():len()

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.get_meta(minetest.get_player_by_name("wintermute"):get_look_dir():multiply({x = 2, y = -3, z = 4}):get_inventory():get_width()


Installation
  1. visit the Download Site http://studio.zerobrane.com/download?not-this-time, download and install the fitting version
  2. Download the attached Zip, and extract it in the ZeroBraine Studio root directory (Linux: /opt/zbstudio).
  3. (optional) go in to interpreters and change (line 18) the command line option to run Minetest on your OS. This allows you to start Minetest from inside the IDE. The current configuration assumes global installation on Linux.

Usage
ZeroBrane provides different ¸Interpreters, , each with its own auto completion and different syntax highlighting. My afford went into an creation of an (nearly complete) api reference which is embedded ZeroBrane. Each function has specified parameters with helpful additions and descriptions what it does and additional comments on the return values.
The default value for the interpreter is a plain lua, when you installed my files correctly and restart ZeroBrane, then an additional interpreter appears under Project -> Lua Interpreter. When you select minetest, then you have full access to the auto-completion and comments, if you made the optional configuration or use an Linux with a global installation of Minetest, you can also test your mods by pressing the green fast-forward-like button.

Disclaimer
The information used for auto-completion were written by me, mistakes are not only possible, but highly probable. I have no problem with including fixes from other persons. Based on the feedback of the people and the necessity for improvements, i will decide whether to spend time improving the comment texts, the descriptions of return values and the arguments or move my attention to bigger projects.

License
The informations contained are partly inspired, partly part of the following resources:
    lua-users.org/ - License unknown
    dev.minetest.net - Creative Commons Attribution Share Alike
    lua_api.txt.md - celeron55 and others

Project Status
left to be decided,
initial version 1.0 was released on 27th of July 2015
Staff
wintermute
edit1: changed topic name since mine is not the first.
edit2: Described usage

Re: Working & wonderfull Mintest IDE, based on ZeroBrane Stu

PostPosted: Mon Jul 27, 2015 16:01
by est31
Very nice!

Re: Working & wonderfull Mintest IDE, based on ZeroBrane Stu

PostPosted: Mon Jul 27, 2015 19:33
by 4aiman
Nice, indeed.
But... how it's different from Geany? (no offense intended)

Re: Working & wonderfull Mintest IDE, based on ZeroBrane Stu

PostPosted: Mon Jul 27, 2015 23:30
by ExeterDad
I'm trying really hard to be excited... but I don't have a clue how to use this once I got the IDE and your files installed.
I'm assuming it's all correct as I can see Projects > Lua Interpreters > Minetest in the ZeroBrane dropdowns.

Do you happen to have a little Minetest specific tutorial handy? :D

Re: Working & wonderfull Mintest IDE, based on ZeroBrane Stu

PostPosted: Tue Jul 28, 2015 17:59
by wintermute
@4aimain: As far as i know Geanie has no build in support for Lua, but i can be wrong. Zerobrane just provided a very nice way for adding new auto completion. The difference is that I wrote my auto completion stuff for ZeroBrane. Geany is indeed very similar to Geany even when it comes to UI.
@ExeterDad: Thx, i forget telling the most important part the usage. Look in the first post.

wintermute

Re: Working & wonderfull Mintest IDE, based on ZeroBrane Stu

PostPosted: Tue Jul 28, 2015 18:18
by Calinou
wintermute wrote:@4aimain: As far as i know Geanie has no build in support for Lua, but i can be wrong.


Geany does support Lua syntax.

Re: Working & wonderfull Mintest IDE, based on ZeroBrane Stu

PostPosted: Wed Jul 29, 2015 04:26
by ExeterDad
@wintermute
Thanks for adding the usage bit. That changes everything :)
Perhaps I'll get a chance to play with it tomorrow.
Thanks for your work!

Re: Working & wonderfull Mintest IDE, based on ZeroBrane Stu

PostPosted: Wed Jul 29, 2015 09:15
by 4aiman
Calinou wrote:Geany does support Lua syntax.

+1

Moreover, code completion works for all files opened in session.
Also, Geany has many plugins: git/svn/mercurial support, split view of a document, bookmarks, markdown prewiew, in-built terminal, debugger support and much more.
Geany runs "ok" on RPi too ;)

Now, Geany *has* some issues on Windows. Namely, "grep" from GNUWin package still needs some "wrapper" in a form of a *.bat file to work properly, but that's easy google-able ;)




Don't get me wrong. I'm *not* trying to undermine anyone's work or anything.
It's just I'm not sure why should I (at least) *consider* to change my working IDE to ZeroBrane.

Re: Working & wonderfull Mintest IDE, based on ZeroBrane Stu

PostPosted: Wed Jul 29, 2015 12:25
by Rochambeau
@4aiman

Can you provide a tutorial (or link) how to integrate minetest into geany and debug mods with geany?

Re: Working & wonderfull Mintest IDE, based on ZeroBrane Stu

PostPosted: Wed Jul 29, 2015 13:34
by 4aiman
@Rochambeau

That would be offtopic, so I'll use a spoiler tag.

But prior to reading that, be sure to check ZeroBrane and the bindings wintermute has got ready for everyone.
Wintermute's work should get all attention it deserves.

+ Why do I use Geany

Re: Working & wonderfull Mintest IDE, based on ZeroBrane Stu

PostPosted: Wed Jul 29, 2015 17:33
by Rochambeau
What I mean by debugging is, that I want to trace my script step by step, see why it runs through ifs or elses, set breaking points, see variables and their values, and so on.

It seems like eclipse can do it:
http://dev.minetest.net/Intro#Integrate ... vironments
But I could not get it to work properly.

So is it possible with geany or ZeroBrane?

Re: Working & wonderfull Mintest IDE, based on ZeroBrane Stu

PostPosted: Wed Jul 29, 2015 18:12
by Evergreen
@Rochambeau Afaik, that is impossible with to do, no matter what IDE or text editor you use. That would have to be something implemented within minetest, which IDE's could take advantage of.

Slightly off-topic:
I might think about making a minetest integration plugin for vim, I just don't know whether that would be useful for other people or not.

Re: Working & wonderfull Mintest IDE, based on ZeroBrane Stu

PostPosted: Wed Jul 29, 2015 19:27
by Rochambeau
If you want to debug your embedded scripts same way you would debug a native application, give it a try.


That one line is taken from the minetest dev link I provided. It sounds like some kind of deeper mod debugging is possible with eclipse. I really should give it another try...

Sorry for OT..

Re: Working & wonderfull Mintest IDE, based on ZeroBrane Stu

PostPosted: Wed Jul 29, 2015 20:08
by 4aiman
Eclipse is too heavy if you ask me.
I'd choose ZeroBrane over Eclipse 100 times out of 10 ;)

As a side note, IDE integrated within Minetest itself would be a wonderful thing.
Actually, a WYSIWYG formspec editor would be even greater!
I even started writing one using some black magic, but ppl over there told me that was a wrong path.


Anyway, has anyone actually used ZeroBrane "in production"?

Re: Working & wonderfull Mintest IDE, based on ZeroBrane Stu

PostPosted: Thu Jul 30, 2015 19:26
by Rochambeau
Finally got debugging with eclipse to work (see screenshot)!

But I also tested ZeroBrane with wintermutes plugin and I like the autocompletion with the help texts. That is really helpful.

Re: Working & wonderfull Mintest IDE, based on ZeroBrane Stu

PostPosted: Fri May 06, 2016 01:19
by wilkgr76
Oooooh nice :)

Re: Working & wonderfull Mintest IDE, based on ZeroBrane Stu

PostPosted: Wed Feb 06, 2019 17:47
by poikilos
I've clarified the licensing and authorship of lua-users.org using info from the mini charter and JohnBelmonte respectively (see README for complete description of authorship and licensing). I've also added a fallback license to MinetestIDE (it is said to be "based on ZeroBrane Studio" so the only logical conclusion would be that the license is MIT License).

Now that the licensing is clear, I've put MinetestIDE (along with my install.sh script for GNU+Linux systems) on GitHub so the project can finally be continued and maintained:
Download MinetestIDE on GitHub

* please submit a pull request for any changes made after the 2015-07-27 version 1.0 release

:edit: As I'm the only one supporting this now, please make any replies at the new topic instead: MinetestIDE - Minetest Lua API Code Completion in ZeroBrane