Changing library paths for certain applications
  • Just looking around
    Posts: 5 from 2014/6/4
    Greetings from a fellow MOS enthusiast,

    to make it short, I'm trying to get certain games to search for their libraries in different locations than the default SYS:Libs directory.

    I know how to do this on Mac OS X using the otool -L command but i have no idea if this is even possible on MOS.

    I'm asking because i have these games that won't work properly with that lastest version of PowerSDL so i wanted to point them to a fallback directory containing an older version of PowerSDL to fix this.

    any help is appreciated.

    [ Edited by thedoc 22.06.2014 - 13:05 ]
  • »22.06.14 - 15:04
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    pegasos-sigi2
    Posts: 265 from 2006/8/31
    Quote:

    thedoc wrote:
    Greetings from a fellow MOS enthusiast,

    to make it short, I'm trying to get certain games to search for their libraries in different locations than the default SYS:Libs directory.

    I know how to do this on Mac OS X using the otool -L command but i have no idea if this is even possible on MOS.

    I'm asking because i have these games that won't work properly with that lastest version of PowerSDL so i wanted to point them to a fallback directory containing an older version of PowerSDL to fix this.

    any help is appreciated.


    You can put the libs in the dirs of the progs.
    There exists a prority searchpath: progdir -> sys:libs -> mossys:libs
    Spreedy - The spreedsheet editor of MorphOS
    Calimero - Do you know about the new DTP Program for MorphOS ?
  • »22.06.14 - 15:41
    Profile
  • Moderator
    Kronos
    Posts: 2323 from 2003/2/24
    All in all still a dangerous game, as there can allways only be 1 powersdl.library in memory at any given time.
  • »22.06.14 - 15:44
    Profile
  • Just looking around
    Posts: 5 from 2014/6/4
    I've noticed that once a certain version of PowerSDL is loaded by an app, all other apps will use it regardless of its location until you do a reboot so it's obviously been loaded into system memory as default. I was thinking about making a launch script that overwrites the libraries in SYS:Libs with the required version before the game starts but I'm assuming that won't help either since there's already one in the RAM.

    any other ideas?

    is there a command to force a reload/purge of the library caches in MOS?

    [ Edited by thedoc 22.06.2014 - 14:29 ]
  • »22.06.14 - 15:57
    Profile
  • Moderator
    Kronos
    Posts: 2323 from 2003/2/24
    "Avail flush" will remove unused libraries from RAM.
  • »22.06.14 - 16:34
    Profile
  • MorphOS Developer
    itix
    Posts: 1520 from 2003/2/24
    From: Finland
    Quote:

    Kronos wrote:
    "Avail flush" will remove unused libraries from RAM.


    There is flushlib command you can use to flush specific library:

    Ram Disk:> flushlib powersdl.library
    Not found: powersdl.library
    1 + 1 = 3 with very large values of 1
  • »22.06.14 - 16:50
    Profile
  • MorphOS Developer
    itix
    Posts: 1520 from 2003/2/24
    From: Finland
    Quote:

    thedoc wrote:
    I've noticed that once a certain version of PowerSDL is loaded by an app, all other apps will use it regardless of its location until you do a reboot so it's obviously been loaded into system memory as default. I was thinking about making a launch script that overwrites the libraries in SYS:Libs with the required version before the game starts but I'm assuming that won't help either since there's already one in the RAM.



    You can copy libraries to program directory (IIRC local Libs is searched, then executable dir) and use small script to flush libraries before loading game.

    In MorphOS libraries are shared among executables to save memory.

    Btw can you name which apps are not working with the latest PowerSDL? I am aware (being PowerSDL author) I broke hell lot of applications when I updated PowerSDL to the latest SDL core and I have tried to fix issues I created. I'd like to fix it completely but I only use small subset of SDL apps regularly.
    1 + 1 = 3 with very large values of 1
  • »22.06.14 - 16:55
    Profile
  • Just looking around
    Posts: 5 from 2014/6/4
    nice, that flush command seems to work just fine - thanks for the hint.

    As for the bugs - it's mostly just texture load errors - textures not being loaded or only being loaded partially with a grey area at the bottom. Affected games are most of all the Cube engine ports from Yomugi (where most of the textures are missing), Blob Wars (where there's grey areas in the background graphics), FreeDroid (where parts of the droid graphics are missing) and Islands MiniGolf (but those problems might be due to my old Radeon 9000 GPU not being able to handle the graphics engine proplery)

    I'll test more games and see if i can find any more issues.

    PS: I've also noticed the recent tinygl driver also causes some graphical corruption in older games. Would it be possible to exchange it with a version from MOS 2.7 and flush it in the same way?

    [ Edited by thedoc 22.06.2014 - 16:14 ]
  • »22.06.14 - 18:13
    Profile