Page 1 of 1
Distributing for linux... Runs the game slave.
Posted: Wed Jul 25, 2012 9:48 pm
by gigimoi
Build.sh
Code: Select all
#!/bin/bash
zip -r ${PWD##*/}.love *.png *.lua
Package.sh
Code: Select all
#!/bin/bash
cat /usr/bin/love ${PWD##*/}.love > ${PWD##*/} && chmod +x ${PWD##*/}
main.lua
Code: Select all
require "TLpath"
require "TLfrez"
function love.draw()
love.graphics.print("Hello World", 0, 0)
TLfres.transform()
TLfres.letterbox(4, 3)
end
function love.update()
TLpath.update()
end
function love.load()
TLfres.setScreen({w=640, h=480, full=false, vsync=true, aa=2}, 640)
-- image = love.graphics.newImage("cake.jpg")
local f = love.graphics.newFont(12)
love.graphics.setFont(f)
love.graphics.setColor(0,0,0,255)
love.graphics.setBackgroundColor(255,255,255)
end
--------------------------------------------------------------------------------------------------
After Building and packaging, I get the "TestLUAGame" linux binary, Upon launching
this binary, the game slave is launched instead of my game. How do I go about properly
turning the .love into a binary?
Re: Distributing for linux... Runs the game slave.
Posted: Thu Jul 26, 2012 3:51 am
by Inny
I'd advise against distributing games on linux that way. The biggest problem you'd encounter is that the version you built the game on (say Ubuntu 12.04) almost certainly wouldn't run on Fedora or Arch, or even Ubuntu 11.10. It'd be similar to how things made for Windows7 probably wouldn't run on WindowXP. You're better off just distributing via a .love file, and maybe with a clever shell script that checks that love is installed, is the correct version, and launches the game for you.
Re: Distributing for linux... Runs the game slave.
Posted: Thu Jul 26, 2012 4:57 am
by gigimoi
Inny wrote:I'd advise against distributing games on linux that way. The biggest problem you'd encounter is that the version you built the game on (say Ubuntu 12.04) almost certainly wouldn't run on Fedora or Arch, or even Ubuntu 11.10. It'd be similar to how things made for Windows7 probably wouldn't run on WindowXP. You're better off just distributing via a .love file, and maybe with a clever shell script that checks that love is installed, is the correct version, and launches the game for you.
It will be distributed with a script that installs Love 0.8, (If necessary, and after authentication) then builds + packages the entire application.
Re: Distributing for linux... Runs the game slave.
Posted: Thu Jul 26, 2012 6:33 am
by bartbes
There's been some known issues with folder having the same name as the executable, so you could try if that's your case, if not, are you sure your .love is packaged correctly?
Re: Distributing for linux... Runs the game slave.
Posted: Thu Jul 26, 2012 9:39 am
by gigimoi
bartbes wrote:There's been some known issues with folder having the same name as the executable
Upon renaming the binary to asdfghjkl, nothing has changed.
bartbes wrote:if not, are you sure your .love is packaged correctly?
The .love file runs correctly.
Re: Distributing for linux... Runs the game slave.
Posted: Wed Aug 01, 2012 4:00 pm
by josefnpat
Take a look at how I build the linux version for my
LD23 game, pocket strife.
From what I understood from the people who ran the LD23, I was the only love developer that had a standalone linux binary that worked.
Basically, I used
this scripton ubuntu 11.04 64 bit, and then used it again on 12.04 32 bit. This script went out and copied all the compiled .so files.
Then, when one clones the instance, they can run the
build_dep.sh script, which downloads all the stuff you need for love.
Then, finally, the
build.sh script makes:
- love file
- 32 bit linux binary with .so's (in a tgz)
- 64 bit linux binary with .so's (in a tgz)
- 32 bit windows binary with .dll's (in a zip)
- 32 bit windows binary with .dll's (in a zip)
- Universal app for OSX (in a zip)
I hope this helps.
Re: Distributing for linux... Runs the game slave.
Posted: Mon Sep 03, 2012 1:53 am
by jfroco
Hello josefnpat,
Great information. Thank you for sharing it with us.
I have one doubt: Where did you get love_i686.tar.gz and love_x86_64.tar.gz?
Thank you
Re: Distributing for linux... Runs the game slave.
Posted: Mon Sep 03, 2012 2:03 am
by josefnpat
jfroco wrote:Hello josefnpat,
Great information. Thank you for sharing it with us.
I have one doubt: Where did you get love_i686.tar.gz and love_x86_64.tar.gz?
Thank you
I had to build them from checking the binary dependencies using ldd.
I'm going to be working with someone very soon on getting a set of universal versions of the ldd core extensions soon, but at the moment, they only work with handful of linux systems.