Hi!
Nice script, it do easy compile exe, but i have a problem.
I write in console "/home/love/love-release.sh -w -v 0.8.0 /home//love/love.love" and script create in exe path form - "\home\love" and of course exe doesnt work.
What i do wrong?
Or i need write "/home/love/love-release.sh -w -v 0.8.0 [all files]" ? But script drop out all .ttf files
Help plz.
love-release - in Lua ! - makes LÖVE game release easier
Re: Love-Release. Bash script to make it easier.
Ok, so maybe I did not explained really well how it worked...
You should run it in your project's directory, like /home//MyProjects/MyAwesomeGame, where all your files (main.lua and stuff) are stored. Then, the scripts takes by default every file it founds, zips them and makes the executable. If you chose to specify files after you passed all the options, the script will only zip the files you specified.
For now, it doesn't support only indicating a love file like you did, it need to be launched inside your project's root.
If you want to set another place for your project's release directory, use option -r.
So I guess you would like to use it this way:
I'm working on other things, like setting an application icon, and proper linux packaging.
You should run it in your project's directory, like /home//MyProjects/MyAwesomeGame, where all your files (main.lua and stuff) are stored. Then, the scripts takes by default every file it founds, zips them and makes the executable. If you chose to specify files after you passed all the options, the script will only zip the files you specified.
For now, it doesn't support only indicating a love file like you did, it need to be launched inside your project's root.
If you want to set another place for your project's release directory, use option -r.
So I guess you would like to use it this way:
Code: Select all
$ cd Projects/MyGame
$ love-release.sh -w -v 0.8.0
Re: Love-Release. Bash script to make it easier.
Hi everyone ! It's been a while...
I just decided to work again on this little thing, and I've added a few things that may makes life easier.
Bash isn't very difficult, but there's always sooo many ways of doing the same thing...
Still, I'm not shure about this: I've assumed that you just have to replace the game.ico that is shipped with the download to set your application icon on Windows. Am I wrong ? Then, what is the point of t.window.icon = nil -- Filepath to an image to use as the window's icon (string) ? What is the purpose of this ? Where should be placed the image ? What format/dimensions ?
I just decided to work again on this little thing, and I've added a few things that may makes life easier.
- Now 0.9.1 by default.
- If a conf.lua file is provided, the script will try to detect the right version of Love to use.
- If a ProjectName.icns file is provided, the script will use it to set the game icon on MacOS.
Bash isn't very difficult, but there's always sooo many ways of doing the same thing...
Still, I'm not shure about this: I've assumed that you just have to replace the game.ico that is shipped with the download to set your application icon on Windows. Am I wrong ? Then, what is the point of t.window.icon = nil -- Filepath to an image to use as the window's icon (string) ? What is the purpose of this ? Where should be placed the image ? What format/dimensions ?
Last edited by Rucikir on Wed Apr 23, 2014 8:42 am, edited 1 time in total.
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: Love-Release. Bash script to make it easier.
Hi there. The icon in the zip or installed version of LÖVE for Windows is just for the .love files, if you want to change the icon of the .exe you need something like Resource Hacker, you need an .ico file with multiple resolutions of your icon.
The t.window.icon is the icon of the window (the one that shows at the corner next to the title).
In OS X you just have to change the icons in the resource folder (I think, I'm not a Mac user)
Take a look at this:
viewtopic.php?f=4&t=8657
viewtopic.php?f=4&t=11406
viewtopic.php?f=4&t=806
The t.window.icon is the icon of the window (the one that shows at the corner next to the title).
In OS X you just have to change the icons in the resource folder (I think, I'm not a Mac user)
Take a look at this:
viewtopic.php?f=4&t=8657
viewtopic.php?f=4&t=11406
viewtopic.php?f=4&t=806
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: Love-Release. Bash script to make it easier.
Thanks for the answer.
I removed the game.ico stuff, and turned it to support MacOS instead.
EDIT: I have found something in order to set the icon for Windows, from Linux http://www.nongnu.org/icoutils/. Do someone knows about it ?
I removed the game.ico stuff, and turned it to support MacOS instead.
EDIT: I have found something in order to set the icon for Windows, from Linux http://www.nongnu.org/icoutils/. Do someone knows about it ?
-
- Citizen
- Posts: 67
- Joined: Fri Mar 07, 2014 8:16 pm
Re: Love-Release. Bash script to make it easier.
I'm on a mac, and as I was packaging up my game for LD29, I realized that your script was including .DS_Store files. It would be nice if you made sure it didn't. That and .git/ (but I didn't see any of those in there).
(Also the desktop icon doesn't display for me?)
Great script!
(Also the desktop icon doesn't display for me?)
Great script!
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Love-Release. Bash script to make it easier.
I could not get this script to work.
I tried it on my ld-29 entry. This is what I did:
Error:
I tried it on my ld-29 entry. This is what I did:
Code: Select all
git clone https://github.com/kikito/ld-29.git
cp love-release.sh ld-29
cd ld-29
bash love-release -m
Code: Select all
bash love-release.sh -m
(standard_in) 1: parse error
(standard_in) 1: parse error
adding: LICENSE (deflated 41%)
adding: README.md (deflated 2%)
adding: animations.lua (deflated 67%)
adding: conf.lua (deflated 36%)
adding: lib/ (stored 0%)
adding: lib/anim8.lua (deflated 65%)
adding: lib/gamera.lua (deflated 64%)
adding: lib/middleclass.lua (deflated 67%)
adding: lib/stateful.lua (deflated 69%)
adding: lib/util.lua (deflated 50%)
adding: main.lua (deflated 64%)
adding: map.lua (deflated 69%)
adding: map_filler.lua (deflated 62%)
adding: maps/ (stored 0%)
adding: maps/map1.txt (deflated 97%)
adding: media/ (stored 0%)
adding: media/img/ (stored 0%)
adding: media/img/bad_guy.png (deflated 6%)
adding: media/img/bad_guy.xcf (deflated 64%)
adding: monsters/ (stored 0%)
adding: monsters/goblin.lua (deflated 52%)
adding: monsters/monster.lua (deflated 74%)
adding: monsters/mushroom.lua (deflated 62%)
adding: monsters/rat.lua (deflated 51%)
adding: monsters/slug.lua (deflated 72%)
adding: monsters.lua (deflated 59%)
adding: tile.lua (deflated 66%)
love-release.sh: line 384: [: =: unary operator expected
[love--macosx-ub.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of love--macosx-ub.zip or
love--macosx-ub.zip.zip, and cannot find love--macosx-ub.zip.ZIP, period.
mv: rename love.app to ld-29.app: No such file or directory
cp: ld-29.app/Contents/Resources: No such file or directory
love-release.sh: line 561: ld-29.app/Contents/Info.plist: No such file or directory
When I write def I mean function.
Re: Love-Release. Bash script to make it easier.
First, thanks for the feedback.
It should now exclude every file beginning whith a dot. I'm not shure if it is a really good behaviour, though. And zip has its own ways of handling directories.
The thing is, I'm trying to detect the Löve version to use by grep-ing the conf.lua file.
grep -Eo '[0-9]+.[0-9]+.[0-9]+' conf.lua is not enough, because the string can be found multiple times in the file.
So I thought of doing this:
If there is a conf.lua file, and if t.version is specified, it works well. But, if there's not... if [ -n $LOVE_VERSION_CONF ] is still verified !
And more strange, both tests -n and -z are true !
So LOVE_VERSION gets a wrong value, bc outputs (standard_in) 1: parse error and zip goes crazy.
I have removed this behaviour for the moment. If someone knows a right way to do this, please tell me.
By the way, there is a strange __MACOSX directoy in the new 0.9.1 .zip that we can download. Zip could ask if you want to replace it or not. It doesn't matter as it is not bundled with the final zip.
Well, on Ubuntu it never occured to me that the zip command was adding hidden files ( .* ). Maybe it is different with mac.WetDesertRock wrote:I realized that your script was including .DS_Store files.
It should now exclude every file beginning whith a dot. I'm not shure if it is a really good behaviour, though. And zip has its own ways of handling directories.
Code: Select all
EXCLUDE_FILES=$(/bin/ls -A | grep "^[.]" | tr '\n' ' ')
zip -9 -r $RELEASE_DIR/$PROJECT_NAME.love -x $0 $MAIN_RELEASE_DIR/\* ${PROJECT_ICNS##/*/} $EXCLUDE_FILES @ *
Turns out autocompletion had made me type PROJECT_FILE instead of PROJECT_NAME. It should work now.WetDesertRock wrote:(Also the desktop icon doesn't display for me?)
For kikito, I've reproduced the bug, and it is a pretty strange one.kikito wrote:I could not get this script to work.
The thing is, I'm trying to detect the Löve version to use by grep-ing the conf.lua file.
grep -Eo '[0-9]+.[0-9]+.[0-9]+' conf.lua is not enough, because the string can be found multiple times in the file.
So I thought of doing this:
Code: Select all
if [ -f conf.lua ]; then
LOVE_VERSION_CONF=$(grep -Eo 't.version = "[0-9]+.[0-9]+.[0-9]+"' conf.lua | grep -Eo '[0-9]+.[0-9]+.[0-9]+')
if [ -n $LOVE_VERSION_CONF ]; then
LOVE_VERSION=$LOVE_VERSION_CONF
fi
fi
And more strange, both tests -n and -z are true !
So LOVE_VERSION gets a wrong value, bc outputs (standard_in) 1: parse error and zip goes crazy.
I have removed this behaviour for the moment. If someone knows a right way to do this, please tell me.
By the way, there is a strange __MACOSX directoy in the new 0.9.1 .zip that we can download. Zip could ask if you want to replace it or not. It doesn't matter as it is not bundled with the final zip.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Love-Release. Bash script to make it easier.
This fixed my issue, thanks!
When I write def I mean function.
Re: Love-Release. Bash script to make it easier.
I've worked a little (again) on it, and made a few improvements.
Firstly, a bunch of cleanup (hope it did not broke the whole thing) and bug fixes.
Secondly, I have managed to properly detect the version the project uses by using Lua (if a conf.lua file is found).
Finally, icons !
If a ProjectName.icns file is provided, the script will use it to set the game icon on MacOS.
If a ProjectName.ico file is provided, and that Wine and Resource Hacker are installed, the script will use them to set the game icon on Windows.
The script doesn’t yet handle the process of creating icons, but if provided it can use them, assuming Wine and Resource Hacker are installed.
Firstly, a bunch of cleanup (hope it did not broke the whole thing) and bug fixes.
Secondly, I have managed to properly detect the version the project uses by using Lua (if a conf.lua file is found).
Code: Select all
LOVE_VERSION=$(lua -e 'f = loadfile("conf.lua"); t, love = {window = {}, modules = {}}, {}; f(); love.conf(t); print(t.version)')
If a ProjectName.icns file is provided, the script will use it to set the game icon on MacOS.
If a ProjectName.ico file is provided, and that Wine and Resource Hacker are installed, the script will use them to set the game icon on Windows.
The script doesn’t yet handle the process of creating icons, but if provided it can use them, assuming Wine and Resource Hacker are installed.
- if you want to create MacOS icons (.icns), and you are
- if you want to create Windows icons (.ico), you can
- use icoutils to create the icon,
- then Wine and Resource Hacker to set the icon.
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest