lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


What we need is a complete build environment for windows that works out of the box. Thats not trivial. Some people want to use gcc, some others different MS-compilers (VC2008, VC2010, MSSDK). I was thinking about using lake but i failed because i did not figured out the philosophy behind lake and not how to start reading the documentation. I miss a "lake for idiots" document ;)

Creating such a build environment should be a teamwork and this build environment should solve a minimum set of tasks:
- define a directory structure all sources can be stored in.
  lua51, lua52, luajit, module sources
  optional wxlua, srlua, other exe-builder,
- it should devie a widly accepted directory structure for the
  resulting program and module files, so all the different can coexist
  in this directory tree.
- it should be able to compile static and dynamic lua librarys
- it should be able to compile sprecial versions of those librarys with
  precompiled c-modules compiled in. (usefull for self containig
  programs.
- works with gcc and different versions of ms compilers.
- optional: build 64bit Versions of all programs and modules (not
  trivial)

I did this already particular for my own needs, but there are many
  things to keep in mind:
- you need to modify package.path and package.cpath different than the
  original.
- you need to modify the module sources (build amalgams for instance)
- you need to copy the module documentation into the install tree.
- and much much more ...

To reach this goal there need to be some support from lua- and luajit-guys too.

I assume, without those capabilities this build environment would mot become widely accepted.

A simple batch file to compile lua is possible as i have shown but it is limited. As soon you start really using lua for own projects, you need to know your compiler and you need to learn. I tried many compilers by myself (PellesC, tcc, gcc, msvc). Only two solved my tests, gcc and msvc.

I would like to see a team to crate such a build environment for window. May be a good starting point is luabuild by Steve Donovan.

Ulrich.

Am 11.01.2014 08:59, schrieb Thijs Schreijer:
-----Original Message-----
From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On
Behalf Of Luiz Henrique de Figueiredo
Sent: vrijdag 10 januari 2014 19:19
To: Lua mailing list
Subject: Re: Where is 'luavs.bat' in 5.2

We'd rather have the simplest luavs.bat possible.

Why? As a windows user I would rather have something that simply works, and if that takes a more complex batch file, so be it. I suspect that your main reason is a lack of Windows knowledge (no pun intended), but in that case please consider making a point that it is community contributed and hence community supported. Though I understand that it might violate your basic 'closed development' principles.

Here is what is at
http://www.lua.org/extras/5.2/luavs.bat. What is the simplest .bat that
does the same thing but wihout variables and ideally without the manifest
stuff, if at all possible? In particular, what compilation options are
really needed? Thanks for your Windows expertise.

Unfortunately I 'm unable to help with that as my compiler knowledge is very limited. I'm trying to fix problems as I encounter them (just learning by doing here).

That said, I would very much appreciate it if the windows stuff would work out of the box, based on its defaults, as it does on the other platforms. That would take (imo);

For MinGW target;
  1 by default include the `lua52.dll` file in `TO_BIN`. Currently one
    MUST provide TO_BIN="lua.exe luac.exe lua52.dll" for `make install` otherwise
    it simply won't work (without the dll), so defaults are broken here...

For Visual Studio / Windows SDK targets;
  2 by default include /DLUA_COMPAT_ALL. For some reason it is the default on all
    platforms, except on Windows VS/WinSDK.
  3 include an equivalent for `make install` that builds the proper structure
    from the build results.

1: I have no 'make' skills so cannot propose any changes
2: attached another 'luavs.bat' that includes the flag and has a comment on being
    The equivalent for 'make mingw' while using VS/WinSDK. I removed the 'option'
    and just included the flag as per your request for 'simple'.
3: attached a new batch file 'luavsinstall.bat' which is the equivalent of
    'make install' for doing the installation of the proper file structure. I also
    kept that one as simple as possible. I hope you can include it.

Thijs