Thanks for all the amazing work on this application!
I did run into a little difficulty compiling the latest release (0.6.12 source) in linux however. Last version was fine but now I get the following. Anybody got a clue?
src/scanner.cpp: In member function ‘void Scanner::find_null_terminated_string()’:
src/scanner.cpp:283:62: error: no matching function for call to ‘qMin(uint, long unsigned int)’
src/scanner.cpp:283:62: note: candidate is:
/usr/include/QtCore/qglobal.h:1194:18: note: template<class T> const T& qMin(const T&, const T&)
src/scanner.cpp: In member function ‘void Scanner::find_number_or_address()’:
src/scanner.cpp:301:62: error: no matching function for call to ‘qMin(uint, long unsigned int)’
src/scanner.cpp:301:62: note: candidate is:
/usr/include/QtCore/qglobal.h:1194:18: note: template<class T> const T& qMin(const T&, const T&)
make: *** [bin/release/scanner.o] Error 1
Thanks again DE!
Yeah, per comment on issue #380 it should be size_t not uint, and I agree. I GOT NINJA'D BY DWARFENGINEER! He's already checked in a fix. LOL. Here's a diff if you want it, otherwise wait for his next release I suppose
Here's a diff patch you can apply:
diff -r 2a186e1e26f6 src/scanner.cpp
--- a/src/scanner.cpp Sat Feb 18 10:14:49 2012 -0600
+++ b/src/scanner.cpp Sat Feb 18 12:19:10 2012 -0600
@@ -280,7 +280,7 @@
QByteArray text = ui->le_null_terminated_string->text().toLocal8Bit();
get_brute_force_address_range(params.start_addr, params.end_addr);
- params.size = qMin((uint)text.size(), sizeof(params.data));
+ params.size = qMin((size_t)text.size(), sizeof(params.data));
memcpy(params.data, text.data(), params.size);
QByteArray needle((const char *)¶ms, sizeof(params));
@@ -298,7 +298,7 @@
QByteArray text = encode(ui->le_find_address->text().
toUInt(&ok, ui->rb_hex->isChecked() ? 16 : 10));
get_brute_force_address_range(params.start_addr, params.end_addr);
- params.size = qMin((uint)text.size(), sizeof(params.data));
+ params.size = qMin((size_t)text.size(), sizeof(params.data));
memcpy(params.data, text.data(), params.size);
QByteArray needle((const char *)¶ms, sizeof(params));
Also, 0.6.12 doesn't include linux memory ini's for 0.34.01 or 0.34.02, so here they are:
0.34.01 ini file:
[info]
checksum=0xa42a074a
version_name=v0.34.01
complete=true
[addresses]
translation_vector=0x095c7bf8
language_vector=0x095c7be0
creature_vector=0x095868ac
dwarf_race_index=0x0956e240
squad_vector=0x095c47b4
[offsets]
word_table=0x001C
[word_offsets]
base=0x0000
noun_singular=0x0004
noun_plural=0x0008
adjective=0x000C
verb=0x0014
present_simple_verb=0x0018
past_simple_verb=0x001C
past_participle_verb=0x0020
present_participle_verb=0x0024
[dwarf_offsets]
first_name=0x0000
nick_name=0x0004
last_name=0x0008
custom_profession=0x003c
profession=0x0040
race=0x0044
flags1=0x008C
flags2=0x0090
sex=0x00A6
id=0x00A8
recheck_equipment=0x0148
current_job=0x0274
states=0x0
souls=0x05e8
labors=0x0604
happiness=0x0694
squad_ref_id=0x06f8
[soul_details]
skills=0x01D4
traits=0x01EC
[job_details]
id=0x0008
on_break_flag=0x0011
sub_job_id=0x0040
[squad_offsets]
id=0x0000
name=0x000C
members=0x0044
[valid_flags_1]
size=1
1\name=Not from around these parts
1\value=0x80000000
[valid_flags_2]
size=1
1\name=Dead. Deceased. An Undwarf!
1\value=0x02000000
[invalid_flags_1]
size=7
1\name=a zombie
1\value=0x00001000
2\name=a skeleton
2\value=0x00002000
3\name=a merchant or diplomat
3\value=0x00000040
4\name=outpost liason
4\value=0x00000800
5\name=an invader or hostile
5\value=0x00020000
6\name=an invader or hostile
6\value=0x00080000
7\name=an invader or hostile
7\value=0x000C0000
[invalid_flags_2]
size=2
1\name="dead, Jim."
1\value=0x00000080
2\name=from the Underworld. SPOOKY!
2\value=0x00040000
And the ini file for 0.34.02 version:
[info]
checksum=0xf4fc8347
version_name=v0.34.02
complete=true
[addresses]
translation_vector=0x095ca018
language_vector=0x095ca000
creature_vector=0x09588ccc
dwarf_race_index=0x09570660
squad_vector=0x095c6bd4
[offsets]
word_table=0x001C
[word_offsets]
base=0x0000
noun_singular=0x0004
noun_plural=0x0008
adjective=0x000C
verb=0x0014
present_simple_verb=0x0018
past_simple_verb=0x001C
past_participle_verb=0x0020
present_participle_verb=0x0024
[dwarf_offsets]
first_name=0x0000
nick_name=0x0004
last_name=0x0008
custom_profession=0x003c
profession=0x0040
race=0x0044
flags1=0x008C
flags2=0x0090
sex=0x00A6
id=0x00A8
recheck_equipment=0x0148
current_job=0x0274
states=0x0
souls=0x05e8
labors=0x0604
happiness=0x0694
squad_ref_id=0x06f8
[soul_details]
skills=0x01D4
traits=0x01EC
[job_details]
id=0x0008
on_break_flag=0x0011
sub_job_id=0x0040
[squad_offsets]
id=0x0000
name=0x000C
members=0x0044
[valid_flags_1]
size=1
1\name=Not from around these parts
1\value=0x80000000
[valid_flags_2]
size=1
1\name=Dead. Deceased. An Undwarf!
1\value=0x02000000
[invalid_flags_1]
size=7
1\name=a zombie
1\value=0x00001000
2\name=a skeleton
2\value=0x00002000
3\name=a merchant or diplomat
3\value=0x00000040
4\name=outpost liason
4\value=0x00000800
5\name=an invader or hostile
5\value=0x00020000
6\name=an invader or hostile
6\value=0x00080000
7\name=an invader or hostile
7\value=0x000C0000
[invalid_flags_2]
size=2
1\name="dead, Jim."
1\value=0x00000080
2\name=from the Underworld. SPOOKY!
2\value=0x00040000
Save the appropriate ini file (You really should be running df 0.34.02, so I'm going to use that) as /path/to/dwarftherapist/etc/memory_layouts/linux/v0.34.01.ini, apply the diff (or make the indicated edits to scanner.cpp yourself) and finish compiling it, and you should have a linux dt that has the unofficial support for linux DF 0.34.02.
HTH!