Hacer Portables
Hacer Portables
Hacer Portables
0 Getting Started
The section is primarily intended for use by those who wish to manually
maintain their JauntePEized applications. Those unfamiliar with how the
JauntePE launcher and runtime work should make use of the JPE
Quickie tool instead, as much of what is discussed in this section is
automated by that tool.
The 0.3.0 version JauntePE standalone launcher is identical in use to its
predecessors except for the use of a new set of launcher settings which
allows you to modify how a given launcher behaves without having to build a
new launcher exe - you just build a new launcher ini instead.
The 0.3.0 version JauntePE runtime is identical in use to its predecessors
except for the use of several new sets of runtime settings, several new
performance enhancements, and some bug fixes. One thing that should be
noted up front however, is that the portable registry .reg file's contents are
slightly different with 0.3.0, which makes any 0.3.0 modified .reg file
incompatible with any previous version's runtime dll. So make a backup copy
of any existing portable registry .reg files first before trying it out with 0.3.0,
just in case you need to revert back to an older version.
To make use of the 0.3.0 launcher exe and runtime dll, you must at least do
the following:
launches unless you don't want to use a launch config ini to specify where the
to-be-launched executable resides.
Create,
or
modify
an
existing,
%appname%_jauntePE.ini,
JauntePE_jauntePE.ini, or explicitly specified runtime settings file, to specify
any
runtime
settings
you
may
wish
to
use.
This file may be the same as the launch ini but does not have to be. Please see
the runtime reference if you have any questions regarding its contents.
1. Create a portable directory for your application. From here on "your application" will
be referred to as %appname%. So if your application is generally known as Snafu,
then replace %appname% with Snafu everywhere within this document.
o
Don't create the directory on the desktop or in Program Files or
MyDocuments, etc.
o
Use some place like "E:\Portables\%appname%". From here on this
directory will be referred to as %launchdir%.
o
Create a "JPE" sub-directory in %launchdir%.
Copy JauntePE's distributed default jauntePE runtime dll file, found in
the JauntePE\Runtime\jauntePE\def directory, to "JPE".
2. It's best if you do a "portable install" of the application, but if you don't have an
installer for the application, do the following:
o
Create a "ProgramFiles" sub-directory in "JPE".
o
o
o
o
o
5.
Copy
JauntePE's
distributed JPEPortable
launcher file,
found
in
the JauntePE\Toolbox directory, into %launchdir%, naming it Setup.exe.
6. Copy one of the generic JauntePE distributed JPE Quickie configuration files, found
in
the JauntePE\Toolbox\Configs directory,
into
%launchdir%,
naming
it
Setup_jauntePE.ini. The specific configuration file you copy depends upon what you
want to do. For a "normal" application, the Normal2 configuration should do.
The Normal3 configuration adds the ability to portablize file system paths stored within
the portable registry, via the RegTokens setting. The Greener configuration adds
portablization of more registry keys and more special folder directories.
The Greener2 configuration adds complete registry portablization.
7. Text edit the Setup_jauntePE.ini file as follows:
o
o
o
o
o
8. Run the installer for the application via the Setup.exe launcher in %launchdir%:
Accept the settings per your requirements, but make sure that the
application is to be installed in the typical "%ProgramFiles%\%appname
%" location, where %ProgramFiles% is the full path to your standard
"Program Files" directory.
o
Don't have it run the application or do anything else after the
installation has completed.
9.
Copy
JauntePE's
distributed JPEPortable
launcher file,
found
in
the JauntePE\Toolbox directory, into %launchdir%, naming it %appname%.exe.
10. Copy one of the generic JauntePE distributed JPE Quickie configuration files,
found in the JauntePE\Toolbox\Configs directory, into %launchdir%, naming it
%appname%_jauntePE.ini. See Step 6 for a summary of each configuration.
11. Text edit the %appname%_jauntePE.ini file as follows:
o
o
o
o
o
If all goes well, you could, if you wish, modify the %launchdir% directory's
%appname%_jauntePE.ini file to be more specific to your application after
running the application in discovery mode and then using its results to
optimize the configuration ini.
You could also use JPE Builder to modify the %launchdir% directory's
%appname%.exe launcher to apply the application's icon to it, embed the
configuration ini into it, embed the portable registry into it, etc.
I like to keep the installer handy, just in case, but if it's no longer needed, you
could also delete the %launchdir%\Setup directory and its contents, and the
%launchdir% Setup.exe and Setup_jauntePE.ini files.
In this method, you add the following FilesystemIgnore section, and the lines
within it, to each of the configuration ini files you create:
[FilesystemIgnore]
1=%38%\*.*
2=%22%\*.*
3=%25%\*.*
4=%31%\*.*
5=%35%\*.*
6=%45%\*.*
7=%46%\*.*
8=%0%\*.*
9=%5%\*.*
10=%12%\*.*
11=%16%\*.*
12=%26%\*.*
13=%28%\*.*
14=%6%\*.*
15=%8%\*.*
16=%9%\*.*
17=%11%\*.*
18=%21%\*.*
19=%32%\*.*
20=%33%\*.*
21=%34%\*.*
The "Pseudo-Sandbox" Method
In this method, you first pre-create all of the portable file system directories
using
the JauntePE
Portable
Dirs archive,
found
in
the JauntePE\Toolbox\Extras directory. Follow the instructions given in the
readme.txt
file
within
the
archive.
You
then
add
the
following FilesystemIgnore section, and the lines within it, to each of the
configuration ini files you create:
[FilesystemIgnore]
1=38
2=%40%\..
If you have a situation where you either don't have an installer for the
application, or you can't run the installer due to JauntePE shortcomings, you
might also encounter the problem of having to manually portably register any
non-system dlls, ocxs, oles, etc. The JPE regsvr32 archive, found in
the JauntePE\Toolbox\Extras directory, will help you with this additional work.
Follow the instructions given in the readme.txt file within the archive.
the file system may not display the portable files and sub-directories at all.
Work
around: There
are
no
known
work
arounds.
Reason: The JauntePE runtime dll was coded against the system registry and
file system api functions specifications as defined in the Windows XP SP2
Microsoft Platform SDK. It was also tested for the most part on that version of
Windows. Since then newer versions of Windows have been released that
greatly expand the number of system registry and file system api functions that
an
application
may
make
use
of.
Primarily
on
Vista.
Also on Vista, major changes have been made to the shell interface functions
that an application may make use of, such as the new replacement dialog box
for the previously used File Open/Save dialog box. Not only has the user
interface changed, but the Microsoft shell dlls appear to have been recoded to
bypass the normal system registry and file system api functions and to instead
directly call the publically undocumented NTDLL functions themselves. As
JauntePE does not redirect at this level, these calls are missed and not
redirected as needed.
around: There
are
no
known
work
arounds.
around: There
are
no
known
work
arounds.
Reason: All JauntePE executables, including all of the JauntePE runtime dlls,
only support ANSI-based ini configuration files. Which means that it isn't
possible to specify replacement or help text, that requires Unicode characters,
for any of the GUIs. It also means that it isn't possible to specify any registry or
file system paths, that require Unicode characters, for any launch or runtime ini
configuration file.
If you'd prefer, it's okay to start JPE Quickie through some other means, like
an Explorer shortcut or via another application launching utility such as
PStart.
This should bring up the "open file" shell browsing dialog box, as shown in
the following step, that you're hopefully familiar with. Its "Browse to and select
the application main executable" title message is just a shorthand way of
asking you to "find and select the executable that you want to next run
portably."
As the "Step 1" note on the dialog box indicates, you can also use your file
manager's drag and drop capability to "select" the installer for use.
Once you have opened the file, JPE Quickie should auto-recognize that the
executable is an installer and turn on the "This is an installer" check box. If
not, you should turn it on yourself after verifying that you have indeed
selected and opened the correct installer file (check the filename of the
opened file given below the "Select Application" button.)
This step may take a few seconds if you've previously portably run something
via JPE Quickie, since it first needs to clear out the contents of the directory it
tells the JauntePE runtime to use as the location for the portable registry and
portable file system. JPE Quickie also builds a launcher and JauntePE
launch and runtime configuration ini for the installer at this time.
This dialog box gives you an opportunity to change which JauntePE runtime
configuration to use during the subsequent run. It would be a good idea to
take the time now to go through the set that came in the JauntePE archive, in
case the distribution's default doesn't have all of the features you'd like as a
default.
If you don't want to see this dialog box most of the time, check on the "Autouse the default" check box and you won't see this dialog box again except
when there are pre-built configurations available that are specific to the
application you've chosen to run. This dialog box may also be bypassed by
selecting from the "File" menu's "Run Portably with Config" submenu, as
shown inStep 15 below.
This is just a "hand holding" message that gives you a final opportunity to
back out of portably running the installer. If you find these types of messages
annoying, and/or you don't think you'll be needing them anymore, check on
the "Only prompt when necessary" check box and no more of these types of
messages will popup unless there's an error. If you do this now you can skip
some of the following steps.
When you click on "Yes", you should see JPE Quickie's "App Watcher" dialog
box pop up (see Step 10 for a picture), followed by the installer's initial dialog
box.
It's very important for portability reasons that the install-to location be set to
the computer's "Program Files" directory. Almost all installers tested have this
directory set as the parent directory of the default install location. If not, you
need to use whatever means the installer gives you to make sure that a
"Program Files" sub-directory is chosen as the install-to location.
By the way, you may have noticed the unfamiliar titlebar icons that appear on
this screenshot. Those are the JauntePE runtime icons that tell you from right
to left that JauntePE is running (
), that system registry portablization is
When you click on "Finish", the installer should close down and you proceed
to the next step in this tutorial.
When working with an installer that finishes by allowing you to subsequently
start the just-installed application, or to "read the readme", at this time it's
best to not do any of those things. If the installer does start the application, or
does popup the readme, just close it down.
The most important thing to recognize here is that there should be an "OK"
button to click on and not a "Cancel" button. If there isn't, you need to figure
out why. Because, if you click on "Cancel" instead of "OK", JPE Quickie will
stop its wizard-like walk-through of the steps necessary to get to a portably
usable package.
This is just another "hand holding" message that gives you an opportunity to
back out of the steps you're currently being led through.
are skipped since the JauntePE runtime was able to successfully portablize
the directory creation requests (due to the stricter configuration settings,)
leaving the run with no discovered issues.
When deciding what list entry to choose, it's best to look through the
shortcuts first, if there are any. Unless you know the actual file name of the
application's main executable. You should look through the "StartMenu"
located entries in particular. Those entries are the shortcuts that the installer
would have created in your system start menu if you hadn't run the installer
via JauntePE.
By the way, this is the dialog box that pops up when you click on the "Select
Quickie App" button on JPE Quickie's main window.
Hopefully you remember this dialog box from Step 7 above. When you click
on "Yes", in 7-Zip's case, you should see its main "file manager" window,
which should look something like the window shown in Step 18 below.
The sub-steps given here are obviously 7-Zip specific, as are steps 18, 19,
and 20 that follow.
The general idea behind these "exercising" steps is that you want to cause
the application to create and store as much of its registry and file system data
as possible. Doing so now will help you later when you first attempt to run the
packaged application on its own, under another account or on another
machine.
It will also help JPE Quickie determine if any of the work you did with the
application caused it to behave in a non-portable manner that the JauntePE
runtime was not able to redirect into the portable registry and/or portable file
system. You will then be able to rectify the problem prior to using it
elsewhere.
And it will also help JPE Quickie later if and when you decide to create an
optimized application package. However, as will be shown in the following
tutorial, you can always re-run the application via JPE Quickie first. But it's
generally a good idea to do as much up-front as possible with the application.
Here are just some more 7-Zip specific things to do to "exercise" it.
What you're about to do in the following steps is create a new 7-Zip archive
of the JauntePE directory's contents. This is an important thing to do when
"exercising" 7-Zip since archiving something is one of its main features. And,
as you will see in a later tutorial, it also causes 7-Zip to run one of its other
executables "behind the scenes," which is something that JPE
Quickiedefinitely needs to know about if you ever want to create an optimized
package for 7-Zip.
Just some more 7-Zip specific things to do that you'll recall later to verify that
the portably packaged application is carrying all of its settings along with it,
and is also portably launching its executable that it uses to do the archiving.
Finally, you're done with 7-Zip and are ready to return to JPE Quickie to see
what it has to say about how the application behaved from a portability
perspective.
Just as with the installer in Step 10 above, "OK" to continue working with JPE
Quickie or "Cancel" at any time before to terminate the Quickie session.
The "Package name" you use must be a valid file system directory name, as
that is what it's eventually used for. According to an Explorer error message
popup, that means the name cannot contain any of the following
characters: \/:*?"<>|
This brings up the, hopefully familiar, "Browse For Folder" Explorer dialog
box.
Browse to the folder where you want the package's directory and its contents
created. Then select it.
It's best not to choose the Desktop, My Documents, or some other special
folder if you want to use the packaged application without possible future
problems. See the Known Limitationssection for the reason why.
Click on "OK" once you've browsed to and selected the folder that you want
the package's directory and its contents created in. This will close the
"Browse For Folder" popup dialog box and bring you back to the "Package
Up" dialog box.
First take a look at the "Package location" path to make sure that it
corresponds to the folder's location that you browsed to and selected via the
previous Steps.
If the path looks correct, then you're ready to create your first JauntePEdriven portable application "package," which for this tutorial is nothing more
than a copy of the current portable file system's contents, along with a slightly
modified JauntePE configuration ini file.
When you click on "OK", the "packaging" process begins. This can take quite
a while if the application you're packaging is large, and especially if you had
previously configured the JauntePE tools to use the UPX executable
compression utility via JPE Configure. Eventually, however, the following
step's message box popup should appear.
7-Zip specific
Start 7zFM.exe
7-Zip specific
Retrace the steps for archiving the JauntePE
folder and verify that the archiving settings were
as before
Select File->Exit from the main menu
This step simply confirms that the portable application behaves the same way
when run from the created package directory as it did when run via JPE
Quickie, since this is the way you will run the portable application in the
future.
If it's not self-evident yet, the "JPE 7-Zip" folder is self-contained and may be
copied to any other location (except as noted by the Known Limitations) or
computer and used as is. Now would be a good time to copy the folder to
another computer, virtual machine, etc., and run it there, to make sure that all
is truly portable (assuming you have plans for true portable use in the future.)
The 7zFM.exe application executable in the "JPE 7-Zip" directory itself is not
the 7-Zip main executable, but rather a JauntePE launcher. It may be treated
as if it were the application's main executable, however. Meaning, you may
use it in a shortcut with parameters, add it to your Start menu, add a shortcut
to it into your SendTo folder, start it via a bat or cmd file, with or without
parameters, start it via some other application launcher, etc.
For launchers requiring special setups, if you're willing to do a bit of hand
editing of the launcher's configuration ini file, take a look at the
various launcher settings that you can use to specify shortcut-like launch
properties.
If you're the finicky type, at this time you may wish to get rid of the installer's
launcher and configuration ini: the 7z460.exe and 7z460_jauntePE.ini files. If
they're still around.
And if you're up to it, now would be a great time to proceed on to the next
tutorial, which builds upon this tutorial's efforts to quickly reconfigure your
JPE 7-Zip portable package to make use of some of the JauntePE runtime's
optimization settings.
Presented here is a walk through for using JauntePE's JPE Quickie tool to
create a partially optimized JauntePE portable package for 7-Zip 4.60. You
should be able to apply this tutorial to the creation of any JauntePE portable
application package via the use of the application's installer.
It is assumed that you have already worked your way through the first
tutorial. If this is not the case, please do so now, as the current Quickie
package created via that walk through is necessary for this tutorial. This
tutorial was also written with the assumption that you have learned from the
1st tutorial, so many of that tutorial's steps are skipped in this tutorial as
being obvious.
JPE Quickie created partially optimized packages are ones that attempt to
safely minimize the amount of impact the JauntePE runtime has on a
portablized running application. This is accomplished by analyzing the
previously generated discovery data. The analysis results in a generation of
configuration settings and lists so that only the necessary application-tosystem calls are fully processed by the JauntePE runtime.
For example, if you followed the first tutorial's steps exactly, the discovery
data generated by your previous "exercising" of the 7-Zip application should
indicate that no file system portablization is necessary. It should also indicate
that only a select few system registry portablizations are necessary (the ones
that support the storage and retrieval of 7-Zip's settings data.) In such a
case, JPE Quickie will completely turn off the use of the file system
portablization plugin during the configuring of a "partially optimized" package.
And it will minimize the overall impact of the system registry portablization
plugin. This should result in faster 7-Zip startups as well as faster overall file
system browsing within 7-Zip's file manager window.
The downside is that you must exercise, i.e., make use of, all of an
application's functionality in order to get the best set of discovery data
generated. And to the fullest extent that you possibly wish to make use of it in
the future. Otherwise you run the risk of running with an optimized
configuration that lets some as-yet-unkown file system and/or system registry
modifications through to the system - modifications that a non-optimized
configuration, e.g. a "Normal final package", would portablize.
The tutorial has been updated for use with the Nightly Build #19 version
of JPE Quickie.
This is just another quick way to reselect a portably installed executable for
reuse.
If you're interested, you can get run detail information for any previously JPE
Quickie run application by clicking on the selected (highlighted) entry in the
list. If you do, the below dialog box will pop up, which currently only presents
summary run information for a number of different categories.
In the 7-Zip tutorial's case, you can see that there were 2 executables run as
part of the first tutorial's use of the portable application: 7zFM (the file
manager) and 7zG (the archiver.)
This should look familiar by now. You don't need to run the application this
time, however. Because the application was already run in the first
tutorial and the JauntePE runtime already monitored what was going on and
so the data necessary to create a partially optimized package has already
been created.
So all that's required is that you manually tell JPE Quickie that you're ready to
create a package. You do this by selecting the "Package Up" command
button.
This step's actions should look familiar as well. The only real difference
between what you need to do now, as opposed to what you did in
steps 25 through 29 of the first tutorial, is to explicitly select the package
type.
Just another warning message. The advice given is worth heeding though.
That's it. In reality, as long as you have done your due-diligence and have
properly exercised the application to its fullest, the only difference between
building a normal portable package and a partially optimized one is in the
selection of the package type.
As a final step, it would again be a good idea to now make use of the new
portable package outside of JPE Quickie. Make sure to take a look at the
JauntePE titlebar icons in the 7-Zip application's main window. The file
system portablization icon ( ) should now be missing. If you run into
problems, then you'll need to re-rebuild the package to again make it a
"Normal final package" and just use it like that.
Well, that was kind of easy, wasn't it? If you think so too, continue on with
the next tutorial for something a bit more complicated that should give you a
better understanding of how what you do with an application directly affects a
subsequently created partially optimized package.
file:///D:/PELI/JAUNTEPE/JauntePE030Alpha/help/launch.html