Ignore:
Timestamp:
Sep 17, 2012, 5:19:47 PM (13 years ago)
Author:
dmik
Message:

kernel32: Add support for custom PE/PEC/W16ODIN paths to ODIN.INI.

This is needed since the RPM package of Odin installs these tools to a
directory which is not the same as the one where kernel32.dll is located.
Together with the fix of the RPM spec (coming later) this fixes the broken
PE and PEC functionality when Odin is installed from RPM.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/wprocess.cpp

    r22010 r22015  
    5858#include <win/ntddk.h>
    5959#include <win/psapi.h>
     60#include <win/options.h>
    6061
    6162#include <custombuild.h>
     
    21172118BOOL InitLoaders()
    21182119{
    2119     sprintf(szPECmdLoader, "%s\\PEC.EXE", InternalGetSystemDirectoryA());
    2120     sprintf(szPEGUILoader, "%s\\PE.EXE", InternalGetSystemDirectoryA());
    2121     sprintf(szNELoader, "%s\\W16ODIN.EXE", InternalGetSystemDirectoryA());
     2120    int len;
     2121
     2122    len = PROFILE_GetOdinIniString(ODINSYSTEM_SECTION, "PEC_EXE", "",
     2123                                   szPECmdLoader, sizeof(szPECmdLoader));
     2124    if (len == 0)
     2125        sprintf(szPECmdLoader, "%s\\PEC.EXE", InternalGetSystemDirectoryA());
     2126
     2127    len = PROFILE_GetOdinIniString(ODINSYSTEM_SECTION, "PE_EXE", "",
     2128                                   szPEGUILoader, sizeof(szPEGUILoader));
     2129    if (len == 0)
     2130        sprintf(szPEGUILoader, "%s\\PE.EXE", InternalGetSystemDirectoryA());
     2131
     2132
     2133    len = PROFILE_GetOdinIniString(ODINSYSTEM_SECTION, "W16ODIN_EXE", "",
     2134                                   szNELoader, sizeof(szNELoader));
     2135    if (len == 0)
     2136        sprintf(szNELoader, "%s\\W16ODIN.EXE", InternalGetSystemDirectoryA());
    21222137
    21232138    return TRUE;
Note: See TracChangeset for help on using the changeset viewer.