Ignore:
Timestamp:
05/09/06 05:56:05 (18 years ago)
Author:
rchin
Message:
  • Updated to new mach_inject with support for x86
  • Updated nib files to 10.2+ format so that future updates to the f-script framework won't break fsa
  • Adjusted some code to work with the new x86 mach_inject (sends an additional argument)
  • Updates code to work with newer defines in cctools
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cocoa/F-Script Anywhere/Source/SCPatch/SCPatchController/SCPatchController.cpp

    r153 r217  
    1717//-------------------------------------------------------------------------------------------------------------
    1818OSErr                           SCOSErrFrom_mac_err(mach_error_t error) {
    19         return (error & err_mac) ? (err & ^err_mac) : noErr;
     19        return (error & err_mac) ? (err_mac) : noErr;
    2020}
    2121
     
    323323                        if(err == noErr)
    324324                                error = InjectPatches(psn, params);
    325                        
    326325                        free(params);
    327326                }
    328327                CFRelease(str);
    329328        }
     329
    330330        if (error != err_none) return error;
    331331        else return mac_err(err);
     
    436436        // Find the loader
    437437        CFURLRef loaderURL = NULL;
     438#if defined(__ppc__) || defined(__ppc64__)
    438439        if(!err)
    439440                if((loaderURL = CFBundleCopyResourceURL(mBundle, CFSTR("SCPatchLoader"), CFSTR("bundle"), NULL)) == NULL)
    440441                        err = err_couldnt_find_injection_bundle;
     442#else
     443        if(!err)
     444                if((loaderURL = CFBundleCopyResourceURL(mBundle, CFSTR("SCPatchLoader-intel"), CFSTR("bundle"), NULL)) == NULL)
     445                        err = err_couldnt_find_injection_bundle;
     446#endif 
    441447
    442448#if 0
     
    483489                fprintf(stderr, "Patcher got error %d\n", err);
    484490        }
    485        
     491
    486492        //      Clean up.
    487493        if(loaderURL)
Note: See TracChangeset for help on using the changeset viewer.