So one day I was annoyed because of manually zipping and and running the compiled file so i decided to make this handy little batch file to do it for me. Because I am a lazy prick.
@REM ------- BEGIN build.bat ----------------
@setlocal
@echo off
set path="C:\Program Files\WinRAR\";%path%
set path="C:\games\love\0.8.0\";%path%
winrar.exe a -afzip -m5 -ed -r -ep1 lovegame-src.zip lovegame-src\*
ren lovegame-src.zip lovegame-src.love
rem C:\games\LOVE\0.8.0\love.exe --console lovegame-src.love
love --console lovegame-src.love
ren lovegame-src.love lovegame-src.zip
del lovegame-src.zip
REM ------- END build.bat ------------------
Set your love install path or manually add it. This uses winrar to zip and basic windows commands to rename and delete.
Thought I would share this because well it saves some time. more so when your on a roll and forget things easy.
This is useful for creating a .love file for distributing on the forums or wherever, but I hope you know you can drag the folder containing main.lua onto the LÖVE executable (or onto a shortcut to it) and it will run your game.
slime wrote:This is useful for creating a .love file for distributing on the forums or wherever, but I hope you know you can drag the folder containing main.lua onto the LÖVE executable (or onto a shortcut to it) and it will run your game.
No I didn't know that. But my games folder and my love installation folder are in two different locations. So this was the easier method of keeping my screen clean.
Besides I was spoiled by osx so my desktop is almost always clean. Even though I use 7.
This is true, but the batch file is more of a tool for auto zipping, renaming then running, and finally deleting when your done testing. Its a tool for lazy people.
But it does all this extra work! The net effect of the two are exactly the same (provided you're not doing something weird like depending on the case insensitivity of NTFS).
If it didn't delete the .love at the end, it would be useful to test a game right before distributing the .love.
Robin wrote:But it does all this extra work! The net effect of the two are exactly the same (provided you're not doing something weird like depending on the case insensitivity of NTFS).
If it didn't delete the .love at the end, it would be useful to test a game right before distributing the .love.
so you remove a hole 2 lines of code? Then it will run its test, package and your done.