English Amiga Board


Go Back   English Amiga Board > Support > support.FS-UAE

 
 
Thread Tools
Old 24 August 2012, 20:13   #1
Bladeforce
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 72
Self-contained FS-UAE game app bundles for Mac OS X [Solved]

Hi Frode!!

May i pick your brains and ask if it is possible to have the config file and all kikstarts/save configs, adf's etc within the app itself? If so, what do i need to add to the config file?
I'd love to run fs-uae seperately for each game with their own icons etc for launchpad without fs-uae needing access to anything outside of the app

Many regards

Last edited by FrodeSolheim; 04 November 2012 at 18:19. Reason: Changed title
Bladeforce is offline  
Old 24 August 2012, 20:49   #2
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
Quote:
Originally Posted by Bladeforce View Post
Hi Frode!!

May i pick your brains and ask if it is possible to have the config file and all kikstarts/save configs, adf's etc within the app itself? If so, what do i need to add to the config file?
I'd love to run fs-uae seperately for each game with their own icons etc for launchpad without fs-uae needing access to anything outside of the app

Many regards
I assume you mean Mac OS X app bundles. Yes, this is possible. Before looking for Default.fs-uae, it looks for Config.fs-uae in the directory containing the executable (I don't think I have documented this, so I understand why you ask ;-)). So in FS-UAE.app, the actual executable is:
Code:
FS-UAE.app/Contents/MacOS/fs-uae
which means that FS-UAE will try to load
Code:
FS-UAE.app/Contents/MacOS/Config.fs.uae
One could argue that the "correct" place for the config file is Resources in the app bundle, but this is just a generic feature I have coded, and not something specific for app bundles.

So a simple way to make it self-contained is to create the file Config.fs-uae and put this into it (as well as other configuration values of course):

Code:
[config]
base_dir = $config/../Resources
(base_dir = $exe/../Resources should also work, $config and $exe is replaced with the directory containing the config file or executable, respectively)

The kickstarts dir will automatically become FS-UAE.app/Contents/Resources/Kickstarts (etc). Also note that the logs will be stored inside the app bundle. You can of course override this with "logs_dir", or specify the other directories (kickstarts_dir, etc) instead of using base_dir.

You should of course be able to change the name and icon for the bundle as with any other Mac OS X app bundle. Good luck
FrodeSolheim is offline  
Old 25 August 2012, 12:07   #3
Bladeforce
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 72
Thanks Frode!

I have put my config file in my Contents/MacOS folder and entered

base_dir = $config/../Resources

into the config file replacing $config with Contents/MacOS

all my other folders are located in Contents/Resources/Kickstarts
and Contents/Resources/Games

I edit the config to load the floppies with Contents/Resources/Games/pdreams.adf for example and my kickstart location as Contents/Resources/Kickstarts/KICK31.rom

Now when i run the emulator it says No Configuration file found :/
Bladeforce is offline  
Old 25 August 2012, 15:01   #4
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
Quote:
Originally Posted by Bladeforce View Post
Thanks Frode!

I have put my config file in my Contents/MacOS folder and entered

base_dir = $config/../Resources

into the config file replacing $config with Contents/MacOS

all my other folders are located in Contents/Resources/Kickstarts
and Contents/Resources/Games

I edit the config to load the floppies with Contents/Resources/Games/pdreams.adf for example and my kickstart location as Contents/Resources/Kickstarts/KICK31.rom

Now when i run the emulator it says No Configuration file found :/
Hi, I assume the reason you get "No Configuration file found" is that the file was not named and/or placed correctly. The configuration file should be:
Code:
FS-UAE.app/Contents/MacOS/Config.fs-uae
Specifying the floppy path as "Contents/Resources/Games/pdreams.adf" will not work because the relative path will not be found.

There are many ways to set up the configuration file, so I will suggest one out of many possible ways to do it, and I suggest you go with something similar unless you understand all the effects of many configuration options

This specific suggestion is based on your file names:

Config.fs-uae can look like this:
Code:
[config]
base_dir = $exe/../Resources
kickstart_file = KICK31.rom
floppy_drive_0 = pdreams.adf
(+ other options, like amiga_models etc)

Here's where you should put the files to work with the above config:
Code:
FS-UAE.app/Contents/MacOS/Config.fs-uae
FS-UAE.app/Contents/Resources/Kickstarts/KICK31.rom
FS-UAE.app/Contents/Resources/Floppies/pdreams.adf
(It is normally not necessary to specify kickstart_file, as it should find it automatically in the above example if the kickstart is the default for the amiga model you specify, so kickstart_file = KICK31.rom can probably be left out from the config file as well)

You should test the above first, and then you can:
* Rename FS-UAE.app to Something Else.app if you want you
* Change the app name in FS-UAE.app/Contents/Info.plist
* Replace the icon FS-UAE.app/Contents/Resource/fs-uae.icns if you want to

(Beware of typos, I have just typed this and not tested it )

Last edited by FrodeSolheim; 25 August 2012 at 23:35.
FrodeSolheim is offline  
Old 25 August 2012, 21:14   #5
Bladeforce
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 72
Hi Frode!!

You Sir are an absolute genius!! It worked fantastically! I will now work on an app bundle for all my favourite Amiga Games!! Brilliant! Brilliant!

So happy! For the sake of 14MB a game this is a real genius piece of work!

Thanks!!
Bladeforce is offline  
Old 27 August 2012, 17:59   #6
Bladeforce
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 72
Man i had to pop on again just to say i now have spent the last 12 hours putting 150 of my favorite games in their own app bundle with their own icons. What a joy!! Frode for President!
Bladeforce is offline  
Old 27 August 2012, 18:35   #7
nexusle
Banned
 
Join Date: Jul 2010
Location: Earth
Age: 46
Posts: 500
Why did you does this?! Aren't you happy with the launcher?!
nexusle is offline  
Old 27 August 2012, 20:33   #8
Bladeforce
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 72
i did like the launcher but MUCH prefer to just double click the game and it runs straight away from launchpad or a folder. Plus i dont have to load an extra program to run it. Each to their own but I prefer this way
Bladeforce is offline  
Old 27 August 2012, 22:20   #9
Methanoid
Retired Quartex Sysop
 
Methanoid's Avatar
 
Join Date: Sep 2001
Location: Roman Verulamium
Age: 58
Posts: 1,874
What a great idea. I mean who cares about whether a 880k game grows into a rather larger file when it basically just runs like an executable on a Mac.... Storage is cheap!
Methanoid is offline  
Old 27 August 2012, 23:17   #10
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
Quote:
Originally Posted by Bladeforce View Post
i did like the launcher but MUCH prefer to just double click the game and it runs straight away from launchpad or a folder. Plus i dont have to load an extra program to run it. Each to their own but I prefer this way
One downside is that you won't enjoy FS-UAE updates and improvements that easily, since you have merged FS-UAE and a game into one app.

But on the other hand, it is easy to for example write a small shell script that copies files from an updated FS-UAE.app over to all the game .apps located in a specific directory!
FrodeSolheim is offline  
Old 28 August 2012, 20:56   #11
Bladeforce
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 72
Thanks Frode! Yes i understand the downside you stated but that wont stop me from trying the new releases too of course ) As of now though your emulator is so good it runs all my favorite games flawlessly If that day ever comes where i want to update the app with new changes then yes I will make a small script to automatically do it

Bladeforce is offline  
Old 28 August 2012, 21:01   #12
nexusle
Banned
 
Join Date: Jul 2010
Location: Earth
Age: 46
Posts: 500
I think, Frode have made this script at the moment you wrote your post .

If Frode have a idea, he'll make it true in the moment he wrote the idea in the post. That's how I know Frode
nexusle is offline  
Old 29 August 2012, 17:37   #13
yesplease
Registered User
 
yesplease's Avatar
 
Join Date: May 2012
Location: moon
Posts: 208
Frode, you are a blast ! I wanted that too. ;-)
yesplease is offline  
Old 02 October 2012, 01:01   #14
Bladeforce
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 72
Hi Frode, just a quick question. I still have this working great on my OSX box but is it possible on a Linux box too?
Bladeforce is offline  
Old 02 October 2012, 01:34   #15
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
Quote:
Originally Posted by Bladeforce View Post
Hi Frode, just a quick question. I still have this working great on my OSX box but is it possible on a Linux box too?
Well, Linux does not support the notion of app bundles as such, no...

But do you mean if you can create a self-contained "portable" directory with FS-UAE, and a game or whatever? And if so, did you intend for the content in this directory to be transferable and runnable on another Linux computer? (A bit like "PortableApps" on Windows?)

Last edited by FrodeSolheim; 02 October 2012 at 01:54.
FrodeSolheim is offline  
Old 02 October 2012, 12:06   #16
Bladeforce
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 72
Hi, sorry Frode I didnt explain myself correctly. I was meaning is it possible to run the emulator with all configs, executable and folders within the same directory for each game. If it is possible then I would be looking to various apps that may have the ability to make an osx like app bundle on linux.

Last edited by Bladeforce; 02 October 2012 at 12:20.
Bladeforce is offline  
Old 02 October 2012, 20:06   #17
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
Quote:
Originally Posted by Bladeforce View Post
Hi, sorry Frode I didnt explain myself correctly. I was meaning is it possible to run the emulator with all configs, executable and folders within the same directory for each game. If it is possible then I would be looking to various apps that may have the ability to make an osx like app bundle on linux.
Yes, Config.fs-uae is found in the same way on all platforms, so it is possible to have a directory structure for example like this:
Code:
somedirectory/Config.fs-uae
somedirectory/fs-uae (executable)
somedirectory/share/fs-uae/
But note: fs_get_application_exe_path is not implemented properly for Linux/FreeBSD, so fs-uae will only work properly in this case if the current directory is "somedirectory/" (which it normally is anyway if launched from a desktop environment). Implementing fs_get_application_exe_path properly is on the todo-list anyway, so I can improve this quite quickly (to lift the "current directory" requirement).

But, if "somedirectory" is to be portable to most other Linux computers, more work is needed, including:
* required shared libraries must be included in the directory (if not, compatible libraries must already exist on the target system). For example, either the SDL library must be included, or you must require the the system already has SDL installed (with a certain minimum version).
* LD_LIBRARY_PATH (or some other mechanism) must be used to make the shared libraries found when starting FS-UAE (a wrapper shell script can be used for instance).
* neither FS-UAE nor bundled shared libraries must use "too" recent symbols, or the binary package will not work on older systems. One way to do this is to compile such a package on an older Linux (Debian 6.0 is probably a reasonable choice).

I should be able to help further if you have specific questions.
FrodeSolheim is offline  
Old 04 October 2012, 20:15   #18
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
fs-uae now finds its executable path also on Linux/Unix, and share resources are first checked for in executable-dir/share and executable-dir/../share before checking in the other system locations, and Config.fs-uae is looked up relative to executable-dir, not current directory, so the next development version should work very well in this regard also on Linux.
FrodeSolheim is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
FS-UAE not working online [Solved] Neil79 support.FS-UAE 8 10 April 2013 01:15
FS-UAE: NTSC still not quite right [Solved] mr_a500 support.FS-UAE 22 21 January 2013 21:09
Python errors from fs-uae-launcher [Solved] mocham support.FS-UAE 8 01 November 2012 19:54
Using shaders with FS-UAE on Ubuntu [Solved] DaveMB support.FS-UAE 2 14 October 2012 15:46
E-UAE on Mac - App Bundle with embedded ADF kire_online support.OtherUAE 50 29 August 2012 01:15

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 21:30.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09566 seconds with 13 queries