Build environment and deployment on the Mac
#21
Posted 15 January 2012 - 11:43 PM
Wildfire Games Programmer
Contact me: ben@wildfiregames.com
#22
Posted 16 January 2012 - 01:20 AM
historic_bruno, on 07 January 2012 - 09:06 PM, said:
Quote
"Code that uses NSHomeDirectory() is probably doing The Wrong Thing. It’s not appropriate to clutter up the user’s home directory — internal application-data should be stored in the Application Support directory (or a temporary file if it’s transient). So I can’t think of a good reason to get the path to the user’s home directory. Every use of NSHomeDirectory() I’ve seen is spamming the home directory, or getting a subdirectory in a brittle way."
http://cocoawithlove...on-support.html
"On the Mac, the correct location to store persistent user-related files for your application is in a directory with the same name as your application in the Application Support directory for the current user."
They suggest using NSSearchPathForDirectoriesInDomains to find the user's Application Support directory (instead of something like getting the $HOME environment variable, or trying to construct the path manually), which is part of the Cocoa API, so we'd probably need to write a C wrapper in order to use it.
Apple also has some clarifications about when to use ~/Library/:
Quote
Caches directory: The Caches directory is where you store cache files and other temporary data that your app can re-create as needed. This directory is located inside the Library directory.
~/Documents is not even listed as a possibility.
Wildfire Games Programmer
Contact me: ben@wildfiregames.com
#23
Posted 16 January 2012 - 12:38 PM
#24
Posted 16 January 2012 - 07:46 PM
Quote
Quote
About Application Support directory:
Quote
About "Documents"
Quote
I'm not quite sure about the Mods and Logs.
My suggestions are as follows...
Mods: I agree on "~/Documents/0ad/mods". The user will probably want to download a mod somewhere and copy it to a directory, so we could say he "works with it directly". This directory should also be visible (Library is not).
Logs: The user doesn't create logs manually, but he should be able to find them and therefore they should not be in a hidden directory.
Another thing:
Userconfig root doesn't make sense at all in my opinion because we already have Userconfig and I can't see any relation of Logs to configuration.
I've marked this line for removal from the table.
Do you agree on the suggested changes?
The quotes are from:
The Mac Application Environment
File System Programming
#25
Posted 16 January 2012 - 09:13 PM
Yves, on 16 January 2012 - 07:46 PM, said:
Changed Userconfig from "~/Documents/0ad/config" to "~/Library/Application Support/0ad/config"
Quote
Screenshots, Savegames and User Mod definitely go into that category in my opinion and we should keep them as they are now in our table.
The fact Application Support is hidden on Lion is troublesome, that might be the best argument for storing mods elsewhere
Saved games are definitely managed by the game, as the user doesn't get to choose the names or where they are located. We'll be adding a "delete" button to the load game menu, so at that point they will be fully managed by the game.
It looks like Steam uses Documents at least for screenshots:
Quote
Locate the screenshot image which was created after closing the game (screenshots will be saved to the game folder under your username folder in the SteamApps directory).
Example: /Documents/Steam Content/[account name]/team fortress 2/tf/screenshots
But if you want to move Steam game data to a new computer, you only move files in Application Support:
Quote
1. Navigate to your existing Steam library, located at: ~/Library/Application Support/Steam/
2. Copy the entire Steam folder and it’s contents to that exact same location on the new hard drive (~/Library/Application Support/)
Another argument for using Application Support for mods, it provides an easy single location to uninstall game data or move to a new computer.
Wildfire Games Programmer
Contact me: ben@wildfiregames.com
#26
Posted 16 January 2012 - 09:36 PM
historic_bruno, on 16 January 2012 - 09:13 PM, said:
Also the savegames aren't tied to a specific system and someone could want to copy them from one computer to another, share them with friends or whatever.
I would tend to say they are more user-managed than game-managed.
About the mods I'm not sure because I don't know enough details about how they will work and how they will be distributed and used.
Probably Application Support is better.
#27
Posted 16 January 2012 - 10:37 PM
In relation to mods and total conversions, I'd like to suggest that they should go in /Applications/0ad/ and then be dealt within the VFS system (which I'm not fully across just yet) - whether that means in practice a zip file in the top level folder, a sub-folder or someother compressed archive.
To my mind where a mod changes -- or even potentially totally converts gameplay elements in a total conversion -- the adoption of those changes should be quite clear and deliberate, almost forming a new game. This is why it makes sense to have them within the /Applications/0ad/ folder.
#28
Posted 16 January 2012 - 10:46 PM
IMO, total conversions should consist of a new app bundle, because it's likely the engine itself will be changed. In the case of other mods, I don't think we should place anything in or with the app bundles after distributing them.
Wildfire Games Programmer
Contact me: ben@wildfiregames.com
#29
Posted 17 January 2012 - 07:36 PM
I've added some description to each task on the wiki-page and made a note who is assigned to that task.
Feel free to take an unassigned task.
I've only taken those tasks I already started working on, but If nobody wants to do the others, I will take care of them.
@historic_bruno
I've assigned you one of the tasks because I think it covers one of the ticket's you are assigned to.
Is that OK?
edit: wrong link.
#30
Posted 17 January 2012 - 08:10 PM
Maybe we can collaborate on github or gitorious or something as a sort of staging area before it goes into the main tree.
For the short time we could make a script that just does a fix-up on the resulting binary by moving files into it and calling install_name_tool.
I think we should focus on making one bundle that works on snow leopard and lion i386 and x86_64. We should links some things static ( thinking about boost specifically ). But most of all we should work to get it working really well soon then use that experience to fix the building process properly.
#31
Posted 17 January 2012 - 08:38 PM
Juicyfruit, on 17 January 2012 - 08:10 PM, said:
Juicyfruit, on 17 January 2012 - 08:10 PM, said:
What else could we do in the future? The installnames are predefined by our repository structure because after building it should work as it is for testing and development.
Juicyfruit, on 17 January 2012 - 08:10 PM, said:
Juicyfruit, on 17 January 2012 - 08:10 PM, said:
#32
Posted 17 January 2012 - 08:59 PM
Yves, on 17 January 2012 - 08:38 PM, said:
It seems common practice for boost on os x bundles I could find that use boost. Also when we dont use much functionality of a library and only one executable is going to use it anyway we might as well link it static to get a smaller total size faster load time etc.
Yves, on 17 January 2012 - 08:38 PM, said:
One of the reasons I am trying to make cmake work is that I dont like premake or know much about it. However for building gnu makefiles it seems very well suited. But then we need a script to add some OS X fancy things to the bundle it produces. Or am I wrong. For that we need an icon, a plist a direcotry to store libraries / frameworks. (Do we store dylib's in libraries and frameworks in frameworks ? ).
#33
Posted 17 January 2012 - 09:36 PM
I've never made a repository on github/gitorious, so if you could create it, I'd support it and upload my work in progress there too.
Quote
Quote
I guess a few lines of code can explain best what I meant (see attachment).
It's a very early work in progress, so don't expect too much.
Attached Files
#34
Posted 18 January 2012 - 05:11 AM
#35
Posted 20 January 2012 - 05:54 AM
#36
Posted 20 January 2012 - 08:31 AM
Aviv Sharon [ aka Jeru ]
Wildfire Games 0 A.D. PR & Social Media Contributor
Contact me:
E-mail & Google Talk: aviv dot sharon at gmail dot com
MSN: lc_jerusalem at hotmail dot com
Facebook, Twitter, LinkedIn
#37
Posted 22 January 2012 - 10:49 AM
I've now also taken Task nbr 1 because that's a requirement for even a first basic app bundle.
Btw. I was looking at some codeblocks-problems on OSX but gave it up. Premake is really a mess on those "less supported" platforms and I hope CMake is much better.
#38
Posted 22 January 2012 - 01:29 PM
Yves, on 22 January 2012 - 10:49 AM, said:
I've now also taken Task nbr 1 because that's a requirement for even a first basic app bundle.
Btw. I was looking at some codeblocks-problems on OSX but gave it up. Premake is really a mess on those "less supported" platforms and I hope CMake is much better.
Erik Johansson [ aka feneur ]
Wildfire Games
Contact me: feneur@wildfiregames.com
Support Wildfire Games!
#39
Posted 23 January 2012 - 06:17 PM
feneur, on 22 January 2012 - 01:29 PM, said:
Different people created trac-tickets about the same thing or similar things. You see in the article that I tried matching some of the existing tickets to tasks but some tasks are still without ticket. I will create new tickets for those tasks without tickets if that's how it should be done.
#40
Posted 23 January 2012 - 09:09 PM
Yves, on 23 January 2012 - 06:17 PM, said:
Different people created trac-tickets about the same thing or similar things. You see in the article that I tried matching some of the existing tickets to tasks but some tasks are still without ticket. I will create new tickets for those tasks without tickets if that's how it should be done.
Erik Johansson [ aka feneur ]
Wildfire Games
Contact me: feneur@wildfiregames.com
Support Wildfire Games!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
















