Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 194 195 [196] 197 198 ... 222

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

Heretic

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #2925 on: February 23, 2017, 10:07:19 am »

One question...
That about using Qt Localization system in Therapist?
If it would be done, I can make russian localization really easy and some other players can make it for other languages.
« Last Edit: February 23, 2017, 10:43:13 am by Heretic »
Logged

Heretic

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #2926 on: February 24, 2017, 03:54:25 am »

Okey.... in other key... I'm know Qt framework, nooby newbie in assembler and reaally wants to help with 64x bit layouts.
Where can I to read some devdocs or something that can help me to start?
Logged

orost

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #2927 on: February 24, 2017, 08:54:26 pm »

I think someone was working on 64-bit Windows support, but I don't know if there's a build anywhere.

I'm not aware of any issues that would prevent my branch from working on Windows, as long as a suitable memory layout is provided. (but I haven't tried it, so it *probably* doesn't work.)

I tried building on Windows and it fails on dfinstance.cpp:

Code: [Select]
D:/msys64/home/szymon/Dwarf-Therapist/src/dfinstance.cpp: In static member function 'static DFInstance* DFInstance::newInstance()':
D:/msys64/home/szymon/Dwarf-Therapist/src/dfinstance.cpp:127:34: error: invalid new-expression of abstract class type 'DFInstanceWindows'
     return new DFInstanceWindows();
                                  ^
In file included from D:/msys64/home/szymon/Dwarf-Therapist/src/dfinstance.cpp:60:0:
D:/msys64/home/szymon/Dwarf-Therapist/src/dfinstancewindows.h:33:7: note:   because the following virtual functions are pure within 'DFInstanceWindows':
 class DFInstanceWindows : public DFInstance {
       ^~~~~~~~~~~~~~~~~
In file included from D:/msys64/home/szymon/Dwarf-Therapist/src/dfinstance.cpp:24:0:
D:/msys64/home/szymon/Dwarf-Therapist/src/dfinstance.h:137:19: note:    virtual USIZE DFInstance::write_string(VIRTADDR, const QString&)
     virtual USIZE write_string(VIRTADDR addr, const QString &str) = 0;
                   ^~~~~~~~~~~~
CMakeFiles/DwarfTherapist.dir/build.make:302: recipe for target 'CMakeFiles/DwarfTherapist.dir/src/dfinstance.cpp.obj' failed
make[2]: *** [CMakeFiles/DwarfTherapist.dir/src/dfinstance.cpp.obj] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/DwarfTherapist.dir/all' failed
make[1]: *** [CMakeFiles/DwarfTherapist.dir/all] Error 2
Makefile:105: recipe for target 'all' failed
make: *** [all] Error 2

g++ 6.3 on MSYS2
Logged

Hello71

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #2928 on: February 24, 2017, 09:04:35 pm »

I think someone was working on 64-bit Windows support, but I don't know if there's a build anywhere.

I'm not aware of any issues that would prevent my branch from working on Windows, as long as a suitable memory layout is provided. (but I haven't tried it, so it *probably* doesn't work.)

I tried building on Windows and it fails on dfinstance.cpp:

Code: [Select]
D:/msys64/home/szymon/Dwarf-Therapist/src/dfinstance.cpp: In static member function 'static DFInstance* DFInstance::newInstance()':
D:/msys64/home/szymon/Dwarf-Therapist/src/dfinstance.cpp:127:34: error: invalid new-expression of abstract class type 'DFInstanceWindows'
     return new DFInstanceWindows();
                                  ^
In file included from D:/msys64/home/szymon/Dwarf-Therapist/src/dfinstance.cpp:60:0:
D:/msys64/home/szymon/Dwarf-Therapist/src/dfinstancewindows.h:33:7: note:   because the following virtual functions are pure within 'DFInstanceWindows':
 class DFInstanceWindows : public DFInstance {
       ^~~~~~~~~~~~~~~~~
In file included from D:/msys64/home/szymon/Dwarf-Therapist/src/dfinstance.cpp:24:0:
D:/msys64/home/szymon/Dwarf-Therapist/src/dfinstance.h:137:19: note:    virtual USIZE DFInstance::write_string(VIRTADDR, const QString&)
     virtual USIZE write_string(VIRTADDR addr, const QString &str) = 0;
                   ^~~~~~~~~~~~
CMakeFiles/DwarfTherapist.dir/build.make:302: recipe for target 'CMakeFiles/DwarfTherapist.dir/src/dfinstance.cpp.obj' failed
make[2]: *** [CMakeFiles/DwarfTherapist.dir/src/dfinstance.cpp.obj] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/DwarfTherapist.dir/all' failed
make[1]: *** [CMakeFiles/DwarfTherapist.dir/all] Error 2
Makefile:105: recipe for target 'all' failed
make: *** [all] Error 2

g++ 6.3 on MSYS2

haha, I was too eager removing the const refs. fixed that particular issue.
Logged

DeDeRon

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #2929 on: February 25, 2017, 03:46:10 am »

linux, 32 bit

Spoiler (click to show/hide)

Hello71

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #2930 on: February 25, 2017, 08:55:55 am »

linux, 32 bit

Spoiler (click to show/hide)

why are you building 64-bit version on 32-bit machine
Logged

orost

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #2931 on: February 25, 2017, 09:16:13 am »

Further on win64

Code: [Select]
[ 97%] Building CXX object CMakeFiles/DwarfTherapist.dir/src/dfinstancewindows.cpp.obj
D:/msys64/home/szymon/dt/src/dfinstancewindows.cpp:39:27: fatal error: memorysegment.h: No such file or directory
 #include "memorysegment.h"

That header doesn't exist and isn't referred to anywhere else, so I assumed it's a stray import and removed it. After that, there are several problems, most but not all relating to wide strings. I hacked it to work (well, launch, I don't have a memory layout to actually test it.) Here is the diff. It is not a patch, I don't really know what I'm doing (in particular I commented out the entirety of enumWindowsProc, because it calls and doesn't find get_last_error and I don't know what that's supposed to be), but hopefully it'll be helpful in actually fixing it.

Spoiler (click to show/hide)
Logged

DeDeRon

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #2932 on: February 25, 2017, 09:20:46 am »

why are you building 64-bit version on 32-bit machine
because i  couldnt find any information that your fork is 64-bit only. updating the readme (including new build instructions) would probably be a good idea.

veantur

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #2933 on: February 26, 2017, 03:41:24 am »

I wasnt playing df now for a very long time and a lot of changed
what im missing for the latest df version is dwarf therapist
What is the status of dwarf therapist is it chanceled?
Logged

orost

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #2934 on: February 26, 2017, 04:35:36 am »

I made an actual attempt to fix Windows support, and while I didn't get it working and probably can't, I think I made some useful progress.

Here is a summary of what I did. Unless noted otherwise the changes were made to dfinstancewindows.cpp

* I removed a stray include of non-existent memorysegment.h
* Wide strings were used in several places, even though the API functions it uses use regular strings. I changed those to regular strings.
* There were a handful of incorrect types (such as const uint instead of VIRTADDR) and missing casts.
* I redefined PID from int to DWORD in dfinstance.h
* enumWindowsProc was completely broken - I think it had never been finished. I fixed it. This fixed finding DwarfFortress.exe and determining its PID.
* I made DFInstanceWindows::get_last_error static to help with the above. I don't think it makes any difference to anything else. It looks to me like it could and maybe should be a free function, but I didn't want to make bigger changes than necessary.
* DFInstanceWindows::calculate_checksum generates checksums from the .exe timestamp, and it was confused by 64-bit timestamps in 64-bit executables, creating checksums padded with 32 bits worth of zeros (e.g. 0x00000000abcdefab instead of 0xabcdefab) which falsely tested as not equal to normal checksums. I adjusted it to skip the zeros. It would probably be better to fix the presentation and comparison logic for checksums but I couldn't figure it out.
* I added error logging to memory reads. A debugging aid, but I see no reason not to include it.

The current state is that DT builds, launches, connects to DF, picks the correct memory map, but disconnects immediately after that after a memory read fails. I'm afraid I am not able to take this any further. Hopefully this is of some use.

Diff:

Spoiler (click to show/hide)
Logged

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #2935 on: February 26, 2017, 08:39:31 pm »

I wasnt playing df now for a very long time and a lot of changed
what im missing for the latest df version is dwarf therapist
What is the status of dwarf therapist is it chanceled?

You should be able to make DT work for either 43.03 or 43.05.

It depends on your OS:
windows - 32 bit 43.05 DF, then download DT 37.0 https://github.com/splintermind/Dwarf-Therapist and add 43.05 memory layout from the share folder
osx - 32 bit 43.03 DF, then download DT 37.0 as above and add 43.03 memory layout
linux, either - 32 bit 43.03 DF then as above 43.03 memory layout
              or - 64 bit 43.05 DF then make from Hello71 fork - instructions http://www.bay12forums.com/smf/index.php?topic=122968.msg7321808#msg7321808

splinterz who did fantastic work for so long has gone walkabout so we do not know what the future holds...  :-\
Logged

Icefire2314

  • Bay Watcher
  • Programmer and Space Enthusiast
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #2936 on: March 02, 2017, 08:04:07 pm »

Has there been any progress on getting it working for .43.05? I wanted to play again but everytime I remember the old days of manually assigning labor and I decide not to
Logged
"ERUTH PULL THE DAMN LEVER THE ZOMBIES ARE ABOUT TO GET INSIDE!"
"zzz"
BAY 12 MINI CITY: http://bay-12.myminicity.com/

TV4Fun

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #2937 on: March 03, 2017, 07:14:40 pm »

Did something change in a recent version of either DF or DT? I know it used to be possible to connect when on the prepare for embark screen and see the attributes of your dwarves, which I found very useful in deciding who to assign what skill. This doesn't seem to work anymore though.
Logged

se5a

  • Bay Watcher
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #2938 on: March 04, 2017, 03:55:10 am »

new instructions:

Code: [Select]
git clone https://github.com/Hello71/Dwarf-Therapist.git
mkdir Dwarf-Therapist-build
cd Dwarf-Therapist-build
cmake ../Dwarf-Therapist
ln -s ../Dwarf-Therapist/share .
make -j$(nproc)
./DwarfTherapist

if you get an error like the following:
Code: [Select]
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake:26 (find_package):
  Could not find a package configuration file provided by "Qt5Qml" with any
  of the following names:

    Qt5QmlConfig.cmake
    qt5qml-config.cmake

  Add the installation prefix of "Qt5Qml" to CMAKE_PREFIX_PATH or set
  "Qt5Qml_DIR" to a directory containing one of the above files.  If "Qt5Qml"
  provides a separate development package or SDK, be sure it has been
  installed.

Then try:
Code: [Select]
sudo apt-get install qt5-qmake qtbase5-dev qtbase5-dev-tools qtdeclarative5-dev # Qt 5if the error mentions QT4 try:
Code: [Select]
sudo apt-get install qt4-qmake libqt4-dev # Qt 4
then try the cmake ../Dwarf-Therapist again.

This is in the build instructions for linux in spinters fork. 
Logged

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: Dwarf Therapist (Maintained Branch) v.37.0 | DF 42.06
« Reply #2939 on: March 04, 2017, 05:58:05 pm »

Did something change in a recent version of either DF or DT? I know it used to be possible to connect when on the prepare for embark screen and see the attributes of your dwarves, which I found very useful in deciding who to assign what skill. This doesn't seem to work anymore though.

Works for me on DF43.05 Linux 64bit.
Are you able to connect and use DT once properly embarked?
Logged
Pages: 1 ... 194 195 [196] 197 198 ... 222