<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Fulko, comments in context below. <div><br><div><div>On 2013-06-07, at 11:42 AM, Fulko Hew wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><font face="courier new,monospace">After a lot of fighting... I've made some progress on my battle<br>of using PAR to package my app on various OSs.<br></font></blockquote><div><br></div><div>Well done! </div><br><blockquote type="cite"><font face="courier new,monospace"><br>[I've gotten something built on Solaris and now I just have to find out<br>
how to make a proper pkgadd package out of it.]<br><br>But my question of the day is really the MS Windows / Cygwin environment.<br>I hope you (or anyone else) can help…<br><br></font></blockquote><div><br></div>A few notes below. <br><br><blockquote type="cite"><font face="courier new,monospace"><br>When I run my Cygwin/PAR application under a DOS shell<br>
(with PATH also pointing to c:\cygwin\bin) it now actually<br>starts my app, but it immediately dies with:<br><br>Can't locate File/Temp.pm in @INC ...<br><br>Is it because of slash versus backslash?<br></font></blockquote><div><br></div>As a rule, all the versions of Windows that matter understand forward slashes anyway. So the syntax is just fine. On Windows, I used / for everything. The only issue is that when you get a pathname back from Perl, it might contain \ characters, so I used a *lot* of s{\\}{/}g in my file access logic when I wanted stuff to be portable. <br><div><br></div><blockquote type="cite"><font face="courier new,monospace">Is it because @INC contains entries like /usr/lib/perl5…<br></font></blockquote><div><br></div><div>Very possible. I think cygwin does some funny path hacking, and maps stuff like /usr/... to some other place on the file system. As a rule, cygwin binaries need to be run under cygwin to overcome this. So you can probably par stuff up, but they will still only run on a cygwin runtime, not a straight Windows command line. </div><br><blockquote type="cite"><font face="courier new,monospace">
Is it because the @INC entries are rooted at '/' and Windows<br> doesn't understand that and Cygwin modules aren't kicking in?<br></font></blockquote><div><br></div><div>Which is part of the issue above. So yes, even if you build a par, it'll only run under a cygwin runtime. What you might be able to do is use something like the NSIS installer to package up a cygwin runtime and the par file. That's a lot of work, and from what I recall there were some license oddities in cygwin which made that problematic. </div><div><br></div><div>However, I did find this (at: <a href="http://www.ghettocode.net/perl/PARPackerHowTo">http://www.ghettocode.net/perl/PARPackerHowTo</a>)</div><div><br></div><div>So you (a) this might be fun, and (b) the second build of Perl might be an issue. </div><div><br></div><div><blockquote type="cite"><pre class="text geshifilter-text" style="margin: 0px; padding: 0px; overflow: auto; color: rgb(69, 69, 69); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-family: monospace;">2. Don't use this on a system with Cygwin.
- If you can get this working, you're god damn awesome.
Cygwin takes the liberty of installing a second build
of Perl in $PATH and completely fucks up your lib path.
Uninstalling Cygwin is not really an adventure in
awesome. Just don't do it.</pre></blockquote><div><br></div></div><br><blockquote type="cite"><font face="courier new,monospace"><br>Any clues?<br><br>Fulko<br><br>PS: For those not privy to my earlier background discussions:<br>
<br>- I can't use Strawberry Perl because some of the modules I need<br> don't work under it, only works under Cygwin Perl.<br><br>- I'm trying to make a single executable for distribution<br> (that's what PAR is for)<br>
<br>- It needs to be invokable from DOS (srvany) and not from within<br> CYGWIN's terminal window<br></font>
</blockquote></div><div><br></div><div><br></div>I will personally and publicly call you "god damn awesome" if you manage this. <br><div apple-content-edited="true">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><p style="font-weight: normal; font-family: Arial, sans-serif; font-size: 8pt; margin-bottom: 0px; ">--</p><div style="font-weight: normal; font-family: Verdana, sans-serif; font-size: 10pt; color: rgb(57, 121, 59); margin-top: 0px; margin-bottom: 0px; "><b>Stuart Watt</b></div><p style="font-weight: normal; font-family: Verdana, sans-serif; font-size: 8pt; margin-top: 0px; "><a href="mailto:stuart@morungos.com">stuart@morungos.com</a> / </p></div></div>
</div>
<br></div></body></html>