Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: 40d18 and the Terminal.  (Read 1823 times)

Dwarf

  • Bay Watcher
  • The Light shall take us
    • View Profile
40d18 and the Terminal.
« on: February 28, 2010, 07:34:54 pm »

Aight, guys.


I've had the chance to use 40d18 and that really is a whopping fuckload of extra FPS there.
My problem is, on a mac, I'm not actually allowed to use the terminal application. Not allowed as in 'can't even launch', not 'parents said not to'.

If I've had a functioning alt key, I would just hack myself an admin account a say 'Fuck the World', but instead, I'm stuck with 40d.

So, any way to put this
Code: [Select]
#!/bin/sh
PWD=`dirname "${0}"`
export DYLD_FALLBACK_LIBRARY_PATH=${PWD}/libs
export DYLD_FALLBACK_FRAMEWORK_PATH=${PWD}/libs
cd "${PWD}"; ./dwarfort.exe
(Which seems to be all what the launcher file (df) contains)

in an AppleScript or Automator routine or whatever?
Logged
Quote from: Akura
Now, if we could only mod Giant War Eagles to carry crossbows, we could do strafing runs on the elves who sold the eagles to us in the first place.

bombcar

  • Bay Watcher
    • View Profile
Re: 40d18 and the Terminal.
« Reply #1 on: February 28, 2010, 08:16:46 pm »

What do you mean by "you cannot launch terminal?" If you can download things, try downloading iTerm and using that instead.
Logged

jfs

  • Bay Watcher
    • View Profile
Re: 40d18 and the Terminal.
« Reply #2 on: February 28, 2010, 08:25:24 pm »

Here's something that might work:

1. Create a new folder where you extracted the 40d18 archive.
2. Name it "Dwarf Fortress.app", the .app part is the really important thing, and you need to confirm that one.
3. Right-click your new, still empty application bundle, and select Open Package Contents, it'll open a new Finder window.
4. Create a folder inside that named "Contents" and open that one.
5. Create a folder inside Contents named "MacOS"
6. Move "dwarfort.exe" into the MacOS folder you just made
7. Inside the Contents folder (next to the Mac OS folder), create a folder named Frameworks
8. From the "libs" folder from the original archive, move the two folders named something with SDL into the new Frameworks folder
9. Move the entire libs folder, now containing just one file, into the MacOS folder
10. Start Text Edit, make sure you have a blank file, and select Plain Text from the Edit menu.
11. Paste this into Text Edit:
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>dwarfort.exe</string>
<key>CFBundleIdentifier</key>
<string>com.bay12games.dwarffortress</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Dwarf Fortress</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>
</plist>
12. Save the file somewhere, like on the desktop. Name it "Info.plist", you'll need to confirm that too.
13. Move the Info.plist file into the Contents folder in the Dwarf Fortress application bundle
14. Check you have the correct file structure:
Code: [Select]
Dwarf Fortress.app
 + Contents
    + Frameworks
       + SDL_image.framework
       + SDL.framework
      Info.plist
    + MacOS
         dwarfort.exe
       + libs
            libfmodex.dylib
15. You should now be able to double-click your Dwarf Fortress.app in Finder and start the game.

At least this worked for me. You don't need the "df" script at all for this, and can delete it.
Logged

bombcar

  • Bay Watcher
    • View Profile
Re: 40d18 and the Terminal.
« Reply #3 on: February 28, 2010, 08:56:07 pm »

I've updated my download to incorporate a Dwarf Fortress.app folder and a pretty icon from here which uses art from Mike! The circle is complete.

This is the DFG versions; double clicking Dwarf Fortress.app works.
Logged

Dwarf

  • Bay Watcher
  • The Light shall take us
    • View Profile
Re: 40d18 and the Terminal.
« Reply #4 on: March 01, 2010, 02:16:08 am »

Crap, thanks guys!
Logged
Quote from: Akura
Now, if we could only mod Giant War Eagles to carry crossbows, we could do strafing runs on the elves who sold the eagles to us in the first place.

jclark

  • Bay Watcher
    • View Profile
    • http://jclark.org/weblog/
Re: 40d18 and the Terminal.
« Reply #5 on: March 14, 2010, 09:35:35 am »

I've updated my download to incorporate a Dwarf Fortress.app folder and a pretty icon from here which uses art from Mike! The circle is complete.

This is the DFG versions; double clicking Dwarf Fortress.app works.

Thanks for this Bombcar!  Is it possible to run this in fullscreen?  I tried changing the init.txt WINDOWED property to "PROMPT" but I still get a window.  I tried setting the GRAPHICS_FULLSCREENX and Y properies to sensible values as well (1028x1024); no change.  Not sure what else to try.  On my 24" iMac, the windowed version is kinda small and squinty.
Logged
warf Fortress 0.27.176.38c on Mac OS X 10.4.11 PPC (Woohoo!)

bombcar

  • Bay Watcher
    • View Profile
Re: 40d18 and the Terminal.
« Reply #6 on: March 14, 2010, 12:47:34 pm »

First of all, you'll want to update it for d19.

Second, once running, press F11.

However, on a Mac, F11 may be bound to some Exposé key and not help you; you'd have to unbind it.

To update it for d19, all you have to do is move the Dwarf Fortress.App file into the new version, right click it, Show Package Contents, and replace each lib and dwarfort.exe with the new ones.

Soon I will try to write a script that given the tarball will make the App file so Toady can hopefully someday automate it.
Logged

bombcar

  • Bay Watcher
    • View Profile
Re: 40d18 and the Terminal.
« Reply #7 on: March 14, 2010, 12:51:01 pm »

Or you could download the updated app here:

http://schnecke.bombcar.com/random/d19.zip

Note that this is NOT the full version! You need to apply it over your normal d19 download! Extract Dwarf Fortress.app from the ZIP file and place it in your DF directory.

You can then delete the df script and dwarfort.exe if you wish; they're not needed.

NOTE: A side effect of this is that the errorlog.txt and gamelog.txt files (or similar) get put in the root of your boot drive. Not sure why.
Logged