.exe success story! (was Re: wxPerl on Strawberry Perl working)

[email protected] (Brett Estrade) Mon, 13 Jan 2025 02:40:15 -0600
Newsgroups perl.wxperl.users
Message-ID <CALSf6fRxLPOxzPggnNf=Guj55Ri_4=d07qqut3DzmNqCghTz8Q@mail.gmail.com>
--000000000000e1cee5062b92663b
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Thank you all who have replied during this. I got "wxpar" to work based on
a clue I got on the PAR::Packer POD which dealt directly with Perl emitted
by wxGlade:

https://metacpan.org/dist/PAR/view/lib/PAR/FAQ.pod#If-I-try-to-compile-my-w=
xGlade-generated-script,-it-doesn't-run.-What's-wrong
?

<https://metacpan.org/dist/PAR/view/lib/PAR/FAQ.pod#If-I-try-to-compile-my-=
wxGlade-generated-script,-it-doesn't-run.-What's-wrong?>If
> I try to compile my wxGlade generated script, it doesn't run. What's wron=
g?
>
*Note:* Is this still a problem?
>
Comment out the line that starts with " unless (caller) ", and compile it
> again. Note that this is considered a bug; clearing the caller stack is a
> development in progress.

Well, yes it is a still a problem! I took care of that at the end of m
"wxGlade.pl," but still had an issue with it not finding Wx::DND (and
others) when I ran the .exe. I think I found the solution to that, also.

In summary, what I did:

   1. installed "Wx::Perl::Packager" (provided "wxpar")
   2. changed "use Wx [:allclasses];' to be just "use Wx"
   3. removed the "unless (caller()) { ..." at the bottom
   4. ran, "wxpar ./wxGlade.pl -o myApp.exe --gui"
   5. "myApp.exe" worked via commandline (powershell) and double-clicking
   in Explorer - I have yet to try it on another Windows machine, but soon =
will

Thanks for all the help, I will keep the list updated with activites or ask
questions as the come.

Cheers,
Brett
On Wed, Jan 8, 2025 at 9:56=E2=80=AFPM Don Peddicord <[email protected]> wro=
te:

> I too have found that PAR can miss some modules. I ended up creating a
> list of required XS modules and all of my application modules explicitly.
> Though I was trying to implement an improved PAR::Packer ( Active State
> product)
>
> Don Peddicord
>
> On Jan 8, 2025, at 4:36=E2=80=AFPM, Ralph Walden via wxperl-users <
> [email protected]> wrote:
>
> =EF=BB=BF
> Some additional notes on installing:
>
> - Ensure that there is no wxwin environment variable set pointing to an
> older or 32-bit version of wxWidgets (e.g., leftover from citrus_perl)
> - If you have gcc installed somewhere else, change the path to
> Strawberry\c\bin before installing
> - If LWP::Protocol::https fails download the two tar files and install
> them from a local directory
> - Building and testing doesn't show progress, and appears to only use a
> single CPU, so it takes a *long* time with no indication that progress is
> being made.
>
> On Saturday, January 4th, 2025 at 12:21 PM, Brett Estrade <
> [email protected]> wrote:
>
> Thank you so much to Johan, I got going with the "quick start" cpanm
> commands.
>
> Yes, they took a while to run, but necessarily so.
>
> Feedback:
>
>    1. I installed Wx::Demo, and it worked - wxperl_demo.pl ran as soon as
>    I tried it, I didn't need to mess with any paths or deal with icon err=
ors
>    2. I got wxGlade 1.1.0 running, but not with Python 3.13 (some kind of
>    *WindowIterator* error, idk); I had to use the latest Python 3.12
>    3. a simple test "wxglade_out.pl" ran just fine also
>    4. wxpar will generate an EXE, but see below for the problem
>    description
>
> Questions:
> I figured out wxpar is available via Wx::Perl::Packager
> <https://metacpan.org/pod/Wx::Perl::Packager>, so I installed that - no
> problems there. My problem comes from the executable that results from
> wxpar. Do any of the following issues sounds familiar?
>
>    - I have to include Wx:: modules explicitly, e.g., wxGlade wants to
>    use EXPORTER tags; but when I run the .exe created by wxpar, it compla=
ins
>    about missing things like Wx::DND, Wx::FS, etc. Is it just a known thi=
ng to
>    have to explicitly declare modules when packaging up to an EXE?
>    - After working through the above issue, the .exe I create will run
>    but it does nothing visible in STDOUT or in the GUI. Using the "--gui"
>    option will cause a process tab to appear in the bottom task bar, but =
then
>    it also goes away without showing anything.
>
> Thanks again, looking forward to getting these issues resolved. In the
> meantime, I will be working on some test applications on the Windows set =
up
> so I build up to creating what I actually have in mind.
>
> Cheers,
> Brett
> --
> This email message is for the sole use of the intended recipient(s) and
> may contain confidential and privileged information. Any unauthorized use
> or disclosure is prohibited. If you are not the intended recipient, pleas=
e
> contact the sender by reply email and destroy all copies of the original
> message. Thank you.
>
>
>

--=20
This email message is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. Any unauthorized use or
disclosure is prohibited. If you are not the intended recipient, please
contact the sender by reply email and destroy all copies of the original
message. Thank you.

--000000000000e1cee5062b92663b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div>Thank you all who have replied durin=
g this. I got &quot;wxpar&quot; to work based on a clue I got on the PAR::P=
acker POD which dealt directly with Perl emitted by wxGlade:</div><div><br>=
</div><div><a href=3D"https://metacpan.org/dist/PAR/view/lib/PAR/FAQ.pod#If=
-I-try-to-compile-my-wxGlade-generated-script,-it-doesn&#39;t-run.-What&#39=
;s-wrong">https://metacpan.org/dist/PAR/view/lib/PAR/FAQ.pod#If-I-try-to-co=
mpile-my-wxGlade-generated-script,-it-doesn&#39;t-run.-What&#39;s-wrong</a>=
?</div><div><br></div><div><blockquote id=3D"gmail-If-I-try-to-compile-my-w=
xGlade-generated-script,-it-doesn&#39;t-run.-What&#39;s-wrong?" class=3D"gm=
ail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,=
204,204);padding-left:1ex"><a href=3D"https://metacpan.org/dist/PAR/view/li=
b/PAR/FAQ.pod#If-I-try-to-compile-my-wxGlade-generated-script,-it-doesn&#39=
;t-run.-What&#39;s-wrong?" class=3D"gmail-anchor"><span class=3D"gmail-fa g=
mail-fa-bookmark gmail-black"></span></a>If I try to compile my wxGlade gen=
erated script, it doesn&#39;t run. What&#39;s wrong? <br></blockquote><bloc=
kquote id=3D"gmail-If-I-try-to-compile-my-wxGlade-generated-script,-it-does=
n&#39;t-run.-What&#39;s-wrong?" class=3D"gmail_quote" style=3D"margin:0px 0=
px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><i>No=
te:</i> Is this still a problem? <br></blockquote><blockquote id=3D"gmail-I=
f-I-try-to-compile-my-wxGlade-generated-script,-it-doesn&#39;t-run.-What&#3=
9;s-wrong?" class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex">Comment out the line that=
 starts with &quot; unless (caller) &quot;, and=20
compile it again. Note that this is considered a bug; clearing the=20
caller stack is a development in progress.</blockquote><p>Well, yes it is a=
 still a problem! I took care of that at the end of m &quot;wxGlade.pl,&quo=
t; but still had an issue with it not finding Wx::DND (and others) when I r=
an the .exe. I think I found the solution to that, also.</p><p>In summary, =
what I did:<br></p><ol><li>installed &quot;Wx::Perl::Packager&quot; (provid=
ed &quot;wxpar&quot;)</li><li>changed &quot;use Wx [:allclasses];&#39; to b=
e just &quot;use Wx&quot;</li><li>removed the &quot;unless (caller()) { ...=
&quot; at the bottom</li><li>ran, &quot;wxpar ./wxGlade.pl -o myApp.exe --g=
ui&quot;</li><li>&quot;myApp.exe&quot; worked via commandline (powershell) =
and double-clicking in Explorer - I have yet to try it on another Windows m=
achine, but soon will<br></li></ol><p>Thanks for all the help, I will keep =
the list updated with activites or ask questions as the come.</p><p>Cheers,=
<br>Brett<br></p></div></div><div class=3D"gmail_quote gmail_quote_containe=
r"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Jan 8, 2025 at 9:56=E2=80=
=AFPM Don Peddicord &lt;<a href=3D"mailto:[email protected]">[email protected]=
m</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin=
:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"=
><div dir=3D"auto">I too have found that PAR can miss some modules. I ended=
 up creating a list of required XS modules and all of my application module=
s explicitly.<div>Though I was trying to implement an improved PAR::Packer =
( Active State product)</div><div><br id=3D"m_-1725428818954285066lineBreak=
AtBeginningOfSignature"><div dir=3D"ltr">Don Peddicord=C2=A0</div><div dir=
=3D"ltr"><br><blockquote type=3D"cite">On Jan 8, 2025, at 4:36=E2=80=AFPM, =
Ralph Walden via wxperl-users &lt;<a href=3D"mailto:[email protected]" =
target=3D"_blank">[email protected]</a>&gt; wrote:<br><br></blockquote>=
</div><blockquote type=3D"cite"><div dir=3D"ltr">=EF=BB=BF<div style=3D"fon=
t-family:Verdana,sans-serif;font-size:14px">Some additional notes on instal=
ling:</div><div style=3D"font-family:Verdana,sans-serif;font-size:14px"><br=
></div><div style=3D"font-family:Verdana,sans-serif;font-size:14px"><span>-=
 Ensure that there is no wxwin environment variable set pointing to an olde=
r or 32-bit version of wxWidgets (e.g., leftover from citrus_perl)</span><d=
iv><span>- If you have gcc installed somewhere else, change the path to Str=
awberry\c\bin before installing</span></div><div><span>- If LWP::Protocol::=
https fails download the two tar files and install them from a local direct=
ory</span></div><div><span>- Building and testing doesn&#39;t show progress=
, and appears to only use a single CPU, so it takes a *long* time with no i=
ndication that progress is being made.</span></div><span></span><br></div><=
div>
        On Saturday, January 4th, 2025 at 12:21 PM, Brett Estrade &lt;<a hr=
ef=3D"mailto:[email protected]" target=3D"_blank">brett.estrade@gmail=
.com</a>&gt; wrote:<br>
        <blockquote type=3D"cite">
            <div dir=3D"ltr"><div>Thank you so much to Johan, I got going w=
ith the &quot;quick start&quot; cpanm commands.</div><div><br></div><div>Ye=
s, they took a while to run, but necessarily so.</div><div><br></div><div>F=
eedback:</div><div><ol><li>I installed Wx::Demo, and it worked - <a href=3D=
"http://wxperl_demo.pl" rel=3D"noreferrer nofollow noopener" target=3D"_bla=
nk">wxperl_demo.pl</a> ran as soon as I tried it, I didn&#39;t need to mess=
 with any paths or deal with icon errors</li><li>I got wxGlade 1.1.0 runnin=
g, but not with Python 3.13 (some kind of <i>WindowIterator</i> error, idk)=
; I had to use the latest Python 3.12</li><li>a simple test &quot;<a href=
=3D"http://wxglade_out.pl" rel=3D"noreferrer nofollow noopener" target=3D"_=
blank">wxglade_out.pl</a>&quot; ran just fine also</li><li>wxpar will gener=
ate an EXE, but see below for the problem description<br></li></ol></div><d=
iv>Questions:</div><div>I figured out wxpar is available via <a href=3D"htt=
ps://metacpan.org/pod/Wx::Perl::Packager" rel=3D"noreferrer nofollow noopen=
er" target=3D"_blank">Wx::Perl::Packager</a>, so I installed that - no prob=
lems there. My problem comes from the executable that results from wxpar. D=
o any of the following issues sounds familiar?<br></div><div><ul><li>I have=
 to include Wx:: modules explicitly, e.g., wxGlade wants to use EXPORTER ta=
gs; but when I run the .exe created by wxpar, it complains about missing th=
ings like Wx::DND, Wx::FS, etc. Is it just a known thing to have to explici=
tly declare modules when packaging up to an EXE?</li><li>After working thro=
ugh the above issue, the .exe I create will run but it does nothing visible=
 in STDOUT or in the GUI. Using the &quot;--gui&quot; option will cause a p=
rocess tab to appear in the bottom task bar, but then it also goes away wit=
hout showing anything.</li></ul><div>Thanks again, looking forward to getti=
ng these issues resolved. In the meantime, I will be working on some test a=
pplications on the Windows set up so I build up to creating what I actually=
 have in mind.</div><div><br></div><div>Cheers,<br></div><div>Brett<br></di=
v></div><span class=3D"gmail_signature_prefix">-- </span><br><div class=3D"=
gmail_signature" dir=3D"ltr"><div dir=3D"ltr">This email message is for the=
 sole use of the intended recipient(s) and may contain confidential and pri=
vileged information. Any unauthorized use or disclosure is prohibited. If y=
ou are not the intended recipient, please contact the sender by reply email=
 and destroy all copies of the original message. Thank you.<br></div></div>=
</div>

        </blockquote><br>
    </div></div></blockquote></div></div></blockquote></div><div><br clear=
=3D"all"></div><br><span class=3D"gmail_signature_prefix">-- </span><br><di=
v dir=3D"ltr" class=3D"gmail_signature"><div dir=3D"ltr">This email message=
 is for the sole use of the intended recipient(s) and may contain confident=
ial and privileged information. Any unauthorized use or disclosure is prohi=
bited. If you are not the intended recipient, please contact the sender by =
reply email and destroy all copies of the original message. Thank you.<br><=
/div></div></div>

--000000000000e1cee5062b92663b--