Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix everything. #150

Merged
merged 4 commits into from Sep 1, 2014
Merged

Fix everything. #150

merged 4 commits into from Sep 1, 2014

Conversation

Hello71
Copy link
Contributor

@Hello71 Hello71 commented Aug 29, 2014

finally got all this !@#$ tested and working. this almost certainly doesn't compile on OSX, but unless someone wants to send me a Mac as a gift, I'm probably not going to be installing a hackintosh any time soon. @fricy?

@fricy
Copy link

fricy commented Aug 30, 2014

/Users/fricy-build/Github/DwarfTherapist-git/src/dfinstanceosx.mm:88: error: no viable conversion from 'QByteArray' to 'void *'
read_raw(buffer_addr, upper_size, buf);
^~~
/Users/fricy-build/Applications/Qt/Qt5.3.1./5.3/clang_64/lib/QtCore.framework/Headers/qbytearray.h:219: candidate function
operator const char *() const;
^
/Users/fricy-build/Applications/Qt/Qt5.3.1./5.3/clang_64/lib/QtCore.framework/Headers/qbytearray.h:220: candidate function
operator const void *() const;
^
/Users/fricy-build/Applications/Qt/Qt5.3.1./5.3/clang_64/lib/QtCore.framework/Headers/qbytearray.h:410: candidate function
operator QNoImplicitBoolCast() const;
^
/Users/fricy-build/Github/DwarfTherapist-git/inc/dfinstanceosx.h:43: passing argument to parameter 'buffer' here
USIZE read_raw(const VIRTADDR &addr, const USIZE &bytes, void *buffer);
^
/Users/fricy-build/Github/DwarfTherapist-git/src/dfinstanceosx.mm:100: error: return type of out-of-line definition of 'DFInstanceOSX::write_string' differs from that in the declaration
int DFInstanceOSX::write_string(const VIRTADDR &addr, const QString &str) {
^
/Users/fricy-build/Github/DwarfTherapist-git/inc/dfinstanceosx.h:48: previous declaration is here
USIZE write_string(const VIRTADDR &addr, const QString &str);
^
/Users/fricy-build/Github/DwarfTherapist-git/src/dfinstanceosx.mm:176: error: use of undeclared identifier 'readsize'
vm_read_overwrite(m_task, (vm_address_t)addr, bytes, (vm_address_t)buffer, &readsize);
^
/Users/fricy-build/Github/DwarfTherapist-git/src/dfinstanceosx.mm:204: error: use of undeclared identifier 'm_pid'
m_pid = [[application objectForKey:
^
/Users/fricy-build/Github/DwarfTherapist-git/src/dfinstanceosx.mm:207: error: use of undeclared identifier 'm_pid'
LOGI << "Found running copy, pid:" << m_pid << "path:" << m_loc_of_dfexe;
^
/Users/fricy-build/Github/DwarfTherapist-git/src/dfinstanceosx.mm:211: error: use of undeclared identifier 'm_pid'
kern_return_t kret = task_for_pid( current_task(), m_pid, &m_task );
^
/Users/fricy-build/Github/DwarfTherapist-git/src/dfinstanceosx.mm:212: error: use of undeclared identifier 'm_pid'
if (m_pid == 0 || ! (kret == KERN_SUCCESS)) {
^

@Hello71
Copy link
Contributor Author

Hello71 commented Aug 30, 2014

try again

@fricy
Copy link

fricy commented Aug 30, 2014

../DwarfTherapist-git/src/dfinstanceosx.mm:176:5: error: no matching function for call to 'vm_read_overwrite'
vm_read_overwrite(m_task, (vm_address_t)addr, bytes, (vm_address_t)buffer, &bytes_read);
^~~~~~~~~~~~~~~~~
note: candidate function not viable: no known conversion from 'USIZE *' (aka 'unsigned int *') to 'vm_size_t *' (aka 'unsigned long *') for 5th argument
kern_return_t vm_read_overwrite

I fixed this with: L171
-- USIZE bytes_read = 0;
++ vm_size_t bytes_read = 0;

Next one is here:

In file included from ../DwarfTherapist-git/src/dfinstancelinux.cpp:28:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/sys/ptrace.h:94:38: error: unknown type name 'caddr_t'
int ptrace(int _request, pid_t _pid, caddr_t _addr, int _data);
^
../DwarfTherapist-git/src/dfinstancelinux.cpp:33:10: fatal error: 'wait.h' file not found
#include <wait.h>
^

@Hello71
Copy link
Contributor Author

Hello71 commented Aug 30, 2014

dfinstancelinux.cpp shouldn't be included. make sure you're running the right qmake. added a cast.

@fricy
Copy link

fricy commented Aug 30, 2014

qmake /dwarftherapist.pro -r -spec macx-clang CONFIG+=x86_64

@Hello71
Copy link
Contributor Author

Hello71 commented Sep 1, 2014

try building it again?

@fricy
Copy link

fricy commented Sep 1, 2014

Tried building your windows branch, DF2014 branch, even tried adding the weak branch to see if it fixes anything: it still fails at building dfinstancelinux.cpp. Sorry, can't help more, I don't have enough experience to fix these errors. if you instruct me what to do I'm happy to help, but that's all. :(

@Hello71
Copy link
Contributor Author

Hello71 commented Sep 1, 2014

could you join #dwarftherapist on freenode?

@fricy
Copy link

fricy commented Sep 1, 2014

here...

- Rewrite windows loader to use standard Toolhelp32 snapshots instead of
  hardcoding internal Windows structures with GetPebAddress.

- Refactor file-finding code to find_files_list in utils.h.

- Add test for existence of game_data.ini.

- Rewrite read_* functions in favor of passing void * pointers directly
  to read_raw.

- Move enumerate_vector and write_int to DFInstance from the
  platform-specific classes.

- Use more C++ casts instead of C-style casts.
windeployqt.sh automatically traces DLL dependencies and copies the
appropriate files to the build directory for manual execution or packaging.
@splintermind splintermind merged commit e0834b2 into splintermind:DF2014 Sep 1, 2014
@Hello71 Hello71 deleted the windows branch September 2, 2014 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants