My windows command for love&bitbucket
Posted: Wed Oct 20, 2010 10:55 am
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)
test.bat (testing with console)
build.bat (builds autmatically .love and .exe and a .zip with exe+dlls in dir. build
bitbucket.bat (builds then pull+commit+push on bitbucket project)
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
Code: Select all
call %~dp0\conf.bat
%LOVEDIR%\love --console %PROJDIR%
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%\
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%