in reply to Re^7: problem with par as other user
in thread problem with par as other user

I should have name it differently.

But your tktests will not run anyway, because there's no perl/Tk in that package, only perl (strimmed. but you can populate PM files into .zip) and Tcl/Tk.

Following code runs okay:

use warnings; use strict; use Tcl::Tk; my $mw = Tcl::Tk::tkinit; #centers window CenterWindow($mw, 300, 200); Tcl::Tk::MainLoop; sub CenterWindow { my($window, $width, $height) = @_; #$window->idletasks; $width = $window->reqwidth unless $width; $height = $window->reqheight unless $height; my $x = int(($window->screenwidth / 2) - ($width / 2)); my $y = int(($window->screenheight / 2) - ($height / 2)); $window->geometry("=${width}x${height}+${x}+${y}"); }
Try this out, it works for me...

One more thing.

There are console and "windows" mode editable by editbin. The problem is that w/o console you do not see error message (such as 'module Tk not found blablabla'), so I suggest you to try tests with console-based of executable

Also you may want running applications from command line, so you need console version of executable again, see both at http://www.vkonovalov.ru/files-exchange/ cstart.exe and wstart.exe

So try again with cstart.exe

Replies are listed 'Best First'.
Re^9: problem with par as other user
by Ace128 (Hermit) on Jun 30, 2006 at 11:56 UTC
    Lovely! Guess its time to use some module to get all files that are used in a script and insert them into the zip!

    However, I tried runing this now working tcltests.pl with both cstart and wstart, and I didn't get any console window with cstart!

    Ace
      Lovely! Guess its time to use some module to get all files that are used in a script and insert them into the zip!

      ... and this process could make password-protected ZIP to make source hiding, if needed.

      Do you think CPAN waits for this yet another packaging solution??

      However, I tried runing this now working tcltests.pl with both cstart and wstart, and I didn't get any console window with cstart!

      mea culpa. I've uploaded better "cstart.exe" to same location, and with a different name (start.exe) to avoid caching problems

        Check dates on those files. cstart and start has same, while wstart has its own. I suppose those dates are mod dates, so if thats the case you can see that its uploaded correctly :) Anyway, works fine now! And, apparently one should translate:
        File/Glob did not return true value at C:\test\modules/redo.pm line 82 +, <DATA> line 1. BEGIN failed--compilation aborted at C:\test\test1.pl line 55, <DATA> +line 1.
        as Missing Module! But, I though glob was some buildin function...ohwell...

        Also, hell yea. Put this on CPAN! Can one have too many? :) Well, since this has another approach (all in mem) you should put it there! Love the idea about packing up as needed aswell. And all in memory is really nice. I would have done this myself if I had the time.

        I've also tested that running another script from within a script seems to be working fine. Which is nice and wanted by me :).

        Password protect zip is nice, but when do you supply that pass? What if needed modules are in the zip. Then you can't exactly show the nice Tk dialogbox asking for a pass.. (unless you put all Tk outside the .zip and use lib ".")...

        Two other things that is nice with the other packages are:
        1. Scramble up the script running... Using stuff like Bleach (PAR::Filter::Bleach) and PAR::Filter::Bytecode
        2. Have it all in one file. Althouth this is quite nice as it is. But embedd it all is an interesting project even for me. Would be nice to hack such a thing :)

        / Ace