fixed punctuation and spelling; clarified Authors section

and added install and moved patch data to zbstudio directory
master
poikilos 2019-02-06 12:20:15 -05:00
parent 778b7505d2
commit 0fc052cb58
5 changed files with 153 additions and 29 deletions

2
.gitignore vendored
View File

@ -38,4 +38,4 @@ luac.out
*.i*86
*.x86_64
*.hex
*.kate-swp

View File

@ -1,35 +1,39 @@
Dear Minetest-Community,
# MinetestIDE
This is wintermute's working & wonderful Minetest IDE, based on ZeroBrane Studio!
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.
> 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 into programming.
> Minetest lives and dies with its Mods, so for Minetest to survive and to strive for better content, one thing is inevitable: an environment which produces code. While in the past one may have written mods in notepad.exe, Notepad++, Vim or Emacs, we can now strive for unity--one experience across Mac, Linux and Windows. The ZeroBrane Studio, a lightweight, easy-to-learn, highly-customizable piece of Free Software, allows for this [after some modding of the program itself].
>
> MinetestIDE provides not only keyword highlighting for Lua, but also excellent code completion enriched with the wisest comments from celeron55 and the community.
It unites, in a heroic effort, the dev.minetest.net wiki and the Minetest Lua Modding API Reference. This was possible due to ZeroBrane Studio being highly modable, having many parts written in Lua.
>
> *-wintermute [edited by poikilos for spelling, grammar, and clarification]*
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.
[i]wintermute[/i]
[b]Examples[/b]
## Examples
Try to type these examples:
[code]minetest.get_worldpath():lower():reverse():upper():len()[/code]
[code]minetest.get_meta(minetest.get_player_by_name("wintermute"):get_look_dir():multiply({x = 2, y = -3, z = 4}):get_inventory():get_width()[/code]
`minetest.get_worldpath():lower():reverse():upper():len()`
`minetest.get_meta(minetest.get_player_by_name("wintermute"):get_look_dir():multiply({x = 2, y = -3, z = 4}):get_inventory():get_width()`
[b]Installation[/b]
[list=1][*] visit the Download Site [url]http://studio.zerobrane.com/download?not-this-time[/url], download and install the fitting version
[*] Download the attached Zip, and extract it in the ZeroBraine Studio root directory (Linux: /opt/zbstudio).
[*] (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.[/list]
## Installation
(if you are using Linux, run `bash install.sh` instead)
1. Visit the [Download Site](http://studio.zerobrane.com/download?not-this-time), then download and install the release for your operating system.
2. Copy all directories & files from MinetestIDE/zbstudio to the ZeroBrane 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.
[b]Disclaimer[/b]
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.
## Disclaimer
The information used for auto-completion was 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. -wintermute
[b]License[/b]
The informations contained are partly inspired, partly part of the following resources:
[list]lua-users.org/ - License unknown[/list]
[list]dev.minetest.net - Creative Commons Attribution Share Alike[/list]
[list]lua_api.txt.md - celeron55 and others[/list]
## Authors
* Some content is inspired by or derived from lua-users.org, dev.minetest.net, or lua_api.txt.md.
* <http://lua-users.org/> - Sample Code: [MIT License](https://opensource.org/licenses/MIT); text/media: [Creative Commons 0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/) (see <http://axlemedia.net/poikilos/images/lua-users.org-copyright-and-license-screenshot.png>)
* <http://dev.minetest.net> - Creative Commons Attribution Share Alike 3.0
* [lua_api.txt.md](https://notabug.org/pgimeno/Gists/src/minetest--lua_api.md/lua_api.md) - celeron55 and others
* There may be content copied from ZeroBrane Studio and therefore under the MIT License and copyright (c) ZeroBrane LLC
* All content not from sources above is released under the included fallback license (see included [LICENSE](https://github.com/poikilos/MinetestIDE/blob/master/LICENSE) file in your favorite text editor); and copyright 2015 wintermute (post-2015 changes are copyright poikilos 2019-present, and any other authors listed in the git commit history such as at <https://github.com/poikilos/MinetestIDE/commits/master>).
[b]Project Status[/b]
left to be decided,
initial version 1.0 was released on 27th of July 2015
[b]Staff[/b]
[i]wintermute[/i]
## Project Status
*wintermute* left this to be decided, so I (poikilos) am maintaining it for now. This is a side project, so please submit issues as [pull requests](https://github.com/poikilos/MinetestIDE/pulls) if possible--otherwise use the [Issues](https://github.com/poikilos/MinetestIDE/issues) page. Hopefully wintermute will submit any changes he made after the initial release.
The initial release was version 1.0 (July 27, 2015) on the minetest.net forum post <https://forum.minetest.net/viewtopic.php?f=14&t=12923>.

120
install.sh Executable file
View File

@ -0,0 +1,120 @@
#!/bin/sh
echo
zs_dest=/opt/zbstudio
if [ "$1" == "uninstall" ]; then
bad_file="$zs_dest/zbstudio/interpreters/minetest.lua"
dest_file="$zs_dest/interpreters/minetest.lua"
if [ -f "$bad_file" ]; then
echo "WARNING: found incorrectly installed file $bad_file, so removing..."
sudo rm -f "$bad_file"
sudo rmdir "$zs_dest/zbstudio/interpreters"
if [ -f "$bad_file" ]; then
echo "ERROR: Failed to remove $bad_file"
end_msg="Uninstall FAILED."
end_ret=1
fi
fi
if [ -f "$dest_file" ]; then
sudo rm -f "$dest_file"
sudo rmdir "$zs_dest/interpreters"
fi
end_msg="Uninstalled successfully"
end_ret=0
if [ -f "$dest_file" ]; then
echo "ERROR: could not remove $dest_file"
echo
echo
end_ret=1
end_msg="Uninstall FAILED."
fi
bad_file="$zs_dest/zbstudio/api/lua/minetest.lua"
dest_file="$zs_dest/api/lua/minetest.lua"
if [ -f "$bad_file" ]; then
echo "WARNING: found incorrectly installed file $bad_file, so removing..."
sudo rm -f "$bad_file"
sudo rmdir "$zs_dest/api/lua"
sudo rmdir "$zs_dest/api"
if [ -f "$bad_file" ]; then
echo "ERROR: Failed to remove $bad_file"
end_msg="Uninstall FAILED."
end_ret=1
fi
fi
if [ -f "$dest_file" ]; then
sudo rm -f "$dest_file"
sudo rmdir "$zs_dest/zbstudio/api/lua"
sudo rmdir "$zs_dest/zbstudio/api"
fi
if [ -f "$dest_file" ]; then
echo "ERROR: could not remove $dest_file"
echo
echo
end_msg="Uninstall FAILED."
end_ret=1
fi
echo "$end_msg"
echo
echo
exit $end_ret
fi
if [ ! -d zbstudio ]; then
cd "${0%/*}"
echo "WARNING: had to change directory to `pwd` since zbstudio patch directory was not found..."
fi
if [ ! -d zbstudio ]; then
echo "ERROR: Nothing done since missing zbstudio patch--you must run this installer from the MinetestIDE directory containing the zbstudio patch directory."
echo
echo
exit 1
fi
mi_path="`pwd`"
end_msg=""
if [ ! -d "$zs_dest" ]; then
if [ ! -d "$HOME/Downloads" ]; then mkdir -p "$HOME/Downloads"; fi
cd "$HOME/Downloads"
dl_name=ZeroBraneStudioEduPack-1.80-linux.sh
if [ ! -f "$dl_name" ]; then
wget -O $dl_name https://download.zerobrane.com/$dl_name
sh $dl_name
if [ ! -d "$zs_dest" ]; then
echo "ERROR: MinetestIDE not installed since failed to install $zs_dest"
echo
echo
exit 2
fi
end_msg="If you paid for ZeroBrane Studio, thank you for your contribution. If you have not, please consider supporting the project <https://studio.zerobrane.com/support>."
fi
fi
if [ ! -d "$zs_dest" ]; then
echo "ERROR: nothing done since missing $zs_dest."
echo "You first must install ZeroBrane studio."
exit 3
fi
cd "$mi_path"
if [ ! -f "`command -v rsync`" ]; then
#echo "ERROR: Nothing done since rsync is required."
#exit 5
echo "WARNING: no rsync, so trying cp -R..."
api_lua_dest="$zs_dest/api/lua"
interpreters_dest="$zs_dest/interpreters"
# if [ ! -d "$api_lua_dest" ]; then sudo mkdir -p "$api_lua_dest"; fi
# if [ ! -d "$interpreters_dest" ]; then sudo mkdir -p "$interpreters_dest"; fi
sudo cp -R zbstudio/* "$zs_dest"
if [ ! -f "$api_lua_dest/minetest.lua" ]; then
echo "ERROR: failed to install $api_lua_dest/minetest.lua"
find "$zs_dest" -iname minetest.lua
exit 4
fi
if [ ! -f "$interpreters_dest/minetest.lua" ]; then
echo "ERROR: failed to install $interpreters_dest/minetest.lua"
find "$zs_dest" -iname minetest.lua
exit 4
fi
echo "Successfully installed. See README for manual steps needed in GUI."
else
sudo rsync -rt zbstudio/ $zs_dest
fi
echo "$end_msg"
echo
echo