06 October 2016

Python 3.5.2 on XP

Got another request for PyGI AIO on Python 3.5 (and 3.6), with my previous attempt using MinGW-W64 to target UCRT failed. I'm considering to switch entirely to VS2015 for PyGI 3.22 (thanks to Fan for keep  VS project files up-to-date). However the idea of using VS2015 while online put me off.. instead I want to use EnterpriseWDK which I can confirm by compiling libintl that it does linked to vcruntime140.dll (which only contain basic support functions) with the rest probably static linked instead using those API-MS-WIN-CRT*.dll forwarder like python 3.5 do. Even if thats okay, PyGI with VS2015 will be no more that half of current packages as many still gcc oriented.

While tinkering on that I got Python 3.5.2 running on XP :-) with the help from Wine I put the fake kernel32.dll between python35.dll and the real kernel. I put it on github here https://github.com/tumagonx/xompie/

Two problem though:

0. Unlike Python 3.5.0rc which "allow" installation, 3.5.2 wont do this XP. so I use preinstalled files from Win10.

1. Apparently Python using incomplete manifest for its executables:
    
trustinfo

    supposedly:
   
trustinfo xmlns="urn:schemas-microsoft-com:asm.v3"

    while this is ignored safely in later Windows, XP do choked-up saying "application configuration is incorrect"

2. Then, there is path issue where tcl unable to find its libraries in the usual "tcl" subdirectory and I have to move them to "lib" subdirectory (mixed with python). Might had to do with transplanted Wine's GetFinalPathNameByHandleW? dunno


1 comment:

  1. Great work as always :) Regarding xompie subsysver issue, we can use binary patch as described here: http://www.tripleboot.org/?p=423, or use hollow process as MITM you mentioned on github. For runnable POC here: https://www.autoitscript.com/forum/topic/99412-run-binary/
    Both method tested works for luvi 2.7.5 32bit binaries (https://github.com/luvit/luvi/releases)

    ReplyDelete