PtokaX forum

PtokaX => Support => Topic started by: PPK on 27 September, 2006, 09:03:31

Poll
Question: What directories you want as default for Lua Libraries and Lua Script used by require function...
Option 1: In the PtokaX root folder (root/) votes: 1
Option 2: Both PtokaX root (root/) and scripts directory(root/scripts/) votes: 1
Option 3: In a separate directory (root/libs/) apart from the one for the scripts (root/scripts/) votes: 5
Option 4: Inside the scripts directory (root/scripts/libs/) votes: 10
Option 5: Another, or combination... please post your suggestion below. votes: 1
Title: Default directories for Lua Libraries and Lua scripts...
Post by: PPK on 27 September, 2006, 09:03:31
Lua 5.1.1 have nice config file to config default things in Lua. One of them is default directories for lua libraries and lua scripts where look for them require function. For now it is specified for lua libraries as PtokaX root, and for scripts it is scripts folder. Maybe will be better to improve it and for this is here this poll and this thread ::)

I will like something like libs directory for lua libraries and something like libs/scripts for scripts used by require, because they will cause problems when it will be in scripts folder (for example luasocket have very much scripts to initialize all part of library).
Title: Re: Default directories for Lua Libraries and Lua scripts...
Post by: bastya_elvtars on 27 September, 2006, 10:34:22
I use scripts/libs. But we can always specify package.path (for Lua modules) and package.cpath (for C libraries).
Title: Re: Default directories for Lua Libraries and Lua scripts...
Post by: TiMeTrAVelleR on 27 September, 2006, 16:15:40
Would add libs  folder in root ptokax best way to prefent probs where to put them as every scripter uses his own way

:)

Title: Re: Default directories for Lua Libraries and Lua scripts...
Post by: Herodes on 27 September, 2006, 17:30:51
Although this is a minor issue as bastya_elvtars mentioned,...
I voted for root/scripts/libs/ directory cause the libraries are concerning the scripts, not the host program.
Title: Re: Default directories for Lua Libraries and Lua scripts...
Post by: st0ne-db on 27 September, 2006, 20:12:57
I agree with Herodes and bastya. I too voted for Scripts\libs directory. After all, is the scripts that are using the libs directly. not the hubsoft.
Title: Re: Default directories for Lua Libraries and Lua scripts...
Post by: HappyTheMan on 29 September, 2006, 03:03:06
Quote from: Herodes on 27 September, 2006, 17:30:51
I voted for root/scripts/libs/ directory cause the libraries are concerning the scripts, not the host program.
unbeatable argument i think
Title: Re: Default directories for Lua Libraries and Lua scripts...
Post by: PPK on 01 November, 2006, 04:24:37
Ok, next PtokaX version have defined paths root, root\libs and root\scripts\libs ::)