JupiterCrash has asked for the wisdom of the Perl Monks concerning the following question:

I am using ActiveState's PerlApp program to compile a simple script which coincidentally installs ActiveState's perl msi and some modules in various ways.

The perl install gets cut off on systems where perl already exists, because my PerlApp generated executable is loading perl58.dll, which the install wants to overwrite.

The 'exclude perl58.dll from executable' was not checked in the build, and obviously for systems where perl does not exist the PerlApp executable I've compiled still runs, so it is clear that it does not need to load the perl58.dll.

However when it exists, it finds it, and loads it instead of using whatever is built into the exe.
Does anyone know if there is some way to STOP it from doing this?? (aside from deleting the dll or including another one somewhere else for it to use.)

Thanks!

Matt
  • Comment on How to make PerlApp NOT use perl58.dll when available

Replies are listed 'Best First'.
Re: How to make PerlApp NOT use perl58.dll when available
by BrowserUk (Patriarch) on Apr 13, 2006 at 17:03 UTC

    If you create file yourapp.cmd containing

    setlocal set path=; yourappX.exe endlocal

    Note: The the renaming of the executable!

    Then when the executable is run, the path will be set to null which will prevent it from looking other places for dll's. Depending on where perlapp expands the files, that should allow the embedded version of perl58.dll to be found.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      BrowserUk,

      I don't understand, but I like the track that you're on. Exactly, I want it to use the embedded dll before any other.

      What is yourapp.cmd and where do you mean for the example code that you've written to be placed? Note that I have been building the exe using the PerlApp gui, if that makes any difference.

      Thanks again.

      Matt

        If your executable would normally be called foo.exe, then instead name it fooX.exe and create a foo.cmd as above (except substitute fooX.exe for yourappX.exe). Distribute both and install them in the same directory.

        When the user types foo, foo.cmd will run; it sets the path to null before running fooX.exe.

        You may have to tweak the strategy by setting the path commensurate with whatever is required by PerlApp. I've never used that so I cannot advise.

        The idea is to prevent the OS searching the path and locatating the wrong copy of the dll. Using a .cmd file is just a simple way of applying the strategy.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
Re: How to make PerlApp NOT use perl58.dll when available
by vkon (Curate) on Apr 13, 2006 at 16:26 UTC
    I beleive this is not perl "decides" to load wrong perl58.dll, but rather OS find wrong perl58.dll within its search algorithm.
    If you have a possibility to make existing perl58.dll to be further in PATH, then do so, although this could be impossible sometimes...

    Also, if the problem exists as you describe, this is probably a chance to file a bug report to PerlApp support team
    I do not know exact details of PerlApp, sorry...

Re: How to make PerlApp NOT use perl58.dll when available
by jdtoronto (Prior) on Apr 13, 2006 at 16:25 UTC
    I suppose the first question would be, "why is this a problem"? I think it is purely due to the order of loading/calling dll's. The OS sees the installed one, not the temporary one you have in your exe.

    Why does it matter?

    jdtoronto