ReLove v1.1.5 - Easily make executables with icons!

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
ThaBluTuretNate
Prole
Posts: 3
Joined: Mon Mar 21, 2022 7:05 pm

ReLove v1.1.5 - Easily make executables with icons!

Post by ThaBluTuretNate »

Image
WINDOWS ONLY!!!
________________________________________________________
ReLove - How it works
Put ReLove in a (preferably) empty folder
Put in a .love file and maybe a .ico file of your own
Open relove.bat and let it work it's magic
Once it is done, press any key, and open build.zip
________________________________________________________
ReLove - Configs
Opening Relove.bat makes Relove.ini - configure it to your taste
ReLove is also under license GNU GPL v3, which allows you to do basically anything BUT make closed source distributions.
This means you can modify the batch file itself to fit exactly what you want
________________________________________________________
Check the GitHub repository! https://github.com/ThaBluNate/ReLove/
Attachments
Relove.zip
Windows Only
(5.8 MiB) Downloaded 238 times
- The ultimate turret, BluTurretNate
User avatar
idbrii
Prole
Posts: 34
Joined: Sat Jun 12, 2021 5:07 am

Re: ReLove v1.1.5 - Easily make executables with icons!

Post by idbrii »

Could you explain what relove does that the conf variable doesn't handle? I've only used the conf for pngs so many your method supports icon. Or it works around the bug mentioned on love.graphics.setIcon (not sure if that effects the conf variable)?

Code: Select all

-- Filepath to an image to use as the window's icon (string)
t.window.icon = nil
https://love2d.org/wiki/Config_Files
MrFariator
Party member
Posts: 509
Joined: Wed Oct 05, 2016 11:53 am

Re: ReLove v1.1.5 - Easily make executables with icons!

Post by MrFariator »

Purely using the conf.lua or love.graphics.setIcon allows you to set the executable icon at runtime. Any fused executables will have the default LÖVE application icon in file explorer if you don't change it, which may not be desirable for commercial or serious releases. It could be likened to having the default Unity logo for your game's executable in the shipped product.

As to what ReLove does, the .bat appears to depend on ResourceHacker (assuming it's installed and available in your system PATH). First it basically grabs the .love, turns it into an .exe using the usual "copy /b" method on Windows. The output is then modified with ResourceHacker, replacing the .ico with one of your own choosing.

I think prerequisites for this tool could be better lined out on its github page, as I'm not sure how the tool is supposed to know if user has ResourceHacker or not.
User avatar
ThaBluTuretNate
Prole
Posts: 3
Joined: Mon Mar 21, 2022 7:05 pm

Re: ReLove v1.1.5 - Easily make executables with icons!

Post by ThaBluTuretNate »

MrFariator wrote: Thu Apr 07, 2022 5:08 pm Purely using the conf.lua or love.graphics.setIcon allows you to set the executable icon at runtime. Any fused executables will have the default LÖVE application icon in file explorer if you don't change it, which may not be desirable for commercial or serious releases. It could be likened to having the default Unity logo for your game's executable in the shipped product.

As to what ReLove does, the .bat appears to depend on ResourceHacker (assuming it's installed and available in your system PATH). First it basically grabs the .love, turns it into an .exe using the usual "copy /b" method on Windows. The output is then modified with ResourceHacker, replacing the .ico with one of your own choosing.

I think prerequisites for this tool could be better lined out on its github page, as I'm not sure how the tool is supposed to know if user has ResourceHacker or not.
You don't have to install resource hacker, a portable resource hacker is inside of make.zip (which is also why the executable for resource hacker is named weirdly inside of the batch file)

I didn't want there to be any prerequisites for best user experience!

If you have any more questions, then just ask!
- The ultimate turret, BluTurretNate
User avatar
idbrii
Prole
Posts: 34
Joined: Sat Jun 12, 2021 5:07 am

Re: ReLove v1.1.5 - Easily make executables with icons!

Post by idbrii »

MrFariator wrote: Thu Apr 07, 2022 5:08 pm Purely using the conf.lua or love.graphics.setIcon allows you to set the executable icon at runtime. Any fused executables will have the default LÖVE application icon in file explorer if you don't change it, which may not be desirable for commercial or serious releases.
Oh, you're right. I've been using makelove and looks like it uses rcedit to do the same. Given the default love fusing setup, I guess it makes sense that the resulting .exe wouldn't have a special icon.

Then this seems like a nice simple tool for a specific purpose. Nice work ThaBluTuretNate!
User avatar
Luke100000
Party member
Posts: 232
Joined: Mon Jul 22, 2013 9:17 am
Location: Austria
Contact:

Re: ReLove v1.1.5 - Easily make executables with icons!

Post by Luke100000 »

Slightly offtopic but does anyone knows how to smoothly change an .exes icon on Linux? Preferable without Wine?
User avatar
ThaBluTuretNate
Prole
Posts: 3
Joined: Mon Mar 21, 2022 7:05 pm

Re: ReLove v1.1.5 - Easily make executables with icons!

Post by ThaBluTuretNate »

idbrii wrote: Sun May 01, 2022 12:17 am
MrFariator wrote: Thu Apr 07, 2022 5:08 pm Purely using the conf.lua or love.graphics.setIcon allows you to set the executable icon at runtime. Any fused executables will have the default LÖVE application icon in file explorer if you don't change it, which may not be desirable for commercial or serious releases.
Oh, you're right. I've been using makelove and looks like it uses rcedit to do the same. Given the default love fusing setup, I guess it makes sense that the resulting .exe wouldn't have a special icon.

Then this seems like a nice simple tool for a specific purpose. Nice work ThaBluTuretNate!
Thanks! Many of my projects start out this way, including serkket *cough* shameless self-promo *cough*
They all start by me making a program to do something that i find boring or something i have to repeatedly explain to my friends on how to do.
Of course, serkket has much more polish as my main project, while relove was just something i made in a day based on an older private version that i also made for myself
I don't have that version currently :(
- The ultimate turret, BluTurretNate
User avatar
milon
Party member
Posts: 472
Joined: Thu Jan 18, 2018 9:14 pm

Re: ReLove v1.1.5 - Easily make executables with icons!

Post by milon »

Luke100000 wrote: Tue May 03, 2022 1:35 pm Slightly offtopic but does anyone knows how to smoothly change an .exes icon on Linux? Preferable without Wine?
I've tried to find an answer to that too, and no joy yet. I keep running into "No *NIX solutions exist" or "Use Wine + Resource Hacker".

It should technically possible to create a cross-platform (love) solution, but that would require far more knowledge of exe structure than I possess.
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
User avatar
pgimeno
Party member
Posts: 3544
Joined: Sun Oct 18, 2015 2:58 pm

Re: ReLove v1.1.5 - Easily make executables with icons!

Post by pgimeno »

Maybe give windres a try?

https://man7.org/linux/man-pages/man1/windres.1.html

I have no idea of how it works, whether it would be useful for this or what. Apparently it comes with mingw for Linux, but I'm not sure of that either. A file search in Debian turns out these results (editing out some unrelated stuff and results that are manual pages only):

binutils-mingw-w64-i686: /usr/bin/i686-w64-mingw32-windres
binutils-mingw-w64-i686: /usr/share/man/man1/i686-w64-mingw32-windres.1.gz
binutils-mingw-w64-x86-64: /usr/bin/x86_64-w64-mingw32-windres
binutils-mingw-w64-x86-64: /usr/share/man/man1/x86_64-w64-mingw32-windres.1.gz
User avatar
milon
Party member
Posts: 472
Joined: Thu Jan 18, 2018 9:14 pm

Re: ReLove v1.1.5 - Easily make executables with icons!

Post by milon »

I poked around with it for a few minutes, and only ended up with garbled EXE's. It's possible I was doing it wrong, but all my online searches for "windres change icon" etc came up with people having the same issues.

In case it's useful to anyone else, to get windres installed on Linux Mint/Ubuntu/Debian use:
$ sudo apt install binutils-mingw-w64-x86-64 mingw-w64

The windres binary itself is actually called "x86_64-w64-mingw32-windres".
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
Post Reply

Who is online

Users browsing this forum: No registered users and 48 guests