Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Installing DFHack on MacOS  (Read 2848 times)

Jacko13

  • Bay Watcher
  • Please Urist wear your masterwork steel armour
    • View Profile
Installing DFHack on MacOS
« on: April 23, 2020, 03:28:10 am »

Apologies in advance if this is the wrong forum or a dumb question. I recently found myself the owner of an old Mac (I have never owned anything but windows before) laptop and installed much beloved DF. Cannot verify the the developer message popped up. Resolved with allow anyway from the Security and Privacy preferences. Success.

Fort starting to creak at the seams during an invasion so decided to install dfhack for some of its performance and cleanup solutions. Cue allow all again a lot of times. Every plugin needs an allow all. Laborious. Then I looked at DFHack which is running very nicely for scripts but not for plugins at all. Ran reload... cannot verify again for each plugin.  I assume there is an obvious solution that I am too dense or inexperience with Mac to know? Can anybody help?
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: Installing DFHack on MacOS
« Reply #1 on: April 26, 2020, 10:19:46 am »

What DFHack and macOS version are you using? I tried to implement a fix here, which should be in 0.44.12-r3 and newer, but I don't have anything newer than macOS 10.13 to test on.

By the way, posting stuff in the main DFHack thread is fine. Not as many of us check the larger utilities board regularly.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

jecowa

  • Bay Watcher
    • View Profile
Re: Installing DFHack on MacOS
« Reply #2 on: April 27, 2020, 08:40:13 am »

Apple's been making it harder and harder to run apps that don't generate profit for Apple. Here's a quick way to remove the quarantine flags to hopefully make the Mac OS Gatekeeper happily run Dwarf Fortress and DFHack plugins:

  • Open up Terminal.app
  • Paste this line in (but don't hit return just yet): xattr -dr com.apple.quarantine
  • Type in a space after it.
  • Drag your Dwarf Fortress folder into the Terminal window.
  • Now hit the return key.

Within a couple of years, it wouldn't surprise me if Macs will only run apps from the App Store, where Apple gets a 30% cut on every app sale and the privilege of posting apps (even free apps) cost 99$ per annum.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: Installing DFHack on MacOS
« Reply #3 on: April 27, 2020, 09:09:35 am »


  • Open up Terminal.app
  • Paste this line in (but don't hit return just yet): xattr -dr com.apple.quarantine
  • Type in a space after it.
  • Drag your Dwarf Fortress folder into the Terminal window.
  • Now hit the return key.


The DFHack launcher script I linked above is essentially doing just that, hence my question about what DFHack version is being used here.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Jacko13

  • Bay Watcher
  • Please Urist wear your masterwork steel armour
    • View Profile
Re: Installing DFHack on MacOS
« Reply #4 on: April 27, 2020, 02:03:52 pm »

Gents thank you very much for the answers!
My versions were
MacOsx 10.15.4
DFHack 0.47.04 Beta 1
I installed df as the lazy Mac pack and then added dfhack a day later separately
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: Installing DFHack on MacOS
« Reply #5 on: April 27, 2020, 04:18:02 pm »

Does jecowa's command work for you? If it does, I'll try to tweak the launcher script (maybe xattr doesn't like the DFHack launcher passing in the filenames individually instead of the folder with -r?).

Also, do you have a file named "quarantine-removed" in your hack folder? (This folder has "plugins" and "scripts" folders inside of it, if it helps locate it.) If so, you could try removing it and starting DFHack again.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Jacko13

  • Bay Watcher
  • Please Urist wear your masterwork steel armour
    • View Profile
Re: Installing DFHack on MacOS
« Reply #6 on: April 29, 2020, 11:20:41 am »

Embarrasingly I just tried this but failed. Was doing a fresh install to test the solution. Error message below...

xattr: No such file: /Applications/Lazy Mac Pack v0.47.04 dfhack-b1/df_osx v0.47.04/libs/SDL_image.framework/Frameworks
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: Installing DFHack on MacOS
« Reply #7 on: April 29, 2020, 11:56:48 am »

Embarrasingly I just tried this but failed. Was doing a fresh install to test the solution. Error message below...

xattr: No such file: /Applications/Lazy Mac Pack v0.47.04 dfhack-b1/df_osx v0.47.04/libs/SDL_image.framework/Frameworks
I'm pretty sure that's just a broken symlink. It should have fixed the rest of the files in the DF folder - does it still not work?
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Jacko13

  • Bay Watcher
  • Please Urist wear your masterwork steel armour
    • View Profile
Re: Installing DFHack on MacOS
« Reply #8 on: April 30, 2020, 03:25:26 am »

It does appear to have worked. Thanks for the assistance and gentleness with my dumb questions! (Now if only I can Gert my laptop back from my son I shall start a new fortress :-))
Logged