Page 3 of 3

Re: Nano Space

Posted: Mon Jun 12, 2017 6:35 pm
by Nixola
Finally got it working! I had to rename the file and remove both the save folders (lovum and Lovum) and, again, change the loaded lib to /usr/lib/libcurl.so (which will always be the same architecture as LÖVE iirc, or at least in most cases; you can use /usr/lib32 and /usr/lib64 if you want to be sure and curl is a very common library/utility, so I think it's safe to bet it's already installed. Although location may vary (/usr/local/lib?).) but I finally got it working. The game looks neat and polished enough, although I'd probably "force" the dialogs from the captain to have a minimum duration (something short, such as half a second or less) since I skipped one by mistake as I was shooting with spacebar. I'd also recommend some proofreading by a native English speaker.

Re: Nano Space

Posted: Mon Jun 12, 2017 8:27 pm
by Luke100000
Nixola wrote: Mon Jun 12, 2017 6:35 pm Finally got it working! I had to rename the file and remove both the save folders (lovum and Lovum) and, again, change the loaded lib to /usr/lib/libcurl.so (which will always be the same architecture as LÖVE iirc, or at least in most cases; you can use /usr/lib32 and /usr/lib64 if you want to be sure and curl is a very common library/utility, so I think it's safe to bet it's already installed. Although location may vary (/usr/local/lib?).) but I finally got it working. The game looks neat and polished enough, although I'd probably "force" the dialogs from the captain to have a minimum duration (something short, such as half a second or less) since I skipped one by mistake as I was shooting with spacebar. I'd also recommend some proofreading by a native English speaker.
Thanks for detailed info, I will use pcall to test "usr/lib" AND "usr/local/lib" if the first one fails. (Am I correct that only "lib/" without the architecture (32bit 64bit) will work always, or must I check all folders?)
You can only skip the first page after 0.5 seconds by clicking 2 times. I will increase the skipping cool-down to 1 second. After this period of time the user could spam a key to skip all pages.
Also I keep my eyes open for an English proofreader :nyu:
Do you know if Mac OS works the same as Windows? "C = ffi.load(path .. 'bin/osx64/curl')" and it works?
Again, thank you for your time!

Re: Nano Space

Posted: Mon Jun 12, 2017 8:55 pm
by Nixola
No idea about Mac OS sadly, it's an OS I've never used. /usr/lib or /usr/local/lib (leading slash!) should work regardless, provided that 1) curl is installed on the system (my bet is it will be, it should be pretty common, if not considered a base package) and 2) LÖVE is the same architecture as the system (no idea if it's possible not to have this).

Re: Nano Space

Posted: Mon Jun 12, 2017 9:12 pm
by Luke100000
soo, update published, game launching fixed and hopefully the lib loading too, as long as this code here works:

Code: Select all

_, C = pcall(function() return ffi.load("/usr/lib/libcurl.so") end)
	if not C then
		_, C = pcall(function() return ffi.load("/usr/local/lib/libcurl.so") end)
		if not C then
			error("libcurl must be installed!")
		end
	end

Re: Nano Space

Posted: Mon Jun 12, 2017 9:24 pm
by Nixola
The new version seems to work out of the box for me!
(little tip: _, C = pcall(ffi.load, "/usr/lib/libcurl.so"))

Re: Nano Space

Posted: Mon Jun 12, 2017 9:27 pm
by Luke100000
Nixola wrote: Mon Jun 12, 2017 9:24 pm The new version seems to work out of the box for me!
(little tip: _, C = pcall(ffi.load, "/usr/lib/libcurl.so"))
oh, didn't know that :awesome: will do this next time. I'm glad we fixed it now.

Re: Nano Space

Posted: Tue Jun 13, 2017 12:12 am
by raidho36
Ugh. Just you look at that mess. I would not be surprised to know there is a whole host of systems where it still doesn't work. This is precisely why you are discouraged from using binary libraries. Besides, the packaged Lua already has all the necessary networking facilities do there was no need to use a binary library to begin with.

Re: Nano Space

Posted: Tue Jun 13, 2017 6:26 am
by Luke100000
raidho36 wrote: Tue Jun 13, 2017 12:12 am Ugh. Just you look at that mess. I would not be surprised to know there is a whole host of systems where it still doesn't work. This is precisely why you are discouraged from using binary libraries. Besides, the packaged Lua already has all the necessary networking facilities do there was no need to use a binary library to begin with.
So, how to download files over https?

I've blocked you for about two years and the first thing I heard from you was a complaint of our solution Nixola and I found. You didn't help.

Re: Nano Space

Posted: Tue Jun 13, 2017 6:48 am
by raidho36
I didn't paid attention to that detail, my bad. Still, SSL is only some encryption on top of HTTP, it can be accomplished in Lua. And you would probably have better luck using LuaSec instead. Also, you don't need secure connection to download some public files.

Re: Nano Space

Posted: Tue Jun 13, 2017 7:01 am
by Luke100000
raidho36 wrote: Tue Jun 13, 2017 6:48 am I didn't paid attention to that detail, my bad. Still, SSL is only some encryption on top of HTTP, it can be accomplished in Lua. And you would probably have better luck using LuaSec instead. Also, you don't need secure connection to download some public files.
Public files on a secure server allowing only https, that's the problem. I did a lot of research, found several differents ways to do what I want and I came to the conclusion that libcurl is the best one because it has all the features I need. Then, AFTER I implemented it, I had the troubles with Linux. It's too late for LuaSec now.