require("pxlfs") AND linux Debian not work !
 

require("pxlfs") AND linux Debian not work !

Started by Hamachi, 04 December, 2010, 22:38:21

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hamachi

Hey i have som problems whit scripts whit require("pxlfs") on my linux server some there can help ?

Have install pack:
sudo apt-get install liblua5.1-0 liblua5.1-0-dev lua5.1 liblua5.1-filesystem0 liblua5.1-socket2 liblua5.1-sql-mysql-2 liblua5.1-sql-sqlite3-2 zlib1g-dev make g++

Thanks :)

mariner

Replace require("pxlfs") with require("lfs")
Eat my bolts, bastard... ? member of Devaster Squad

sudo ./configure_brain.sh

Hamachi

Thanks

Have try it before but it not work, but it work now :D

Are there a command so i can see the hub run on Linux or Win ?

PPK

/stats
QuoteVersion: PtokaX DC Hub 0.4.1.2c x64 built on Jul  9 2010 01:17:01
OS: Windows 7
QuoteVersion: PtokaX DC Hub 0.4.1.2c built on Oct 30 2010 23:06:42
OS: Linux 2.6.32.22 (x86_64)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Hamachi

hmm

where can i use that !

it is for somfing like this:

if os.px == linux then
   require("lfs") -- LINUX
else
   require("pxlfs") -- WIN
end

PPK

Lua API don't have call to check what on what OS PtokaX is running, simply because it is hard to do ::) Many systems returning crazy OS identification (for example wtf is SunOS 5.11 (i86pc) ?) :-X
You can use Core.GetPtokaXPath() to check if is running on Unix like system (path will start with /)  8)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

mariner

Use this code
path,selfname = debug.getinfo(1).source:match("^@?(.+[/\\]).-[/\\](.-)$")
path = path:gsub("\\","/")

if path:find("^/") then	-- OS detection
	require "lfs"	-- Linux
else
	require"pxlfs"	-- Windows
end
Eat my bolts, bastard... ? member of Devaster Squad

sudo ./configure_brain.sh

mariner

Hm, I copied this code from the working script.
Eat my bolts, bastard... ? member of Devaster Squad

sudo ./configure_brain.sh

SMF spam blocked by CleanTalk