renaming the jpe-launcher

Discuss anything related to JauntePE, the utlimate utility to help you tame non-portable applications. Share your experience about the apps that work with JauntePE, and the apps that don't.
Post Reply
Message
Author
fang-face
Posts: 41
Joined: Sat Aug 22, 2009 12:26 pm

renaming the jpe-launcher

#1 Post by fang-face »

hello, jpe- and tpfc-fans.

i am quite new to this (or any) forum as a member, but lurking and reading here for several months. although i once had some lectures in c++, pascal and a few centuries ago in something called "fortran", i'm not a programmer or developer at all. short: i am a newbe.
jpe may be the best reason or incentive to change that a little bit. i played around with jpe and tried to acquaint with it by "jaunting" several programmes with jpe-quickie. i didn't have the time yet to follow the 12-step-program and edit the ini's (ähem, "have the patience and dare to" comes closer to it, except that i really am very slow in understanding technical things in english), except for 1 point:

i don't like the jpe-laucher (i like to call it "jaunter", don't know if that makes any sense in english) in the root directory to have the same name as the original, launched programme in .\JPE\ProgramFiles\%appname%. just renaming it didn't work. then i found out and felt ashamed, because it seemed sooo simple, that i should rename the ini next to it as well. at least with my first examle Pstart-jpe-rc3: renaming the jaunter to pstart-jpe.exe and the ini to pstart-jpe_jauntePE.ini worked (as far as i tested). but doing the same with my 2. example foobar did not (foobar2000.exe -> foobar2000-n2.exe, foobar2000_jauntePE.ini -> foobar2000-n2_jauntePE.ini, i'd like to put the configuration there). editing the ini in the first few lines in several trial-and-error-ways didn't either. taking back the changes and renaming the original exe instead (to foobar2000-orig.exe) and editing the ini correspondingly to "Path=.\JPE\ProgramFiles\%appname%\%appname%-orig.exe" worked quite well, at least jpe-foobar is playing right now (didn't test it further than playing music).

finally my questions:
1. does it work just accidentally and will there be some trouble at other, not yet detected places, or with other jaunted programmes if renamed in such a way? (partial answer on my own: renaming \Programs\JPEAdminTools\PStart\Pstart.exe to \Programs\JPEAdminTools\PStart\pstart-orig.exe works, but then also ....\pstart.xml should be renamed to ....\pstart-orig.xml in order to keep the settings.)
2. is there a way to automate this procedure right during jaunting an app via jpe-quickie (editing the master-inis in the configs directory or something similar)? I'd prefer to rename the jaunter to %appname%-jpe.exe (or %appname%-n2.exe, whatever config i take) and keeping the original %appname%.exe to (and only to) the original app.

that's not a serious problem, i just could remember that the "jaunter" is the exe several directories above the other one, but i like to see right at the filename what it is (an .exe is an .exe, a .gif is a .gif, a songname.mp3 is the song called "songname" in mp3-format, xyz-n2.exe is a normal2-configuration-jaunter for the app "xyz" ...).

greetings

PS: thanks to andrew for this fantastic site, which pushed my starting interest in portable apps very much -- and to redllar for developing (and sharing) jpe (and all those people here helping to improve it), which pushid it even more. as i mentioned i'm not much experienced, but i'd like to contribute at least a little bit to it: how?

User avatar
Napiophelios
Posts: 610
Joined: Sun Mar 01, 2009 5:48 pm

Re: renaming the jpe-launcher

#2 Post by Napiophelios »

the JPE launcher.exe's name should be reflected in the JauntePE ini's name.

Example:
Foobar_JPE.exe has Foobar_JPE_jauntePE.ini next to it.

This is also reflected in the actual script written in the ini file as follows:

[Launch]
Path=.\JPE\Programfiles\Foobar.exe
JPERuntimeIni=.\ Foobar_JPE_jauntePE.ini

Some programs wont work properly unless you do change the names as you say you have done.I had alot of problems with My JPE Firefox untill I changed the launcher's name.(The program would tell me Firefox was already running and then shut down)

So long as the ini's content as well as the ini's name all support the altered names and target pathes,I dont think you will have a problem later on.

I prefer to have a different/new name for my launcher as well,but I just modify the names/ini files afterwords.

The older versions of JPE used to have an option to rename the launcher,so I am sure you find a way to alter it as your default...I just never wanted to mess with something that worked so well.

I believe you can use the JPE Modifier by Crownixx to make these changes as well.
Its not automated but its certainly simpler.

fang-face
Posts: 41
Joined: Sat Aug 22, 2009 12:26 pm

Re: renaming the jpe-launcher

#3 Post by fang-face »

thanks for your answer.
playing around a little bit i experienced the following "strange" behaviour:
default: launcher = foobar2000.exe, ini = foobar2000_jauntePE.ini, "original" to-be-launched programme = foobar2000.exe: everything works fine.
renaming the original to foobar2000-orig.exe and changing the code inside the ini appropriatly: all ok.

renaming the launcher to foobar2000_portable.exe AND the ini to foobar2000_portable_jauntePE.ini: it does not work (~"exe could not be found"). this seems to contradict your statement
Napiophelios wrote: the JPE launcher.exe's name should be reflected in the JauntePE ini's name.
Example: Foobar_JPE.exe has Foobar_JPE_jauntePE.ini next to it.
renaming the launcher to foobar2000_portable.exe but KEEPING the default-name foobar2000_jauntePE.ini: everything ok, PLUS that the foobar-window additionally has a red border (strange and funny to me, but i like it). (to choose the suffix "_portable" instead of "-jpe" i read from a post of redllar somewhere around here.)

renaming the launcher to foobar2000whatever.exe, keeping the default-ini-name: does not work ("exe not available", except if "whatever" equals the empty set= default setting).

the ini-code "JPERuntimeIni=.\%appname%_jauntePE.ini" seems to be totally unimportant (what's the name of the file inside itself good for anyway? and what is "[BuildApps] 1=foobar2000.exe" good for?). only "Path=.\JPE\ProgramFiles\%appname%\%appname%-orig.exe" seems to be important to fit the real exe-name (not surprising of course).
-- at first i thought so, but: playing around while i'm writing this: the red border seems to accur, when the ini-name is different from the code stating what the ini-name is.
Napiophelios wrote: Some programs wont work properly unless you do change the names
i'm surprised, i would have thought the other way round.
The older versions of JPE used to have an option to rename the launcher,
that would be my wish.
so I am sure you find a way to alter it as your default
i will go on playing around with my foobar-example to find it out. thanks for your hint to crownixx's modifier, i will test it. in the meantime i will follow the best advice:
...I just never wanted to mess with something that worked so well.

User avatar
Napiophelios
Posts: 610
Joined: Sun Mar 01, 2009 5:48 pm

Re: renaming the jpe-launcher

#4 Post by Napiophelios »

The red frame is a setting the JauntePE Portable launcher will default to when it cannot find the ini file.

This happened when I tried to use Mbox (an exe packer) to incorporate the ini file into a jpe launcher itself.
It just used the default settings as if the ini file was incomplete. or missing

crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

Re: renaming the jpe-launcher

#5 Post by crownixx »

Hi fang-face

I try to answer several of your question. Sorry, I will not using the term "Jaunter" as it may effect the other reader

JPE Quickie is try to be the quickest way create a portable application. Yes, it skip question "What is your launcher name?" and just straight forward took the executable name to be its name. Redllar design it that way to be simple and quick. Sorry, there is no way to change the behaviour.

You can change the launcher's name but... understand first what token "%appname%" is referring to because it is using in the configuration ini file (*_jauntePE.ini )
* can be any name

%appname% is a token that will represent the launcher's name. So, if your launcher's name is "foobar2000-orig", then %appname% is equal to foobar2000-orig. Careful when you use it in the ini file because you might mess with it. If you are not sure, then dont use it. An example of the pontential problem: if the configuration ini file is like below, you will have trouble to rename your launcher. (the launcher try to execute the program that have the same name as itself)
[Launch]
Path=.\JPE\Programfiles\Foobar\%appname%.exe
I am suspecting you are messing with the %appname%. That is why you got different test result

So the solution is, replace all the %appname% token and use the exact name in all settings. Then, you are freely to rename your launcher with any name you want.I give you example below. Hope there will be no confusion

Example
Your launcher's name: Foobar2000Portable.exe
Ini name: Foobar2000Portable_jauntePE.ini

Inside ini
[Launch]
Path=.\JPE\Programfiles\Foobar\Foobar.exe
JPERuntimeIni=.\Foobar2000Portable_jauntePE.ini
fang-face wrote:ini-code "JPERuntimeIni=.\%appname%_jauntePE.ini" seems to be totally unimportant
Initially, the launcher will search ini file in the same directory and same name as itself. Then it read the rest of the settings. The "Path" settings is not important if you create a standalone portable package. But, it may important if you create complex portable application: for example portable application that can execute other application as portable like PStart JPE, several portable applications sharing the same sandbox,or create link between several portable applications. I can't tell much because i also still exploring its potential.
and what is "[BuildApps] 1=foobar2000.exe" good for?).
There is no documentation about those section. Sorry i cant give you the answer. But so far, those section does not give any harm to the application behavior. You may safely remove it if you don't want it

fang-face
Posts: 41
Joined: Sat Aug 22, 2009 12:26 pm

Re: renaming the jpe-launcher

#6 Post by fang-face »

Hi crownixx.
Thanks for your comprehensive answer. Now i understand what is going on. You are very right:
crownixx wrote: I am suspecting you are messing with the %appname%.
"%appname%" is a variable (am i right in thinking that "token" is just another word for "variable") for the launcher's name, i thought it is for the to-be-launched app. replacing "%appname%" with whatever i want i am able to name the launcher and the to-be-launched programme to whatever i want. just as you said.
now i also know why my results contradicted napiophelios's statement above: the jpe-launcher "mylauncher.exe" searches for "mylauncher_jauntePE.ini". if the launcher is renamed, the ini is not findable. with 1 exception: a suffix "_portable" is ignored. "mylauncher_portable.exe" will find "mylauncher_jauntePE.ini", but not "mylauncher_portable_jauntePE.ini".
the red border appears in fact when the statement "JPERuntimeIni=.\foobar-n2_jauntePE_xxx.ini" inside the ini does not fit the ini's real name (without "_xxx" in this case). i don't know if there are any other side effects, but i don't care about that so much. i just keep it as JPE-Quickie spits it out because
...I just never wanted to mess with something that worked so well.
If you are not sure, then dont use it.
unfortunately jpe-quickie puts a lot of "%appname%'s" in the ini, so i have to change it all by hand (if i'm not too lazy or once again "...I just never wanted to mess with something that worked so well."), but now i know better how it works, and that's what was intended.
But, it may important if you create complex portable application: for example portable application that can execute other application as portable
or for example tuneup-utilities? (once i put it (a legal version from a magazine) through jpe-quickie to acquaint with and it seems to work.) once again i learned something: i thought "stand-alone" just means "feed jpe-quickie with one programme at a time, not several ones to then be placed in the same folder".
one last question: what means "execute application as portable"? my guess: after execution no traces are left behind.

greetings and thanks also to napiophelios.

crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

Re: renaming the jpe-launcher

#7 Post by crownixx »

with 1 exception: a suffix "_portable" is ignored. "mylauncher_portable.exe" will find "mylauncher_jauntePE.ini", but not "mylauncher_portable_jauntePE.ini".
In version 0.1 alpha, launcher need to have a suffix "_portable" after its name and then it will only find mylauncher_jauntePE.ini. Maybe redllar keep some of the previous code in the current version of launcher and as result, we got this odd behavior. Thanks for sharing the information
unfortunately jpe-quickie puts a lot of "%appname%'s" in the ini, so i have to change it all by hand
My previous suggestion to replace all "%appname%" is a quite radical but it will avoid confusion to new user. Just replace the %appname% in Path=.\JPE\Programfiles\Foobar\%appname%.exe is actually enough to solve your problem regarding renaming the launcher's name
or for example tuneup-utilities?
Yes, that is a good example. One ini is not enough to control the program as it contain several exes and each of them carry different task. For example, you need one ini to allow "registry cleaner" in tuneup-utilities modify the registry but keep the file system modification. For "free up disk space" function, you need another ini that allow file system modification but keep the registry modification. To create a good portable tuneup-utilities, you need several ini's files.
one last question: what means "execute application as portable"? my guess: after execution no traces are left behind.
and also it can save\carry the application's settings with you

fang-face
Posts: 41
Joined: Sat Aug 22, 2009 12:26 pm

Re: renaming the jpe-launcher

#8 Post by fang-face »

crownixx wrote:
or for example tuneup-utilities?
Yes, that is a good example. One ini is not enough to control the program as it contain several exes and each of them carry different task. For example, you need one ini to allow "registry cleaner" in tuneup-utilities modify the registry but keep the file system modification. For "free up disk space" function, you need another ini that allow file system modification but keep the registry modification. To create a good portable tuneup-utilities, you need several ini's files.
i see. so my tuneup-jpe maybe just seems to be good because i only have 1 ini. when i start it it workes/doesn't produce a visible error, but i didn't check if it really does what it's expected to do (clean the real registry etc.) except that the shredder does delete what i want it to. (during jpe-quickie-"installation" i just started every component and "exercised them as much as possible".)
but nevermind, i will have a closer look in the future, for the moment it's too much for me (or i just don't feel like).

there is another thing that i learned from this thread: having read the help files would have answered some of my questions in advance :mrgreen: . on the other hand (i actually read parts of it, but i didn't understand too much): reading both (and experimenting) made me understand better. (by the way: trying joby_toss's JauntePE-Help.chm starts IE with an error message :?: . i don't know why. napiophelios's help.exe works. thanks to both. wouldn't these tools fit to the unofficial homepage?)

bye for now.

crownixx
Posts: 403
Joined: Sat May 12, 2007 6:26 am

Re: renaming the jpe-launcher

#9 Post by crownixx »

fang-face wrote:. (by the way: trying joby_toss's JauntePE-Help.chm starts IE with an error message :?: . i don't know why. napiophelios's help.exe works. thanks to both. wouldn't these tools fit to the unofficial homepage?)
Added both files in the Download page. Thanks for reminding me

Post Reply