Jump to content
simmaster07

[Abandoned] SC4MacInjector - Support Thread

17 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

This mod is no longer supported. See this linked post for more details.

-------------------------------------------------

What is SC4MacInjector?
SC4MacInjector is a mod for Mac copies of SimCity 4 Deluxe that enables the use of dynamic library mods (the equivalent of DLLs on Windows) for Macs. General discussion and development updates are posted in the game framework discoveries thread – this thread serves to consolidate any potential support requests in one purpose-specific place.

General troubleshooting steps
The injector responsible for enabling these mods may be overwritten by game updates or checking game cache integrity in Steam. Try re-running the installer if mods like the extra cheats DLL are suddenly disabled. Also make sure you've obtained the latest version from the STEX.

Reporting issues
One very helpful thing to provide is a detailed installer log. When running the installer, bring up the log:

kxZNBCV.png

Change the detail level to All Logs:

EFiwHVk.png

Then click the Save button on the installer log in the top right corner of the window. Attach this log to your post.

Another extremely helpful thing to provide, if present, is the injection log, which you can find at ~/Documents/SimCity 4/libinjector.log. Attach this too if possible.

Lastly, try to provide a thorough description of your problem, when it started occurring, and what version of the game you use (e.g. Steam, App Store, disc copy).

  • Like 6

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Is there a way to get your sc4fix.dll to run using this? I'm using the AppStore version of the game and I don't think the instructions you used on the steam version for applying the fix are the same as should be used on mine, so I wanted to use this as a workaround. 

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

If one wanted to go about uninstalling, how would one do that? I've tried deleting libinjector.dylib and the .log but then the game wont open (steam launches the launcher but thats as far as it will go). Basically the game won't run unless libinjector.dylib is present. Are there any hidden files or files located elsewhere I need to delete? I do see a SimCity 4 Deluxe Editionsub unix executible file with a date modified the same time and date of the libinjector.dylib. Should I delete this? I see the sub2 file has an earlier date so I'm guessing it was an overwrite and I need to reinstall SimCity 4 via steam?

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    On 9/29/2019 at 3:47 PM, Iodyne said:

    If one wanted to go about uninstalling, how would one do that? I've tried deleting libinjector.dylib and the .log but then the game wont open (steam launches the launcher but thats as far as it will go). Basically the game won't run unless libinjector.dylib is present. Are there any hidden files or files located elsewhere I need to delete? I do see a SimCity 4 Deluxe Editionsub unix executible file with a date modified the same time and date of the libinjector.dylib. Should I delete this? I see the sub2 file has an earlier date so I'm guessing it was an overwrite and I need to reinstall SimCity 4 via steam?

    Right, the sub2 file is the original executable so to uninstall you'd either manually rename sub2 to sub or verify the game files in Steam. I'll probably have to update this mod for Catalina at some point so I'll work on adding a proper uninstall option then.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    This is not working on Catalina (10.15.3) The app was just recently re-released as a 64-Bit App

    • Thanks 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    It could be that the files need recompiling for 64-Bit operation, otherwise Catalina/The updated version works differently. I suspect @simmaster07 would be better placed to answer this.

    • Like 2

    Head over to my Lot and Mod Shack to keep abreast of my latest developments.

    Do you like custom textures, but don't like all the work involved creating them?, take a look at the Texture Automation options here. Change the look and feel of your transit networks, with the minimum of effort, for example customised versions of my Sidewalk NAM (SWN) and Terrain Grass NAM (TGN) mods, and much more besides.

    New to the NAM? Check out my tutorials on YouTube. Latest upload: How to: RHW - MHO Roundabout Interchanges. (Nov 25).

    p.s. - I'm MGB over on SC4D and a member of the NAM team.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Yep, I don't use my Mac much so I haven't kept up with Catalina breaking the 32-bit plugins. I'll give it a look; hopefully I can keep backwards compatibility with old macOS versions, otherwise I'll have to do Catalina-specific releases :/

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Hello - I just tried to install this on my game and now the game won't open at all. Any idea what I might be doing wrong @simmaster07? My log is attached. And I have not downloaded Catalina. Many thanks!

    libinjector.log

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Hi, @simmaster07! I tried installing this with a Mac App Store version of "SimCity™4 Deluxe Edition.app", on my iMac running macOS Mojave 10.14.6. Now the app won’t run. I even went so far as to disable System Integrity Protection to see what was up. I’ve attached the error message I received, "Could not load libinjector for SC4 / symbol GZCOM not found".

    I was under the impression that SC4MacInjector and some plugin .so files would work based on the description from the SC4MacInjector download page on this website (link below). However when I dug into your GitHub page (https://github.com/nsgomez/sc4macinjector) you noted "The Mac App Store release will not work as it is not Aspyr's port but a Wineskin wrapper."

    Would love this to work — and barring that, the ability to easily uninstall. Also, just some verbiage about whether System Integrity Protection is getting in the way at all would be helpful for future users.

    Thanks for any clarification about all this. Seems like quite a fun tool!

     

     

    Error.png

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Hey everyone, bad news -- I took a look at these errors and it looks like SC4MacInjector is dead. 🙃

    Three reasons for that:

    1. macOS Catalina enforcing 64-bit app execution. SC4MacInjector only targeted 32-bit since SC4 used to only run as a 32-bit app. This actually isn't the worst thing since normally I'd be able to rebuild it in 64-bit mode, but this is where the next two issues come into play.
    2. Aspyr stripping code symbols from the game. It's a bit of an open secret that the Mac versions of the game were built in a way that kept the function names from the source code intact. It's not full source code, but it's enough to do some tricks like hooking functions by name. That's no longer the case, so there's no easy way to tell macOS to "hook this cGZCOMLibrary::Load function and redirect it to my loader." Instead I'd have to disassemble the whole game and figure out where that function resides in memory, which is exponentially more effort. But even if I did that:
    3. Apple enforcing app hardening and notarization. Any app distributed outside the Mac App Store now must be notarized, which means Aspyr and other developers need to take additional steps to verify that the app is authentic and not malicious. One of those requirements is enabling "hardened runtime," which tries to improve app security by disabling things like code injection. But SC4MacInjector is a code injector by definition, so Catalina has effectively killed code-level modding on the Mac.

    The only possible solution would be to tell people to downgrade to Mojave and also downgrade their game to 32-bit, which I don't see as a tenable solution. I'm just going to archive the GitHub repo and take down the STEX entry.

    • Like 3
    • Sad 2
    • Thanks 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    10 hours ago, DexterDing said:

    How can I still download this file?

    I recommend to not so. But for purpose of reference, here's the link:

    and the source code can be found at https://github.com/nsgomez/sc4macinjector.

    Both are in archive mode and unsupported. So, no expect to update and be supported.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    So there's no way to use mods in the base form of DLLs like Extra Cheats anymore?

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    Just now, Anthracite said:

    So there's no way to use mods in the base form of DLLs like Extra Cheats anymore?

    That is correct. The 64 bit version of the game (and the newer versions of the Mac OS) completely preclude the DLLs from being injected.

    • Like 1
    • Thanks 1

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections