0

I've been working on updating an old app that uses Lua 5.1 and IUP 2.5.1, and I want to update the versions of Lua and IUP it uses, but I'm a novice at this stuff, so I don't know how. I tried Googling for answers, but I had trouble understanding it.

How do you know which binaries to download? I'm using Windows 10 64x, but I'd like other people to be able to use the app, even if they don't have Lua/IUP. Where do you put the binaries? Is there a way I can edit the existing code to connect the library to the app?

If it helps, the files can be found here: https://sourceforge.net/projects/citybinder-for-homecoming/files/CityBinder_For_Homecoming_v0.1/ The main folder includes the files citybinder.c and Makefile, which set up requirements. Citybinder.c mentions a lot of .h files, but there are none in the folder. There's also an interpreter: iuplua5.exe.

Tailcoat
  • 13
  • 5

1 Answers1

0

How do you know which binaries to download?

I suggest you to download the iup-3.30-Lua54_Win64_bin.zip package. That will include everything you need, but much more than that. Things can be removed if they are not being used if you need to reduce the distributed package size.

Where do you put the binaries?

You can unpack to any folder you like. You can use an installer, for instance Inno Setup, to build a setup for your files.

Is there a way I can edit the existing code to connect the library to the app?

The iuplua54.exe and the wlua54.exe accept a Lua file in the command line, so you can skip the default iuplua54.exe interface.

You can take a look at the IUP documentation in Guide / Lua Binding section to learn how to inicialize Lua and IUP libraries from C.

Antonio Scuri
  • 1,046
  • 6
  • 10
  • Do I need Inno Setup? I don't know what that is or what a "setup for your files" entails. – Tailcoat Sep 11 '21 at 21:39
  • When you download an application, usually is a .exe that you run and install that application on your system. Inno Setup is a tool to build that .exe. This process is actually a sequence of operations like copy files to a selected folder. So instead of providing a .zip file with your executable, you build an installation. – Antonio Scuri Sep 12 '21 at 22:05
  • I put the files into a folder in my app's folder, but I don't know what to do with them. The original app had a Makefile, console.loh (no idea what this), citybinder.c, and iuplua5.exe all in the same main folder as citybinder.exe, but I don't know anything about Makefiles, initializing libraries with C files, or what iuplua5.exe is doing there. Do I change the Makefile? Do I generate a new Makefile (if so, how?)? Citybinder.c doesn't seem to point at any specific version of Lua/IUP so do I leave it or do I need to generate a new one (if so, how?)? Will edit post with some code. – Tailcoat Sep 13 '21 at 19:26
  • Tried to edit post to add code, but it won't let me? I tried changing Makefile, replacing "5.1" with "5.4", "51" with "54" and adding subfolder to directory, but it did nothing. App still says it's using old IUP. (I used `iup._VERSION` to check). Makefile starts with: `### Variables used in this Makefile gcc_CC=mingw32-gcc.exe gcc_CPP=mingw32-g++.exe gcc_LD=mingw32-g++.exe gcc_LIB=ar.exe gcc_RESCOMP=windres.exe` Do I need mingw32 to do this? I'm not familiar with that. – Tailcoat Sep 13 '21 at 19:37
  • I still don't know what to do with these files. I went to the "Lua Binding" page but I don't understand any of it. Opening iuplua54.exe and running citybinder.lua opens the main window, but throws errors about globals returning nil values. If I use Notepad++ to open citybinder.lua in iuplua54, I get a different error like iuplua54 doesn't see that dofile is calling files in the same directory. I just unzipped the binary files into a folder-- was I supposed to do anything else to them? I saw some stuff about "compiling" but it sounded like the binaries didn't need that. – Tailcoat Sep 16 '21 at 02:57