[ZeroBrane Studio] Re: Need help in regards to installing IUP in Zerobrane.

  • From: Paul K <paul@xxxxxxxxxxxxx>
  • To: zerobrane@xxxxxxxxxxxxx, elijaheumags@xxxxxxxxx
  • Date: Sat, 27 Mar 2021 10:21:49 -0700

Hi Elijah,

(I'm copying your address directly on my response, as you don't seem
to be subscribed to the mailing list from that address, as I had to
approve your post to appear)

Which file of IUP do I have to install for ZeroBrane? (I am using a 32 bit 
Windows 7 with ZeroBrane downloaded)
How do I install IUP in ZeroBrane? (Like, I need the steps, or the location. 
Something clear enough that I can follow)

In general, the application you debug from the IDE needs to be
configured exactly the same way, as you'd configure it to run from the
command line. In the IUP case it's a little bit more complicated, but
not too much. Here are my instructions.

1. Create iup/ folder somewhere on your computer.
2. Download IUP library itself and unzip to that folder (I got a
32-bit version from
https://sourceforge.net/projects/iup/files/3.30/Windows%20Libraries/Dynamic/iup-3.30_Win32_dllw6_lib.zip/download,
but you can pick whatever version works for you).
3. Download IUP library for the specific version of Lua you are using;
make sure it's a 32-bit version and has the same compiler as the IUP
library itself. I got mine from
https://sourceforge.net/projects/iup/files/3.30/Windows%20Libraries/Dynamic/Lua53/iup-3.30-Lua53_Win32_dllw6_lib.zip/download
for Lua 5.3. Unzip it into iup/lua53/ folder (unzipping the first
archive should have already created the folder for you).
4. Create the following file in the iup/ folder and save it as iup-test.lua:

package.cpath = package.cpath..";.\\Lua53\\?53.dll"
require"iuplua"
iup.Alarm("Example", "Save?", "yes", "no", "cancel")

5. Open ZeroBrane Studio and set the iup/ older as the project folder.
6. Open iup-test.lua
7. Select Lua 5.3 as the interpreter in the IDE (Project > Lua
Interpreter > Lua 5.3). You need to select the version that matches
the Lua version of the IUP libraries you've downloaded.
8. Run iup-test.lua (Project/Run | F6) and you should see the example
prompt to save.

Make sure that the Lua version of the IUP library you downloaded in
step 3, the reference on the first line of the script and the
interpreter selected in step 7 are all the same.

You may want to make sure you're using the latest version from the
master branch of ZeroBrane Studio, as there was a fix applied that
fixed an issue with newer versions of IUP
(https://github.com/pkulchenko/ZeroBraneStudio/issues/1092).

Let me know if something still doesn't work and we'll figure out how to fix it.

Paul.

On Sat, Mar 27, 2021 at 9:22 AM elijah eumags <elijaheumags@xxxxxxxxx> wrote:

Heya Paul, or to whoever is reading this, I may need some help  in regards to 
an installation problem with IUP on Zerobrane. One person from reddit told me 
to reach out to you for this, so this is why I'm sending this to you.

So, I have looked everywhere in regards to finding out which file I should 
download for IUP and how I install it in ZeroBrane. I even looked at how to 
install Lua packages in ZeroBrane, to no avail.

I am really lost at the moment, and I really want to use IUP on Zerobrane due 
to its speed and ease of development. But I can't do that if the methods for 
installation are so vague.

Let me be specific:

Which file of IUP do I have to install for ZeroBrane? (I am using a 32 bit 
Windows 7 with ZeroBrane downloaded)
How do I install IUP in ZeroBrane? (Like, I need the steps, or the location. 
Something clear enough that I can follow)

For reference, I'm using the latest version of ZeroBrane, freshly downloaded 
from the website, and I'm planning to use LuaJIT for a GUI program I'm making.

I really do appreciate any replies and/or answers to this.

Thanks in advance!

Other related posts: