Quantcast

[ANN] MSI Installer for PUC-Lua Proof Of Concept

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
32 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Windows MSI Installer for PUC-Lua - Proof Of Concept

KHMan
On 5/18/2017 12:30 AM, Russell Haley wrote:
> I also wonder out loud if this in all academic now with Linux
> Subsystem for Windows?

Everybody who wants a Linux-like environment is already on Cygwin.

Even if Microsoft is completely honest this time, big corporations
have a tendency to lose interest and then you're out of luck. Or a
VP may want to show off his/her management skills and
'rationalize' things, 'sunset' some projects.

We'll be stuck with compiling for legacy 32-bit Win32 for a long
long long... a super long time. Even after so many years of 64 bit
Windows, plenty of stuff have not moved to 64 bits executables.

> On Wed, May 17, 2017 at 9:25 AM, Scott Morgan wrote:
>> On 05/17/2017 05:06 PM, KHMan wrote:
>>> Often on MSYS or MSYS2 compiled executables would run, and then on
>>> Command Prompt it will fail to start. My usual rule is that when the
>>> executable is to run outside of the MSYS or MSYS2 environment, copy it
>>> out and test it on Command Prompt to make sure it has all the DLLs it
>>> needs.
>>
>> Dependency Walker is handy for seeing what DLLs are required for an EXE.
>> http://www.dependencywalker.com/
>>
>> A bit like the ldd command in Linux.
>>
>> Scott
>>

--
Cheers,
Kein-Hong Man (esq.)
Selangor, Malaysia


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Windows MSI Installer for PUC-Lua - Proof Of Concept

Coda Highland
On Wed, May 17, 2017 at 10:50 AM, KHMan <[hidden email]> wrote:

> On 5/18/2017 12:30 AM, Russell Haley wrote:
>>
>> I also wonder out loud if this in all academic now with Linux
>> Subsystem for Windows?
>
>
> Everybody who wants a Linux-like environment is already on Cygwin.
>
> Even if Microsoft is completely honest this time, big corporations have a
> tendency to lose interest and then you're out of luck. Or a VP may want to
> show off his/her management skills and 'rationalize' things, 'sunset' some
> projects.
>
> We'll be stuck with compiling for legacy 32-bit Win32 for a long long
> long... a super long time. Even after so many years of 64 bit Windows,
> plenty of stuff have not moved to 64 bits executables.

Cygwin is STUPIDLY slow. LSW is a significant win over Cygwin.

/s/ Adam

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Windows MSI Installer for PUC-Lua - Proof Of Concept

Jonathan Goble
In reply to this post by Russell Haley
On Wed, May 17, 2017 at 12:09 PM Russell Haley <[hidden email]> wrote:
On Wed, May 17, 2017 at 5:37 AM, Dirk Laurie <[hidden email]> wrote:
> Well, I don't have Windows 10, but a quick look at Google turns up
> "One quick fix is to copy the dll into the same directory as your program."
> That's the one I would try first (quick fixes always grab me).
>
> 2017-05-17 9:12 GMT+02:00 Russell Haley <[hidden email]>:
>> So I'm starting to see the complications now. The 64 bit binary "just
>> works" on Window 10, but the 32 bit seems to still require mingw
>> (Error message "The program can't start because libgcc_s_dw2-1.dll is
>> missing from your computer").
>>
>
Thanks, I'll look into that, but my gut feeling is the dll doesn't
help for running other libraries (I don't know much about mingw yet).
Chaining the mingw installer shouldn't be too difficult. My hesitation
is two fold:

1) Most "installers" from the *nix world I have found so far do not
use the MSI format (It looks like lr4win is the exception). I will be
testing this tonight potentially
2) That introducing mingw means that the "native" development IDE for
Windows still can't be used (I suppose Eclipse with CDT is an option).

VS Studio is a constant on many developer computers. It makes sense to
me that if Windows developers are a potential target audience, giving
them access to the sources through the "native" toolset would be a
good idea now that it's possible.

Russ

Have you tried the VS compilation script provided by PUC-Lua? It's not in the main tarball, but can be downloaded from the 5.2 extras page. [1] I think it would probably would work fine for 5.3 with a few modifications (namely changing "lua52" to "lua53", and adding lbitlib.obj and lutf8lib.obj to lines 22 and 23).

[1] https://www.lua.org/extras/5.2/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Windows MSI Installer for PUC-Lua - Proof Of Concept

Russell Haley
On Wed, May 17, 2017 at 1:24 PM, Jonathan Goble <[hidden email]> wrote:

> On Wed, May 17, 2017 at 12:09 PM Russell Haley <[hidden email]> wrote:
>>
>> On Wed, May 17, 2017 at 5:37 AM, Dirk Laurie <[hidden email]>
>> wrote:
>> > Well, I don't have Windows 10, but a quick look at Google turns up
>> > "One quick fix is to copy the dll into the same directory as your
>> > program."
>> > That's the one I would try first (quick fixes always grab me).
>> >
>> > 2017-05-17 9:12 GMT+02:00 Russell Haley <[hidden email]>:
>> >> So I'm starting to see the complications now. The 64 bit binary "just
>> >> works" on Window 10, but the 32 bit seems to still require mingw
>> >> (Error message "The program can't start because libgcc_s_dw2-1.dll is
>> >> missing from your computer").
>> >>
>> >
>> Thanks, I'll look into that, but my gut feeling is the dll doesn't
>> help for running other libraries (I don't know much about mingw yet).
>> Chaining the mingw installer shouldn't be too difficult. My hesitation
>> is two fold:
>>
>> 1) Most "installers" from the *nix world I have found so far do not
>> use the MSI format (It looks like lr4win is the exception). I will be
>> testing this tonight potentially
>> 2) That introducing mingw means that the "native" development IDE for
>> Windows still can't be used (I suppose Eclipse with CDT is an option).
>>
>> VS Studio is a constant on many developer computers. It makes sense to
>> me that if Windows developers are a potential target audience, giving
>> them access to the sources through the "native" toolset would be a
>> good idea now that it's possible.
>>
>> Russ
>
>
> Have you tried the VS compilation script provided by PUC-Lua? It's not in
> the main tarball, but can be downloaded from the 5.2 extras page. [1] I
> think it would probably would work fine for 5.3 with a few modifications
> (namely changing "lua52" to "lua53", and adding lbitlib.obj and lutf8lib.obj
> to lines 22 and 23).
>
> [1] https://www.lua.org/extras/5.2/

I was not even aware of it's existence! Thank you.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Windows MSI Installer for PUC-Lua - Proof Of Concept

Russell Haley
In reply to this post by Russell Haley
Wow. Visual Studio 2017 Community Edition is a BEAST! 49.6GB for the
full installation, but I can develop ANYTHING! (said with irony on the
Lua mailing list). It's funny because this used to make sense to me
too. Lua really has changed my perspective on development.

Russ

On Wed, May 17, 2017 at 9:09 AM, Russell Haley <[hidden email]> wrote:

> On Wed, May 17, 2017 at 5:37 AM, Dirk Laurie <[hidden email]> wrote:
>> Well, I don't have Windows 10, but a quick look at Google turns up
>> "One quick fix is to copy the dll into the same directory as your program."
>> That's the one I would try first (quick fixes always grab me).
>>
>> 2017-05-17 9:12 GMT+02:00 Russell Haley <[hidden email]>:
>>> So I'm starting to see the complications now. The 64 bit binary "just
>>> works" on Window 10, but the 32 bit seems to still require mingw
>>> (Error message "The program can't start because libgcc_s_dw2-1.dll is
>>> missing from your computer").
>>>
>>
> Thanks, I'll look into that, but my gut feeling is the dll doesn't
> help for running other libraries (I don't know much about mingw yet).
> Chaining the mingw installer shouldn't be too difficult. My hesitation
> is two fold:
>
> 1) Most "installers" from the *nix world I have found so far do not
> use the MSI format (It looks like lr4win is the exception). I will be
> testing this tonight potentially
> 2) That introducing mingw means that the "native" development IDE for
> Windows still can't be used (I suppose Eclipse with CDT is an option).
>
> VS Studio is a constant on many developer computers. It makes sense to
> me that if Windows developers are a potential target audience, giving
> them access to the sources through the "native" toolset would be a
> good idea now that it's possible.
>
> Russ

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Windows MSI Installer for PUC-Lua - Proof Of Concept

kamicc olo
HOW MUCH?! o_0 and it's still 32bit only?

On May 18, 2017 8:00 AM, "Russell Haley" <[hidden email]> wrote:
Wow. Visual Studio 2017 Community Edition is a BEAST! 49.6GB for the
full installation, but I can develop ANYTHING! (said with irony on the
Lua mailing list). It's funny because this used to make sense to me
too. Lua really has changed my perspective on development.

Russ

On Wed, May 17, 2017 at 9:09 AM, Russell Haley <[hidden email]> wrote:
> On Wed, May 17, 2017 at 5:37 AM, Dirk Laurie <[hidden email]> wrote:
>> Well, I don't have Windows 10, but a quick look at Google turns up
>> "One quick fix is to copy the dll into the same directory as your program."
>> That's the one I would try first (quick fixes always grab me).
>>
>> 2017-05-17 9:12 GMT+02:00 Russell Haley <[hidden email]>:
>>> So I'm starting to see the complications now. The 64 bit binary "just
>>> works" on Window 10, but the 32 bit seems to still require mingw
>>> (Error message "The program can't start because libgcc_s_dw2-1.dll is
>>> missing from your computer").
>>>
>>
> Thanks, I'll look into that, but my gut feeling is the dll doesn't
> help for running other libraries (I don't know much about mingw yet).
> Chaining the mingw installer shouldn't be too difficult. My hesitation
> is two fold:
>
> 1) Most "installers" from the *nix world I have found so far do not
> use the MSI format (It looks like lr4win is the exception). I will be
> testing this tonight potentially
> 2) That introducing mingw means that the "native" development IDE for
> Windows still can't be used (I suppose Eclipse with CDT is an option).
>
> VS Studio is a constant on many developer computers. It makes sense to
> me that if Windows developers are a potential target audience, giving
> them access to the sources through the "native" toolset would be a
> good idea now that it's possible.
>
> Russ

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Windows MSI Installer for PUC-Lua - Proof Of Concept

Coda Highland
On Thu, May 18, 2017 at 12:24 PM, Ką Mykolas <[hidden email]> wrote:
> HOW MUCH?! o_0 and it's still 32bit only?

No, it's not 32-bit-only. It supports both 32-bit and 64-bit just fine
(and possibly other targets as well).

It's just that some projects (not from Microsoft) still only build in
32-bit because they haven't been updated for the 64-bit Windows APIs
yet or have other specific limitations that haven't been fixed yet.

/s/ Adam

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Windows MSI Installer for PUC-Lua - Proof Of Concept

Russell Haley
On Thu, May 18, 2017 at 12:39 PM, Coda Highland <[hidden email]> wrote:

> On Thu, May 18, 2017 at 12:24 PM, Ką Mykolas <[hidden email]> wrote:
>> HOW MUCH?! o_0 and it's still 32bit only?
>
> No, it's not 32-bit-only. It supports both 32-bit and 64-bit just fine
> (and possibly other targets as well).
>
> It's just that some projects (not from Microsoft) still only build in
> 32-bit because they haven't been updated for the 64-bit Windows APIs
> yet or have other specific limitations that haven't been fixed yet.
>
> /s/ Adam

The full install actually failed an hour after I started the download.
I had to pair it back to the basics. I removed the Unity gaming
framework, Xamarian mobel development and all their azure stuff and
that brought it down to a "modest" 13 GB. I couldn't tell if it was
the Unity or the Xamarian stuff that was making the VS install fail.

The good news is it only takes 13Gb of disk space and I now have an
environment to build Lua! (yes, more sarcasm. I can't help myself
today). I used the "create project from existing code" wizard and I
was able to build Lua (single exe). I would like to separate out the
interpreter, compiler and library into two exe's and a dll. I'll have
to reverse engineer a Makefile to find out how the files are split
unless someone can point me to an easier resource? Makefile scripts
are not one of my strong points. Hence the need for 13 GB of tools! :D

Russ

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Windows MSI Installer for PUC-Lua - Proof Of Concept

Jonathan Goble
On May 18, 2017 7:12 PM, "Russell Haley" <[hidden email]> wrote:
On Thu, May 18, 2017 at 12:39 PM, Coda Highland <[hidden email]> wrote:
> On Thu, May 18, 2017 at 12:24 PM, Ką Mykolas <[hidden email]> wrote:
>> HOW MUCH?! o_0 and it's still 32bit only?
>
> No, it's not 32-bit-only. It supports both 32-bit and 64-bit just fine
> (and possibly other targets as well).
>
> It's just that some projects (not from Microsoft) still only build in
> 32-bit because they haven't been updated for the 64-bit Windows APIs
> yet or have other specific limitations that haven't been fixed yet.
>
> /s/ Adam

The full install actually failed an hour after I started the download.
I had to pair it back to the basics. I removed the Unity gaming
framework, Xamarian mobel development and all their azure stuff and
that brought it down to a "modest" 13 GB. I couldn't tell if it was
the Unity or the Xamarian stuff that was making the VS install fail.

The good news is it only takes 13Gb of disk space and I now have an
environment to build Lua! (yes, more sarcasm. I can't help myself
today). I used the "create project from existing code" wizard and I
was able to build Lua (single exe). I would like to separate out the
interpreter, compiler and library into two exe's and a dll. I'll have
to reverse engineer a Makefile to find out how the files are split
unless someone can point me to an easier resource? Makefile scripts
are not one of my strong points. Hence the need for 13 GB of tools! :D

Russ

Divide the *.c files into the following groups:
1. lua.c
2. luac.c
3. l*lib.c
4. everything else

Then build:
lua.dll: 3+4
lua.exe: 1, linked to lua.dll
luac.exe: 2+4 (don't link to the DLL since it requires internal symbols)

Note that I'm typing this on my phone from memory, so I might have a detail or two wrong. 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Windows MSI Installer for PUC-Lua - Proof Of Concept

Russell Haley
Okay, I had some progress. I think. I've run out of time but I have
created two VS projects. One for  a dll and one for the lua.exe. The
DLL compiles but I am getting complaints from the exe project:

Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol lua_close referenced in
function main PUC-Lua N:\Code\lua-5.3.4\Visual Studio\PUC-Lua\lua.obj
1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol lua_gettop referenced in
function docall PUC-Lua N:\Code\lua-5.3.4\Visual
Studio\PUC-Lua\lua.obj 1

and so forth. I don't have time to do a proper clean up so I stuffed a
zip file with everything here:

https://github.com/RussellHaley/PUC-Lua-Installer/blob/master/lua-5.3.4.zip

Someone might be able to compile it in VS 2015 if you change the target SDK?

Either way, thanks for all the great help!

Oh, and Mr. Laurie is right. This would have all worked if I just
added the libgcc_s_dw2-1.dll file to the installer with joedfs builds.
lolz. Thankfully I've saved that code...

zzzz...
Russ


On Thu, May 18, 2017 at 4:55 PM, Jonathan Goble <[hidden email]> wrote:

> On May 18, 2017 7:12 PM, "Russell Haley" <[hidden email]> wrote:
>
> On Thu, May 18, 2017 at 12:39 PM, Coda Highland <[hidden email]> wrote:
>> On Thu, May 18, 2017 at 12:24 PM, Ką Mykolas <[hidden email]> wrote:
>>> HOW MUCH?! o_0 and it's still 32bit only?
>>
>> No, it's not 32-bit-only. It supports both 32-bit and 64-bit just fine
>> (and possibly other targets as well).
>>
>> It's just that some projects (not from Microsoft) still only build in
>> 32-bit because they haven't been updated for the 64-bit Windows APIs
>> yet or have other specific limitations that haven't been fixed yet.
>>
>> /s/ Adam
>
> The full install actually failed an hour after I started the download.
> I had to pair it back to the basics. I removed the Unity gaming
> framework, Xamarian mobel development and all their azure stuff and
> that brought it down to a "modest" 13 GB. I couldn't tell if it was
> the Unity or the Xamarian stuff that was making the VS install fail.
>
> The good news is it only takes 13Gb of disk space and I now have an
> environment to build Lua! (yes, more sarcasm. I can't help myself
> today). I used the "create project from existing code" wizard and I
> was able to build Lua (single exe). I would like to separate out the
> interpreter, compiler and library into two exe's and a dll. I'll have
> to reverse engineer a Makefile to find out how the files are split
> unless someone can point me to an easier resource? Makefile scripts
> are not one of my strong points. Hence the need for 13 GB of tools! :D
>
> Russ
>
>
> Divide the *.c files into the following groups:
> 1. lua.c
> 2. luac.c
> 3. l*lib.c
> 4. everything else
>
> Then build:
> lua.dll: 3+4
> lua.exe: 1, linked to lua.dll
> luac.exe: 2+4 (don't link to the DLL since it requires internal symbols)
>
> Note that I'm typing this on my phone from memory, so I might have a detail
> or two wrong.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Windows MSI Installer for PUC-Lua - Proof Of Concept

Jonathan Goble
On Fri, May 19, 2017 at 3:12 AM Russell Haley <[hidden email]> wrote:
Okay, I had some progress. I think. I've run out of time but I have
created two VS projects. One for  a dll and one for the lua.exe. The
DLL compiles but I am getting complaints from the exe project:

Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol lua_close referenced in
function main PUC-Lua N:\Code\lua-5.3.4\Visual Studio\PUC-Lua\lua.obj
1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol lua_gettop referenced in
function docall PUC-Lua N:\Code\lua-5.3.4\Visual
Studio\PUC-Lua\lua.obj 1

and so forth. I don't have time to do a proper clean up so I stuffed a
zip file with everything here:

https://github.com/RussellHaley/PUC-Lua-Installer/blob/master/lua-5.3.4.zip

Someone might be able to compile it in VS 2015 if you change the target SDK?

Either way, thanks for all the great help!

Oh, and Mr. Laurie is right. This would have all worked if I just
added the libgcc_s_dw2-1.dll file to the installer with joedfs builds.
lolz. Thankfully I've saved that code...

zzzz...
Russ

Shot in the dark before I go to bed: your lua.exe project file only lists lua.h and lua.hpp as headers. You may need to manually add the other standard headers (luaconf.h, lualib.h, and lauxlib.h) to the project to get VS to recognize them.

(Also, lua.hpp is only needed if you're compiling as C++ rather than C, so you can delete it from the project.)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Windows MSI Installer for PUC-Lua - Proof Of Concept

Russell Haley
On Fri, May 19, 2017 at 12:39 AM, Jonathan Goble <[hidden email]> wrote:

> On Fri, May 19, 2017 at 3:12 AM Russell Haley <[hidden email]> wrote:
>>
>> Okay, I had some progress. I think. I've run out of time but I have
>> created two VS projects. One for  a dll and one for the lua.exe. The
>> DLL compiles but I am getting complaints from the exe project:
>>
>> Severity Code Description Project File Line Suppression State
>> Error LNK2019 unresolved external symbol lua_close referenced in
>> function main PUC-Lua N:\Code\lua-5.3.4\Visual Studio\PUC-Lua\lua.obj
>> 1
>> Severity Code Description Project File Line Suppression State
>> Error LNK2019 unresolved external symbol lua_gettop referenced in
>> function docall PUC-Lua N:\Code\lua-5.3.4\Visual
>> Studio\PUC-Lua\lua.obj 1
>>
>> and so forth. I don't have time to do a proper clean up so I stuffed a
>> zip file with everything here:
>>
>>
>> https://github.com/RussellHaley/PUC-Lua-Installer/blob/master/lua-5.3.4.zip
>>
>> Someone might be able to compile it in VS 2015 if you change the target
>> SDK?
>>
>> Either way, thanks for all the great help!
>>
>> Oh, and Mr. Laurie is right. This would have all worked if I just
>> added the libgcc_s_dw2-1.dll file to the installer with joedfs builds.
>> lolz. Thankfully I've saved that code...
>>
>> zzzz...
>> Russ
>
>
> Shot in the dark before I go to bed: your lua.exe project file only lists
> lua.h and lua.hpp as headers. You may need to manually add the other
> standard headers (luaconf.h, lualib.h, and lauxlib.h) to the project to get
> VS to recognize them.

(facepalm)

> (Also, lua.hpp is only needed if you're compiling as C++ rather than C, so
> you can delete it from the project.)

In my first attempt I did not have lua.hpp in the exe project. The
linker complained that there was no lua.lib file available as output
from the library project. "Mr. Google" said that the absence of a
*.lib output was due to the dll not exporting any interfaces. The
Microsoft literature indicated I either need to annotate the c files
or create a *.dep file.

My working assumption is this should all just work without modifying
the original source code so a little more digging turned up someone
using the "extern C" keyword (for something that looked kinda
related???), which I remembered seeing in the hpp. When I dropped
lua.hpp in the exe project, that's when I got to the errors in the
previous email. So, did I fix something and move forward or break
something else and move backwards? I'll know better tonight.


Russ

12
Loading...