Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 85 86 [87] 88 89 ... 222

Author Topic: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06  (Read 999852 times)

Beowulf

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.21.2
« Reply #1290 on: August 10, 2014, 01:42:27 pm »

I have not looked at how dfhack goes about this but it should be possible to just have these utilities be the parent of the df process (i.e. they start it) and do without the bad CAP_SYS_PTRACE.

Sure enough, works:
main.cpp
Code: [Select]
diff --git a/src/main.cpp b/src/main.cpp
index 2aee63d..1fb1ed5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -30,10 +30,36 @@ THE SOFTWARE.
 *
 */
 
+
 #include "dwarftherapist.h"
 #include "dfinstance.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 int main(int argc, char *argv[]) {
+  char *launcha_args[5];
+  pid_t pid;

+  launcha_args[0] = "/opt/pt/df/df_current/df_linux/df";
+  launcha_args[1] = "arg1";
+  launcha_args[2] = "arg2";
+  launcha_args[3] = NULL;

+  switch ((pid = fork()))
+  {
+    case -1:
+      perror ("fork");
+      break;
+    case 0:
+      execv ("/opt/pt/df/df_current/df_linux/df", launcha_args);
+      exit(EXIT_FAILURE);
+      break;
+    default:
+      ;
+      break;
+  }
     if(!DFInstance::authorize()){
         return 0;
     }


Script:
39c39
< _DT_BINARY="/usr/bin/DwarfTherapist"
---
> _DT_BINARY="/opt/pt/df/therapist/installroot/usr/bin/DwarfTherapist"
45c45
< _ETC_BASE_FOLDER="/usr/share/dwarftherapist/"
---
> _ETC_BASE_FOLDER="/opt/pt/df/therapist/installroot/usr/share/dwarftherapist/"
49c49
< _NOTIFY_ICON="/usr/share/pixmaps/dwarftherapist.png"
---
> _NOTIFY_ICON="/opt/pt/df/therapist/installroot/usr/share/pixmaps/dwarftherapist.png"
234c234
< check_ptrace_state
---
> #check_ptrace_state
236c236
< provide_gui_to_setcap
---
> #provide_gui_to_setcap

Yes, I have it in a funny path and yes I cannot write C at all and that is newbish c&p trial and error, hard-coding-pathes glory bullshit.
But, hey it works.  :D
Logged
warf mode exists for giving you a break from and to supply sites and stuff for Adventure mode!

carkasjak

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.23.4 | DF 40.06
« Reply #1291 on: August 10, 2014, 02:30:42 pm »

0.40.07 is released, and it adds new labors. Hope this doesn't delay Dwarf Therapist too much ;)
Logged

shaver

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.23.4 | DF 40.06
« Reply #1292 on: August 10, 2014, 02:43:25 pm »

Another Linux option would be to setcap at install; you'd only have to run something as root once, and you'd never disable the global protection. With an rpm/deb package you could make it invisible even.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.23.4 | DF 40.06
« Reply #1293 on: August 10, 2014, 07:21:33 pm »

0.40.07 is released, and it adds new labors. Hope this doesn't delay Dwarf Therapist too much ;)
It shouldn't - according to Quietust, the ID's of new labors are added in order, and determining which ID corresponds to which labor is fairly easy with disassembly, since there's a switch statement that converts labor ID's to human-readable names.
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.

ResMar

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.23.4 | DF 40.06
« Reply #1294 on: August 10, 2014, 07:21:46 pm »

0.40.07 is released, and it adds new labors. Hope this doesn't delay Dwarf Therapist too much ;)

It also makes changes to dwarven labors that make this entire discussion on hidden labors in the view apocryphal.
Logged
ヽ(´ー`)┌[>゜))))彡]   Dwarf Therapist User Guide

khearn

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.23.4 | DF 40.06
« Reply #1295 on: August 10, 2014, 08:04:07 pm »

If you're like me and can hardly play DF without Dwarf Therapist, while you're waiting for Therapist to be updated for 40.07, you can always go to the project home page, scroll down to the "Buy me a beer!" button and donate whatever you think is appropriate.

I'm not sure what a beer costs in Canadian Dollars, so I just gave $10 CAD. I assume that will cover one or two. :)

Thanks for all the work you've given to us, and for all the enjoyment we've gotten as a result, Splinterz!

   Keith
Logged
Have them killed. Nothing solves a problem quite as effectively as simply having it killed.

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.23.4 | DF 40.06
« Reply #1296 on: August 10, 2014, 08:12:54 pm »

I'm not sure what a beer costs in Canadian Dollars, so I just gave $10 CAD. I assume that will cover one or two. :)
Depends on the beer.  I know you can get $5 pitchers here in the US, though they're usually not very savory...

Tacomagic

  • Bay Watcher
  • Proud Sir Wordy McWordiness at your service.
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.23.4 | DF 40.06
« Reply #1297 on: August 10, 2014, 09:01:21 pm »

If you're like me and can hardly play DF without Dwarf Therapist, while you're waiting for Therapist to be updated for 40.07, you can always go to the project home page, scroll down to the "Buy me a beer!" button and donate whatever you think is appropriate.

I'm not sure what a beer costs in Canadian Dollars, so I just gave $10 CAD. I assume that will cover one or two. :)

Thanks for all the work you've given to us, and for all the enjoyment we've gotten as a result, Splinterz!

   Keith

Done and done.  I imagine new versions of DF increase the beer supply significantly.
Logged

majiin

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.23.5 | DF 40.07
« Reply #1298 on: August 11, 2014, 09:19:02 am »

Just did a quick test from current git source, and it works with 40.07 (linux). Great work splinterz!
Thanks!
« Last Edit: August 11, 2014, 09:33:33 am by majiin »
Logged

crossmr

  • Bay Watcher
    • View Profile
    • Jeonsa
Re: Dwarf Therapist (Maintained Branch) v.23.5 | DF 40.07
« Reply #1299 on: August 11, 2014, 09:42:12 am »

am I blind or do I not see recover wounded on the labours full tab?
Logged

splinterz

  • Bay Watcher
    • View Profile
    • Dwarf Therapist Branch
Re: Dwarf Therapist (Maintained Branch) v.23.5 | DF 40.07
« Reply #1300 on: August 11, 2014, 10:17:21 am »

am I blind or do I not see recover wounded on the labours full tab?
apparently it wasn't added to the full view. that's what i get for blind copy/pasting i suppose... uploading a fix..

splinterz

  • Bay Watcher
    • View Profile
    • Dwarf Therapist Branch
Re: Dwarf Therapist (Maintained Branch) v.23.5 | DF 40.07
« Reply #1301 on: August 11, 2014, 10:31:08 am »

Just did a quick test from current git source, and it works with 40.07 (linux). Great work splinterz!
Thanks!
thanks for the confirmation! oh it's all due to those df-structure guys, they had things updated crazily fast!

ptb_ptb

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.23.5 | DF 40.07
« Reply #1302 on: August 11, 2014, 11:00:00 am »

I 'bought a beer'. Who does the beer go to? Splinterz and/or the 'df-structure guys'?
Logged
()==[:::::::::::::>

ResMar

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.23.5 | DF 40.07
« Reply #1303 on: August 11, 2014, 11:16:10 am »

am I blind or do I not see recover wounded on the labours full tab?
apparently it wasn't added to the full view. that's what i get for blind copy/pasting i suppose... uploading a fix..

Yeah, my bad. I forgot this labor existed, tbh.
Logged
ヽ(´ー`)┌[>゜))))彡]   Dwarf Therapist User Guide

OzoneGrif

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.23.5 | DF 40.07
« Reply #1304 on: August 11, 2014, 11:21:44 am »

Hi everybody. Dwarf Therapist really is a marvel. I don't know how I could play without it. I'll donate a few bucks soon :)

I just found a little problem with the Weapon & Shield indicators in the Military tab, for Squad members.
The indicators often says weapons and shields are missing while they aren't : I can see them in the dwarves inventory.

This is just it. Otherwise it works like a charm! Thank you for your amazing efforts to support DF. 8)
Logged
Pages: 1 ... 85 86 [87] 88 89 ... 222