Page 1 of 2

love-maker distribution script

Posted: Fri Dec 12, 2014 8:17 pm
by Elephly
So I'm new to love, and even lua for that matter, but I'm a quick learner and I'm enjoying it. Anyway, I'm pretty big on automation, so I wrote myself a quick script to build my love games with the click of a button. After some tinkering, I decided to make it public, cause I think it works pretty well! :awesome:

I also just found out after glancing at the board that there's already a quite popular love distribution script someone published on github... so this thing of mine may not be wanted, but I'm going to put it out there anyway!

love-maker - for all of your love making needs :ultrahappy:

I'll explain briefly how it works:
What I've got included in this repository is basically the entire love zip file you can download off the home page, 7za (the 7-zip command line tool), and my shell script.
The folder should be placed in the root directory of your project.
All of your lua files should be inside the ./src directory relative to the project root, unless you decide to change that variable inside my script, which is easy to do and detailed in the readme.
When you run the script, I use 7-zip to make a zip out of your lua files, I change the extension of that to .love, I copy that file and love.exe together and place that into the bin, I delete the .love file I made, and then I copy all of the dll's into the bin! It's quite simple really and ready for distribution. You don't even have to set the name of the project (unless you want the name to be different that the name of your project root folder...).

As I said before, use it if you feel like it, though there are already other things out there. It's actually a simple enough process, I wouldn't be surprised if just about everybody did it themselves...

As always, if you've got any suggestions for how I can fix/improve this thingy, feel free to let me know, you use github for what it's supposed to be used for!

Re: Hi! I made a thing...!

Posted: Sat Dec 13, 2014 5:40 pm
by undef
Ah,
there are a couple of those in the forum already, if you want to improve yours I suggest checking out the others.
Besides, if you want people to find this, you should probably change the thread title.

Anyway, welcome to the LÖVE community!

Re: love-maker distribution script

Posted: Mon May 04, 2015 11:59 am
by Elephly
Hey everybody, after a long semester, I've come back to love and decided to update this thing I've made (I got sidetracked from the actual GAME I was making...) ^^

Some updates I've implemented are as follows:
  • You are now asked which platform you'd like to distribute to - THAT'S RIGHT! You can release to Linux or Mac from Windows, or any other way!
    • Available functioning distribution platforms include Windows 32-bit, Windows 64-bit, and Mac OS X (not tested).
  • Distributing for Mac OS X SHOULD work!
    • Like I said, I haven't tested it! I don't have a Mac, give me a break!
  • You can also now do a clean (or rather full removal) of an existing distribution, if one already exists.
So this thing is coming along I think. There are still some issues I want to work out, and I'm a little discouraged to start the Linux distribution part. Since I'm running Linux mint, I can pretty much guarantee that when I do that bit, it should work for Ubuntu and Linux Mint alike, but I can't vouch for every distro.

If there are any Mac LOVE makers out there who are willing, please test this thing for me!!
It would be seriously appreciated. While I don't think there's much room for error, I still think it's likely my work won't have worked perfectly on the first attempt. So Mac users, try it out!

Lastly, I know that in reality, this tool is actually not very convenient for windows users because natively, windows doesn't support shell script execution. When I started this thing, I was testing it with Git Bash and Cygwin. My plan for that is to make a Powershell script, then everyone can be happy! Thanks in advance for any feedback!

Re: love-maker distribution script

Posted: Tue May 05, 2015 2:04 pm
by T-Bone
In your Linux distribution, do you build a .deb-file or a binary? I think the former is much more useful than the latter, but it's of course much more difficult to implement.

Re: love-maker distribution script

Posted: Wed May 06, 2015 7:30 pm
by Elephly
T-Bone wrote:In your Linux distribution, do you build a .deb-file or a binary? I think the former is much more useful than the latter, but it's of course much more difficult to implement.
Currently I don't do anything for Linux distribution, I got lazy there, however I'll keep that in mind for when I get down to it. Thanks!

Re: love-maker distribution script

Posted: Thu May 07, 2015 9:29 pm
by SiENcE
I found this practical, as it supports all systems => https://github.com/MisterDA/love-release .

Re: love-maker distribution script

Posted: Mon Dec 14, 2015 4:46 am
by Elephly
UPDATE

I've implemented better Windows support. Now, 7zip is not included with the project and having mingw or cygwin is also not necessary. The project includes a portable mingw bash shell as well as a batch file to run everything. So if you're on windows, instead of running the make.sh, you run the "make (windows).bat" and that will run the make.sh in the context of a bash shell. Soon, the portable bash shell will be no longer included and everything will be done inside the batch file. For now, if you are able to run shell scripts on a windows system, I'd recommend using the make.sh rather than the batch file anyway. Although, that's not to say that I won't update both scripts side by side in the future!

Check it out!

Cheers!

Re: love-maker distribution script

Posted: Thu Dec 17, 2015 5:52 am
by Elephly
Hi again! Back at you with another update if anybody actually cares!

So I basically deepened the Windows support of this puppy (kind of odd considering I started, developed, and only tested this thing on Windows). There is now a powershell script which is near the same level of completion as the bash script. It only builds Windows distributions for now, but the rest shouldn't be too hard - I've gotten over the tough bits of learning powershell. I learned that there are many ways to accomplish things in powershell, but most of them suck and are slow. So I've tried to use the most optimized routines for this one (I think it's pretty fast). I basically don't want anybody waiting around for 10+ minutes for a large game to compile, although that may be unavoidable in the first place.

Anyway, what you will notice about the project is that it is now very small again since I removed the mingw shells. You will also notice more scripts - a love-maker.bat and a love-maker.ps1. The love-maker.ps1 is the powershell script, but it's not really intended to actually by run directly... I mean, if you want to go ahead, but for the sake of usability and double-clickability, if you will, I made that batch file specifically for the task of running the powershell script. So yes, in a nutshell, if you are on Windows, you run the love-maker.bat, and if you are on any other system on the planet, you run the love-maker.sh.

I'm sorry that it's still in essence really only supportive of Windows!! :( I will try my best to get Linux stuff working some time. And like I said in an earlier post... the Mac stuff SHOULD work... I just can't test it! :3

Check it out!

Re: love-maker distribution script

Posted: Sat Dec 19, 2015 3:45 pm
by Elephly
Hey everyone, just wanted to update once more.

The powershell script is now caught up with the bash script in terms of functionality. That means that you can build distributions for windows 64-bit and 32-bit as well as mac os x from ANY platform. As always, mac is STILL untested, since i don't own a mac, but it SHOULD work! If anyone would like to test that baby out for me, that would be excellent :awesome:

Building for linux is basically empty because I am too lazy to really try and figure it out. So as it stands, building for linux just zips the love file and plops it into the bin directory. But yeah, things are at a good enough place for now. I most likely won't be updating for another little while so have fun!

love-maker

Re: love-maker distribution script

Posted: Mon Dec 21, 2015 7:40 am
by Elephly
UPDATE

I made a few changes since my last update. Firstly, I changed the project such that it doesn't include a version of LOVE with it. It makes a lot more sense that way. This way, the project is a lot more compact to start out (like, less than 50Kb) and just more modular in general. So, now when you build for the first time for a platform, the script will download love for you (hardcoded to version 0.9.2 for now).

I also added a configuration file. With the configuration file, you can specify which version of LOVE you would like to build for (the specified version will be downloaded if it exists and hasn't been downloaded yet) and you will soon be able to input a path to your source and binaries directories, as well as a project name that you would rather use.

As a final note, I did an "end consumer test" of my script here and found that it didn't work as seamlessly as I wanted it to :crazy:
Basically, I realized that none of my stuff is signed obviously, so Windows will ask permission to run these things. As a result, since I previously advised to run the batch file if you were on Windows, then you may have noticed (if you tried it that is) that it wasn't able to run at all. The reason for this is that I previously was executing the powershell script from the batch file with an execution policy of remote signed. I've changed it now to bypass that, so once you give permission to the batch file to run, it will then have permission to carry on with executing the powershell script.

Future changes include completing the configurable values and finding the latest stable version of love to use as a default value.

As always, try it out!