#41 Enable x64 build of Console

closed-out-of-date
nobody
None
5
2010-02-08
2009-12-15
Kirill
No

Theses are two patches, required to build x64 version of Console in VS2008.

The first step is to build FreeImage and FreeImage x64. But one of projects has asm instructions not supported on x64 targets. It turns out that FreeImage-x64.patch may have a bug, because it's different from Patch to allow x64 build - ID: 2627052 in FreeImage Patches tracker (https://sourceforge.net/tracker/?func=detail&aid=2627052&group_id=11504&atid=311504)

The only valuable part of the console-x64.patch is the changes to the manifest.

Discussion

  • Kirill
    Kirill
    2009-12-15

    git diff to allow x64 build of FreeImage

     
    Attachments
  • Kirill
    Kirill
    2009-12-15

    git diff to enable x64 in Console.sln for VS2008

     
    Attachments
  • Kirill, what about using the FreeImage patch?

    Cheers,
    Marko

     
  • Ok, no need for FreeImage patch, the latest version has x64 patch included...

     
  • Oh, one more thing... It seems that external manifest file is not needed in Visual Studio... I tried removing it and EXEs have a manifest embedded (both Win32 and x64 builds)

    processorArchitecture attribute is set to amd64 for x64 builds. Is that ok?

    Regards,
    Marko

     
  • Kirill
    Kirill
    2009-12-17

    Marko,

    As of the FreeImage patch, I'm just not sure what is the correct implementation of lrintf - the one that rounds or the one that does not.

    As of the manifest file, I did not want to remove the manifest because you had added it and I'm not so familiar with manifests to make the change. I just made it compatible with x64.

    --
    Kirill.

     

  • Anonymous
    2009-12-31

    I think it may be useful if there were 32-bit and 64-bit versions of the DLL distributed with the 64-bit application and the right version would be chosen depending on the type of a child process. It would allow running 32-bit and 64-bit binaries directly from Console.

    Regards,
    Marek Wróbel

     
  • Marek,

    I was just playing with this and discussing it with Kirill. There are some technical difficulties with injecting 32-bit ConsoleHook.dll from 64-bit Console2.

    Also, since Console2 process and injected ConsoleHook DLL communicate using structures in shared memory, there are currently differnces in some of structure member sizes (e.g. HWND members) that need to be resolved.

    For now, the easiest way to run a 32-bit shell from 64-bit Console is to have it start 64-bit cmd.exe that will run your 32-bit shell (using /C switch)

    Cheers,
    Marko

     
  • Kirill,

    The latest FreeImage lrintf for 64-bit builds rounds the number:

    return (long)((f > 0.0f) ? (f + 0.5f) : (f - 0.5f));

    If I understand the asm 32-bit implementation, rounding depends on the setting in the FPU control register...

     
  • Kirill
    Kirill
    2010-02-08

    • status: open --> closed-out-of-date