Re: [PyInstaller] Programs packed by pyinstaller2.0 can't start others on detached mode on windows.

42 views
Skip to first unread message

Martin Zibricky

unread,
Aug 23, 2012, 6:46:48 AM8/23/12
to pyins...@googlegroups.com
jun xie píše v St 22. 08. 2012 v 22:36 -0700:
> Is there something I missed? Something like process environments goes
> wrong?

I suppose you use --onefile mode. Does --onedir mode work for you?



jun xie

unread,
Aug 23, 2012, 10:38:07 AM8/23/12
to pyins...@googlegroups.com
Yes, it's packed with --onfile option. 
I guess the subprocess inherit some values from parent, but it's not correct for extracting and making its runtime.

Accurately, one of them is planed to do upgrading job for all files, in --onedir mode, some files can't replace because still being used,
 running independently with --onefile make sure all files are replaced successful. Like compile as dynamic or static in C/C++. Am I right?

Is there a way to fix the problem?


在 2012年8月23日星期四UTC+8下午6时46分48秒,Martin Z写道:

Don Dwiggins

unread,
Aug 27, 2012, 11:48:21 AM8/27/12
to pyins...@googlegroups.com

On 8/22/12 10:36 PM, jun xie wrote:
> I have tow programs packed by pyinstaller2.0 running on windows, and I want one of them start by another and detach from it.
>
> I used this code to start a detached subprocess:
>
> subprocess.Popen(command, stdin=None, stdout=None, stderr=None, close_fds=True,
> creationflags=0x00000008)
>
> It works well when call every program from a python scripy, and call a normal program from program which pyinstaller packed, but it doesn't work when call a pyinstaller packed one from other programs pyinstaller packed.

This sounds like it might be related to
http://www.pyinstaller.org/ticket/569, which I submitted. As the
description says, I worked around it by "merging" two branches of
PyInstaller in my working copy. If it does look like what you're
experiencing, add a comment on the ticket.

--

Don Dwiggins
Advanced Publishing Technology


jun xie

unread,
Aug 27, 2012, 10:38:31 PM8/27/12
to pyins...@googlegroups.com
Yes, I think it's the same bug. Is there quick way to fix it? 
The Pyinstaller Team will fix it in 2.1 branch, and finish all of 2.1 at 12/31 on schedule. It's bit long :-(


在 2012年8月27日星期一UTC+8下午11时48分21秒,DwigAtWork写道:

Don Dwiggins

unread,
Aug 28, 2012, 2:01:26 PM8/28/12
to pyins...@googlegroups.com
On 8/27/12 7:38 PM, jun xie wrote:
Yes, I think it's the same bug. Is there quick way to fix it? 
The Pyinstaller Team will fix it in 2.1 branch, and finish all of 2.1 at 12/31 on schedule. It's bit long :-(

Well, here's a couple of things to try:
  • Get the "fix_merge_case" branch of PyInstaller, and use that for your builds.  If that works for you, fine!

  • If not, get the "develop" branch (leave the fix_merge_case branch in place for now).  Find the folder support/loader/Windows-32bit in fix_merge_case; copy that to develop, overwriting the files there.  Now try your builds again using "develop".

Good luck!

Martin Zibricky

unread,
Aug 28, 2012, 7:01:32 PM8/28/12
to pyins...@googlegroups.com
jun xie píše v Po 27. 08. 2012 v 19:38 -0700:
> Yes, I think it's the same bug. Is there quick way to fix it? The
> Pyinstaller Team will fix it in 2.1 branch, and finish all of 2.1 at
> 12/31 on schedule. It's bit long :-(

Yes it is. But you could for pyinstaller fix it in a branch and create a
merge request.

jun xie

unread,
Aug 28, 2012, 10:33:31 PM8/28/12
to pyins...@googlegroups.com
Yes, it's works using the the fix_merge_case. Thank you very much.

I'll try to make a patch later.   :-D

在 2012年8月29日星期三UTC+8上午2时01分39秒,DwigAtWork写道:

Martin Zibricky

unread,
Aug 29, 2012, 10:54:30 AM8/29/12
to pyins...@googlegroups.com
jun xie píše v Út 28. 08. 2012 v 19:33 -0700:
> Yes, it's works using the the fix_merge_case. Thank you very much.
>
> I'll try to make a patch later. :-D

Hi, I did some changes and recompiled Windows-32bit bootloader. Please
try latest dev version if it fixes your issue.

jun xie

unread,
Aug 29, 2012, 11:28:05 AM8/29/12
to pyins...@googlegroups.com
It works. Thanks a lot. :-D

在 2012年8月29日星期三UTC+8下午10时54分36秒,Martin Z写道:

Giovanni Bajo

unread,
Sep 2, 2012, 5:49:12 PM9/2/12
to pyins...@googlegroups.com
What changes exactly?

Should I merge the fix_merge_case branch?
--
Giovanni Bajo :: ra...@develer.com
Develer S.r.l. :: http://www.develer.com

My Blog: http://giovanni.bajo.it






Martin Zibricky

unread,
Sep 3, 2012, 3:39:40 AM9/3/12
to pyins...@googlegroups.com
Giovanni Bajo píše v Ne 02. 09. 2012 v 23:49 +0200:
> Il giorno 29/ago/2012, alle ore 16:54, Martin Zibricky <mzibr....@gmail.com> ha scritto:
>
> > jun xie píše v Út 28. 08. 2012 v 19:33 -0700:
> >> Yes, it's works using the the fix_merge_case. Thank you very much.
> >>
> >> I'll try to make a patch later. :-D
> >
> > Hi, I did some changes and recompiled Windows-32bit bootloader. Please
> > try latest dev version if it fixes your issue.
>
>
> What changes exactly?

The following changes:

- before loading python library doing
pyi_unsetenv('PYTHONHOME')

- after loading python library calling function
PI_Py_SetPythonHome()

>
> Should I merge the fix_merge_case branch?

No, no need to merge anything.

Hartmut, is this branch still useful?




Hartmut Goebel

unread,
Sep 3, 2012, 5:11:17 PM9/3/12
to pyins...@googlegroups.com
Am 03.09.2012 09:39, schrieb Martin Zibricky:
Giovanni Bajo píše v Ne 02. 09. 2012 v 23:49 +0200:
Should I merge the fix_merge_case branch?
No, no need to merge anything.

Hartmut, is this branch still useful?

Well, this branch consists of a single commit y Giovanni:

    Fix double inclusion of same file with different case in MERGE().
   
    MERGE() was not realizing that, on Windows, a file might be the same
    even if the case does not match

I did not follow the development close enough the last weeks to decide whether this is still required. But this commit looks useful and correct.

--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP

Goebel Consult
http://www.goebel-consult.de

Monatliche Kolumne: http://www.cissp-gefluester.de/2012-04-compliance-bringt-keine-sicherheit
Blog: http://www.goebel-consult.de/blog/20050620

Goebel Consult ist Mitglied bei http://www.7-it.de/

Reply all
Reply to author
Forward
0 new messages