Love2d Compiler(Distributor) [windows]

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
joedf
Prole
Posts: 3
Joined: Fri Mar 09, 2012 7:39 pm

Re: Love2d Compiler(Distributor) [windows]

Post by joedf »

I made my own in C. :awesome:

The compiler is "Lovec.exe"
You can always replace the "love.exe" with the newest version.

it is a command-line interface (CLI)

Download

-joedf
User avatar
potomak
Prole
Posts: 1
Joined: Mon Jun 17, 2013 8:46 pm
Location: Treviso, Italy
Contact:

Re: Love2d Compiler(Distributor) [windows]

Post by potomak »

I added a couple of lines to @vrld's Makefile to update Info.plist according to http://love2d.org/wiki/Game_Distributio ... acOS_X_App.

The new Makefile runs without errors on GNU/Linux:

Code: Select all

love=/usr/bin/love
zip=/usr/bin/zip
luac=/usr/bin/luac

builddir=build
distdir=dist

windir=~/Downloads/love-0.8.0-win-x86
osxapp=~/Downloads/love.app

company=potomak
game=chasing_fastweb
sources=*.lua **/*.lua
res=assets/*.png assets/*.gif assets/*.ttf

.PHONY : run test love clean win

run : test
	$(love) .

test :
	$(luac) -p $(sources)

dist : love win osx

love : $(builddir)/$(game).love
	cp $(builddir)/$(game).love $(distdir)/$(game).love

osx : $(builddir)/$(game).app
	cd $(builddir); \
		zip -9 -q -r ../$(distdir)/$(game).osx.zip $(game).app

win : $(builddir)/$(game).exe
	cd $(builddir); \
		cp $(windir)/*.dll .; \
		zip -q ../$(distdir)/$(game).win.zip $(game).exe *.dll; \
		rm *.dll

$(builddir)/$(game).app : $(builddir)/$(game).love
	cp -a $(osxapp) $(builddir)/$(game).app
	cp $(builddir)/$(game).love $(builddir)/$(game).app/Contents/Resources/
	sed -i.bak 's/<string>LÖVE<\/string>/<string>$(game)<\/string>/g' "$(builddir)/$(game).app/Contents/Info.plist"
	sed -i.bak 's/<string>org\.love2d\.love<\/string>/<string>org\.$(company)\.$(game)<\/string>/g' "$(builddir)/$(game).app/Contents/Info.plist"
	sed -i.bak '/<key>UTExportedTypeDeclarations<\/key>/,/^\t<\/array>/{d}' "$(builddir)/$(game).app/Contents/Info.plist"

$(builddir)/$(game).exe : $(builddir)/$(game).love
	cat $(windir)/love.exe $(builddir)/$(game).love > $(builddir)/$(game).exe

$(builddir)/$(game).love : $(sources) $(res)
	mkdir -p $(builddir)
	mkdir -p $(distdir)
	$(zip) $(builddir)/$(game).love $(sources) $(res)

clean :
	rm -rf $(builddir)/* $(distdir)/*
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Love2d Compiler(Distributor) [windows]

Post by raidho36 »

I simply use these four batches, it's really simple and it does what I want.

Code: Select all

"C:\Program Files (x86)\LOVE\love.exe" "%CD%"

Code: Select all

"C:\Program Files\7-Zip\7z.exe" a -tzip -r -y -mx0 datafile.love *.lua *.png *.wav *.ogg

Code: Select all

if not exist datafile.love call _pack.bat
copy /b "C:\Program Files (x86)\LOVE\love.exe"+datafile.love game.exe

Code: Select all

if not exist game.exe call _fuse.bat
"C:\Program Files\7-Zip\7z.exe" a -r -y -mx9 game.7z game.exe "C:\Program Files (x86)\LOVE\DevIL.dll" "C:\Program Files (x86)\LOVE\OpenAL32.dll" "C:\Program Files (x86)\LOVE\SDL.dll"
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Amazon [Bot], Google [Bot] and 7 guests