Topic created on: May 2, 2007 01:47 CDT by gera .
As you may know (or not), I've been using the windows version of IDA on linux using wine for quite a few years now. I've been always so happy with this, that I tried to make everybody around me also use it this way.
A few weeks ago I said that I was able to use most plugins, but I had not tried to make IDA Python work (on wine/Linux). Today, I couldn't sleep, so I tried it. Result: it's working now.
It actually turned out to be simpler than what I thought (I didn't want to have lots of python instalations on my linux though).
steps to repro:
copy python25.dll and msvcr71.dll from a windows box to your IDA directory on wine (~/.wine/drive_c/Program Files/IDA on mine)
install python.plw (ida python plugin) to ~/.wine/drive_c/Program Files/IDA/plugins)
this will be enough to make the plugin load. but it'll complain about missing idc.py, etc.
now you need to place th python directory from IDA python in IDA/python
with this IDA Python will load but complain with errors on init.py. If you load idag.exe from a shell you'll see the following error message on the console:
Traceback (most recent call last):
File "C:\Program Files\IDA\python\init.py", line 17, in <module>
import os, os.path, traceback, warnings
ImportError: No module named os
So, what I did here was to just rename init.py to something else, and create an empty init.py
now, IDA Python will load without errors, and if you bring an IDA Python box (Alt-8 by default), you can try print "hola", and you'll see hola in the text console.
IDA Python is working, but we can't access IDA's features yet... to make a longer story short, just modify 1 line of the original init.py. The line looking:
import sys, os, os.path, traceback, warnings
must now look like:
import sys
sys.path.append('Z:/usr/lib/python2.5')
import os, os.path, traceback, warnings
where Z: is the default wine drive to map all the unix drive, and /usr/lib/python2.5 is where the files for you unix python distro are stored.
et voila! you have IDA Python working on wine/Linux with Windows' IDA version... I love it sooo much!
and of course, this is python, so if you still want to write to IDA's standard output, you can do:
import os
os.write(1,'hola manola!\n')
gera
PS: I'm so happy that I'll zpost to datarescues' forums