Page 1 of 1

My windows command for love&bitbucket

Posted: Wed Oct 20, 2010 10:55 am
by bartoleo
Just wanted to share with you my little commands that I use to develop in LÖVE (I use Win-XP)

I have my 'projdir' (in my case c:\leo\love\lovewars)
in the root of 'projdir' I have these '.bat'

conf.bat (configuration)

Code: Select all

rem configuration project and love

set LOVEDIR=c:\leo\love
set PROJDIR=c:\leo\love\lovewars
set PROJNAME=lovewars
test.bat (testing with console)

Code: Select all

call %~dp0\conf.bat
%LOVEDIR%\love --console %PROJDIR%
build.bat (builds autmatically .love and .exe and a .zip with exe+dlls in dir. build

Code: Select all

rem builds .love and .exe and a .zip containing .exe+dlls

call %~dp0\conf.bat

cd %PROJDIR%\

mkdir build
mkdir build\exe
del build\%PROJNAME%.love
del %temp%\%PROJNAME%~.love
zip -r %temp%\%PROJNAME%~.love * -x .hg\* build\*
copy %temp%\%PROJNAME%~.love build\%PROJNAME%.love
del build\exe\%PROJNAME%.exe
copy /b %LOVEDIR%\love.exe+build\%PROJNAME%.love build\exe\%PROJNAME%.exe 
copy %LOVEDIR%\*.dll build\exe
del build\%PROJNAME%_exe.zip
cd build\exe
zip -r ..\%PROJNAME%_exe.zip *
cd %PROJDIR%\
bitbucket.bat (builds then pull+commit+push on bitbucket project)

Code: Select all

rem LOVEWARS BITBUCKET + BUILD
rem http://bitbucket.org/bartoleo/lovewars
rem http://love2d.org/forums/viewtopic.php?f=5&t=1933

rem call c:\leo\love\lovewars\conf.bat

call %~dp0\conf.bat

cd %PROJDIR%\
call build.bat
hg add *
hg rm -f profil*.*
hg rm -f *.bat
hg rm -f *.love
hg rm -f build
hg pull http://bitbucket.org/bartoleo/%PROJNAME%
hg commit
hg push http://XXXUSERXXX:XXXPASSWORDXXX@bitbucket.org/bartoleo/%PROJNAME%

Re: My windows command for love&bitbucket

Posted: Wed Oct 20, 2010 11:04 am
by nevon
Would anyone be interested in me creating a topic on how to set up packaging and uploading to a ppa for Ubuntu? Bartbes helped me with a pretty sweet setup that allows me to work on my projects like always, using git and a remote repo at github (should be easily edited to use any other kind of vcs though), as well as enable me to build and publish packages to my ppa automatically.

Re: My windows command for love&bitbucket

Posted: Wed Oct 20, 2010 11:05 am
by bartoleo
mmh... I dont' know much of Ubuntu...
just used it form now to now
I'm trying to install 10.10 on my new pc...

Re: My windows command for love&bitbucket

Posted: Wed Oct 20, 2010 10:48 pm
by Robin
nevon wrote:Would anyone be interested in me creating a topic on how to set up packaging and uploading to a ppa for Ubuntu? Bartbes helped me with a pretty sweet setup that allows me to work on my projects like always, using git and a remote repo at github (should be easily edited to use any other kind of vcs though), as well as enable me to build and publish packages to my ppa automatically.
That would be interesting... reminds me, I think I might write a tool to automatically make a .deb (that depends on the right version of LÖVE) out of a love project, anyone interested in that?