Difference between revisions of "Mac OSX Advanced"
(New page: Once you have everything up and running on Mac OSX you might want to experiment with different configuration files. With AppleScript you can easily built a little dialog th...) |
|||
Line 1: | Line 1: | ||
− | Once you have | + | Once you have DOSBox up and running on Mac OSX you might want to experiment with different [[Dosbox.conf|configuration files]]. With AppleScript you can easily built a little dialog that will prompt you for which [[Dosbox.conf|configuration file]] you want to use for starting up DOSBox. |
First create a new folder in your documents folder called DOSBox, this is where we are going to store the new [[Dosbox.conf|configuration files]]. As an example you can copy the default [[Dosbox.conf|configuration file]] on [[DOSBox_and_Mac_OSX]] to this folder. | First create a new folder in your documents folder called DOSBox, this is where we are going to store the new [[Dosbox.conf|configuration files]]. As an example you can copy the default [[Dosbox.conf|configuration file]] on [[DOSBox_and_Mac_OSX]] to this folder. | ||
The way we are setting this up will use the default configuration file on Mac OSX for default settings and the configuration file in your ~/Documents/DOSBox folder as an additional configuration. Please not that the additional configuration will override the settings in the default configuration, except for the settings in the [[AUTOEXEC]] [[Dosbox.conf#.5Bautoexec.5D|section]], these will add up, so it's best to not have anything in the [[AUTOEXEC]] [[Dosbox.conf#.5Bautoexec.5D|section]] of your default configuration. | The way we are setting this up will use the default configuration file on Mac OSX for default settings and the configuration file in your ~/Documents/DOSBox folder as an additional configuration. Please not that the additional configuration will override the settings in the default configuration, except for the settings in the [[AUTOEXEC]] [[Dosbox.conf#.5Bautoexec.5D|section]], these will add up, so it's best to not have anything in the [[AUTOEXEC]] [[Dosbox.conf#.5Bautoexec.5D|section]] of your default configuration. |
Revision as of 14:51, 24 November 2009
Once you have DOSBox up and running on Mac OSX you might want to experiment with different configuration files. With AppleScript you can easily built a little dialog that will prompt you for which configuration file you want to use for starting up DOSBox. First create a new folder in your documents folder called DOSBox, this is where we are going to store the new configuration files. As an example you can copy the default configuration file on DOSBox_and_Mac_OSX to this folder. The way we are setting this up will use the default configuration file on Mac OSX for default settings and the configuration file in your ~/Documents/DOSBox folder as an additional configuration. Please not that the additional configuration will override the settings in the default configuration, except for the settings in the AUTOEXEC section, these will add up, so it's best to not have anything in the AUTOEXEC section of your default configuration. Now start up "AppleScript Editor" (it's installed to Applications/Utilities/AppleScript Editor.app), then open its preferences and on the first setting enale it to show the scriptmenu in the menu bar. This way your script is easily accessible via the Script Menu in the Menu bar, looking like a black scroll. Close the preferneces and choose to make a new script (File -> New) and enter the following script:
set the_list to "" set nl to ASCII character 10 tell application "Finder" set file_list to name of every file of folder "Macintosh HD:users:USERNAME:documents:dosbox" repeat with entry in file_list set the_list to the_list & nl & entry end repeat end tell set options to (((choose from list file_list with prompt "DOSBox will start with") as string) & "'" & "&> /~/dosbox.log &") if options is not false then do shell script "/Applications/DOSBox.app/Contents/MacOS/dosbox -conf '/users/USERNAME/library/preferences/DOSBox 0.73 Preferences' -conf '/users/USERNAME/documents/dosbox/" & options else if options is false then do shell script "/Applications/DOSBox.app/Contents/MacOS/dosbox &> ~/dosbox.log &" end if
Please replace USERNAME with your username on your Mac OSX system and save the script to your script folder (~/Library/Scripts) with the name DOSBox. You can now click on the Script icon in your Menu bar and choose DOSBox in the drop down list. It will open a dialog, giving you a choice of all the configuration files in your ~/Documents/DOSBox folder. When you choose one, DOSBox will start with both the default configuration and the configuration you just chose. If you press Cancel, DOSBox will start with the default configuration ONLY. The script will also log the console output of DOSBox to ~/dobox.log, so you can look it up if you encounter any errors.