in reply to Par Packager - executable
Is #defaultconfig a literal file name? Or are you using it as a placeholder in your post?
In any case, storing files within the packed executable (zip file) is done using the --addfile switch. Details are in the documentation: pp
Files packed in this way are located in the inc directory under $ENV{PAR_TEMP} when unpacked, and your script can look for it there.
Some example code to handle both packed and not packed scripts is below.
# get the default config file if ($ENV{PAR_0}) { # we are running under PAR my $path = Path::Class::file ($ENV{PAR_TEMP}, 'inc', ''); my $path_str = $ui_path->stringify; ... } else { ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Par Packager - executable
by g_speran (Scribe) on Mar 16, 2019 at 13:38 UTC |