Distributing for linux... Runs the game slave.

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
gigimoi
Prole
Posts: 7
Joined: Wed Jul 25, 2012 9:27 pm

Distributing for linux... Runs the game slave.

Post 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?
User avatar
Inny
Party member
Posts: 652
Joined: Fri Jan 30, 2009 3:41 am
Location: New York

Re: Distributing for linux... Runs the game slave.

Post 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.
gigimoi
Prole
Posts: 7
Joined: Wed Jul 25, 2012 9:27 pm

Re: Distributing for linux... Runs the game slave.

Post 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.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Distributing for linux... Runs the game slave.

Post 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?
gigimoi
Prole
Posts: 7
Joined: Wed Jul 25, 2012 9:27 pm

Re: Distributing for linux... Runs the game slave.

Post 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.
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: Distributing for linux... Runs the game slave.

Post 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.
Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
jfroco
Prole
Posts: 24
Joined: Fri Jan 06, 2012 5:14 pm

Re: Distributing for linux... Runs the game slave.

Post 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
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: Distributing for linux... Runs the game slave.

Post 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.
Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 6 guests