Hi Dino,

All the DLLs are in the Build directory. Everything runs great if the
CWD is the folder containing
the EXE. If you try and run it from another folder things go wrong
(File Not Found Exception).

I've posted a basic repro on my Skydrive
http://cid-1c5b93086198f54e.skydrive.live.com/self.aspx/Public/hello.zip

cd hello\build\ and die.exe will run
cd hello and run .\build\die.exe and it will fail

Thanks,
Davy Mitchell

On Mon, Apr 6, 2009 at 4:18 PM, Dino Viehland <di...@microsoft.com> wrote:
> What DLLs you want to be loaded?  The reason I ask is that .NET assembly
> loading doesn’t really work on the basis of the current working directory –
> instead it looks at the app base which by default is where your EXE is
> located.  We do modify sys.path so that IronPython can load things outside
> of the app base but I wouldn’t suggest pushing this too far.  Instead I’d
> propose doing what a normal build process does and copy the DLLs into the
> build directory.
>
>
>
> From: users-boun...@lists.ironpython.com
> [mailto:users-boun...@lists.ironpython.com] On Behalf Of Davy Mitchell
> Sent: Sunday, April 05, 2009 3:55 AM
> To: Discussion of IronPython
> Subject: [IronPython] Modifying The PYC Stub EXE
>
>
>
> Hi Folks,
>
>
>
> I am looking to modify the EXE stub generated by PYC so that it will set the
> current working directory to the location of the EXE
>
> before loading its assemblies.
>
>
>
> The problem I am having is I build my EXE to a sub-folder called BUILD. If I
> call it in the form .\build\die.exe then it can't find the DLLs.
>
> This can be worked around with shortcuts setting the working dir etc but
> having this option in code in PYC would be useful.
>
>
>
> Forgive me if I am very very muddled up about something :-)
>
>
>
> Thanks,
>
> Davy Mitchell
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to