Mac version of my game for a Windows user

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
jennsand
Prole
Posts: 9
Joined: Thu Jun 03, 2010 11:24 pm

Mac version of my game for a Windows user

Post by jennsand »

I started this topic over on the game distribution thread...
viewtopic.php?f=4&t=451&start=80
See below for the first post...

I guess I want to find out how to create a Mac version of the game without having to pester my friends for use of their Macs. Failing that, I want to be able to solve my issues with getting a Mac version... Which seems to be two problems, or maybe it's just one?

I can't get the love.filesystem to work. I did setIdentity() and even tried doing the trick of creating "enabler.txt" file as well. But none of the files and directories I create within the game using love.filesystem exist when I exit the game. Like they're not created at all. In fact the general save directory /Application Support/LOVE/ doesn't exist either.

But... This could a be a problem of installing Love properly... So looking at the info about distributing on Macs, you should be able to see a "love.app" file in the Applications directory. But I don't. So maybe this is why I can't create my save files. And this could be why I can't right click to get the package contents and do all the other steps that people have said you need to get a mac distribution.

Am I missing something about installing on Macs? You download the .dmg, drag and drop it to the Applications file? When I do this, it's still a .dmg in the Applications directory.
I'm a Windows user and I've been able to package up my game very well for Windows systems. But I want to create a Mac version as well (and Linux if it's not too much trouble) . So I've attempted going around to friends houses to use their Macs to create a distributable version, but haven't had much luck.

So I was wondering, is it possible to create a Mac version in Windows somehow?

Assuming that's not possible... I think I'm having two main problems when I try to get my game to work on a Mac. Firstly, I started by downloading the Mac version of LOVE onto my friend's Mac and then tried to run my game. In my game I use love.filesystem to save high scores and do a few other file related things, e.g. mkdir. When I quit the game and do a search in Finder for the files and folders I should have created in the game, they don't exist. I tried looking for the /Library/Application Support/LOVE/ folder that Love is supposed to create somehow when I download the .dmg (yes, I'm not a Mac user and I'm confused by how this works), and the entire folder doesn't exist. It's like it never creates the application directory, which is why my game fails?

But... Even ignoring these filesystem errors, I can't seem to make head nor tail of the instructions on the game distribution page on the wiki and the ones posted here. It says I should right click on the love.app file. But I can't find that. Is it somehow within the .dmg file? If I copy the .dmg file to the Applications directory, shouldn't it kind of unpackage itself or something and show the "love.app" file so I can right click it? I've tried on two different friends' Macs and love just seems stuck as a .dmg and when I right click I don't get any options to unpackage it or anything.

Any help would be much appreciated! Thanks.
User avatar
bmelts
Party member
Posts: 380
Joined: Fri Jan 30, 2009 3:16 am
Location: Wiscönsin
Contact:

Re: Mac version of my game for a Windows user

Post by bmelts »

Oh hey, that's my cue! :monocle:

There's a lot to your post, so this might be a little long.

As far as installing LÖVE on a Mac - you've got it almost, but not quite, right. On a Mac, if you double-click the .dmg file, it should open up a little virtual drive containing love.app and a nice-looking background. You need to drag love.app - inside the DMG - to the Applications folder in order to install LÖVE.

LÖVE on the Mac stores its save data in the user's Application Support folder, so the path would actually be /Users/yourname/Library/Application Support/LOVE/youridentityhere.

The problem with creating a Mac version on a non-Mac operating system is that LÖVE for Mac is distributed in a DMG, which is an image of a virtual hard disk - sort of like how an ISO is an image of a CD/DVD/whatever. I don't know if there are tools for Windows or Linux to open DMGs - there may well be - but it's very much an Apple-specific format.

If you can get the DMG open, everything else is simple. A .app file is actually just a folder that the Mac treats specially. On Windows, it'll look like any ordinary folder; on the Mac, you'll need to right-click on love.app and select "Show Package Contents". Inside, you'll find the Contents folder - inside that is where you need to be to make a Mac executable. You can either put the .love inside the Resources folder, or tack it onto the end of the love executable inside the MacOS folder with copy /b, like you do to the EXE.

Hopefully this helps - if it doesn't, I'm happy to clarify anything that needs clarifying.
jennsand
Prole
Posts: 9
Joined: Thu Jun 03, 2010 11:24 pm

Re: Mac version of my game for a Windows user

Post by jennsand »

Thanks so much for the advice. I think it does help me. Although I won't be able to check until I get to go over to a friend's place and borrow their Mac. Kind of frustrating that I can't do it myself somehow on Windows. But I guess it kind of makes sense that you can't. Unless there was a downloadable version of the love.app file for Macs. Then you'd just need to package it up, although maybe this also needs a Mac specific way of doing things.

I think one of my problems was that I didn't realise the icon marked as "Love" in the .dmg was the .app file. It all seems a lot clearer now. And I think this will solve my filesystem problems when I properly install Love on my friend's computer.

As a clarification (and maybe this is already covered somewhere else, so sorry), but the file I'll get out of the Mac process will end up being a .app file and it will be complete in itself? There's no need for the DLLs that Windows things use, right?
jennsand
Prole
Posts: 9
Joined: Thu Jun 03, 2010 11:24 pm

Re: Mac version of my game for a Windows user

Post by jennsand »

Oh... And if I want a Linux version of the game, I guess I'll need a Linux system to set it up too?
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Mac version of my game for a Windows user

Post by Robin »

jennsand wrote:Oh... And if I want a Linux version of the game, I guess I'll need a Linux system to set it up too?
I think you just need the Linux executable, and do the same trick as with the Windows one.
Help us help you: attach a .love.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Mac version of my game for a Windows user

Post by bartbes »

Yeah, but linux has some distribution issues with libs, for most it would suffice to just mention the required libs.
User avatar
bmelts
Party member
Posts: 380
Joined: Fri Jan 30, 2009 3:16 am
Location: Wiscönsin
Contact:

Re: Mac version of my game for a Windows user

Post by bmelts »

The file you get out of the Mac process will be complete, yeah. The .app bundle, since it's actually a folder, contains all the libraries LÖVE needs, so you'll be fine if you just distribute that.

I'm considering ditching the DMG and just distributing love.app in a standard zip file, to avoid this sort of confusion in the future. And make it easier on people without a Mac to make a Mac version, since other than opening the DMG, almost everything is doable without a Mac. (The one exception I guess being creating a custom icon, though there's actually a web service to do just that, so once you've got the .app, you don't need a Mac at all to distribute your game with it.)
jennsand
Prole
Posts: 9
Joined: Thu Jun 03, 2010 11:24 pm

Re: Mac version of my game for a Windows user

Post by jennsand »

anjo wrote: I'm considering ditching the DMG and just distributing love.app in a standard zip file, to avoid this sort of confusion in the future. And make it easier on people without a Mac to make a Mac version, since other than opening the DMG, almost everything is doable without a Mac. (The one exception I guess being creating a custom icon, though there's actually a web service to do just that, so once you've got the .app, you don't need a Mac at all to distribute your game with it.)
That would be fantastic if you could do this. Or perhaps have both options available for download in case people want the dmg and all?
User avatar
Luiji
Party member
Posts: 396
Joined: Mon May 17, 2010 6:59 pm

Re: Mac version of my game for a Windows user

Post by Luiji »

I really don't see the point of DMGs if you extract the file from it. Standard ZIP would most likely suffice.
Good bye.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Mac version of my game for a Windows user

Post by Jasoco »

DMG's are disk images. And they have been around longer than Windows has. Back then they were called IMG's as in Images. But IMG I think makes people think of pictures. And with the migration to OS X they decided to create a new type to support the new OS and file systems. DMG's are a nice reusable way of compressing files into one place but still allowing access to all the stuff inside with a single move. They're like floppies, CD's, DVD's or Flash Drives but in file form. Don't knock them just because Windows doesn't have them. Just because you don't see the point doesn't make them any less useful. And you can still use ZIP if you want. But then you end up having to dispose of files afterwards. Keep the DMG for reinstalling later.
Locked

Who is online

Users browsing this forum: Google [Bot] and 55 guests