yaP - yet another Portablizer

If you are currently developing portable freeware or planning to do so, use this forum to discuss technical implementation, seek out like-minded developers for partnership, or solicit interested users for beta testing.
Message
Author
User avatar
Midas
Posts: 6905
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: yaP - yet another Portablizer

#376 Post by Midas »

tproli wrote:What do you mean on updating the OP? There's nothing about version info there, but maybe we are not talking about the same post (the first post in this topic).
  • That's exactly what I meant, tproli.

    Excuse me if I am acting like a pampered brat here, but my expectation for the forum thread is for it to reflect the evolution of the project -- as a lot of us, myself included, came to rely on it as quick path to portability.

    No need to destroy the post historic significance, only add relevance and usefulness to it...

    E.g., take the custom at XDA-Devs babelic forums (random example: http://forum.xda-developers.com/showthr ... ?t=3012227). In case of a program, the firs post (or the next) usually contains the most relevant info (or pointers to relevant posts) about the topic subject so newcomers aren't required to read kilometric threads just to find the essential information... or wander offsite, for the matter. ;)

User avatar
ripu
Posts: 19
Joined: Sat Aug 30, 2014 9:18 am

Re: yaP - yet another Portablizer

#377 Post by ripu »

Can't thank you enough for making yaP and sharing it. I have one question. If I use

Code: Select all

-regkey = HKCU\Software\ABC :: ifempty
it will check if there are any value directly in HKCU\Software\ABC. But, if there is another key inside ABC e.g. HKCU\Software\ABC\XYZ, and HKCU\Software\ABC is empty; it still deletes HKCU\Software\ABC. Is there any way to delete only when ABC does not have any value and other key inside?

User avatar
tproli
Posts: 1172
Joined: Sat Sep 09, 2006 10:14 am
Location: Hungary
Contact:

Re: yaP - yet another Portablizer

#378 Post by tproli »

Thanks! Just uploaded v0.7.1 which probably fixes this. First I thought I haven't included this because of a PureBasic limitation but it seems it was only a typo.

Note that the "Default" reg value will be ignored inside keys. That is, the key will be deleted if there's the "Default" reg value inside, but only if it's the only reg value.

User avatar
Userfriendly
Posts: 430
Joined: Tue Nov 27, 2012 11:41 pm

Re: yaP - yet another Portablizer

#379 Post by Userfriendly »

For versions beyond v0.6 build 19, is it not possible to directly execute .jar files anymore? Instead I think this is the new method:

Code: Select all

  application = {JAVAEXE}
  commandline = -jar "{YAPROOT}\App\MyFile.jar"
With v7.1, I get some weirdness when passing a command line argument that tells the java app to save files within their own directory. For example, Chatty http://chatty.github.io/ has the -cd command to make itself portable. If I use yaP v7.1 with the new way to execute .jar files, those settings files will save itself where javaw.exe is installed instead of where chatty.jar is.

Chatty by itself wouldn't need yaP but I have to use yaP to pass -cd and other custom arguments from Livestreamer-Twitch-GUI https://github.com/bastimeyer/livestreamer-twitch-gui which I also made portable with yap. It doesn't like portablized .jar only -cd Chatty. I need to pass it through the yaP launcher.

It's possible to do it the regular way which is to copy from %AppData% and back into the portable settings folder, but the reason I don't wanna do that with chatty is because it caches thousands of small files for its settings and it takes FOREVER to launch when it copies files to %AppData%. (chatty actually saves settings to %USERPROFILE% but was just saying %AppData% as its the usual method for most programs)

I can keep using v0.6 build 19 which works for it but its odd that v7.1 loses a feature.

User avatar
tproli
Posts: 1172
Joined: Sat Sep 09, 2006 10:14 am
Location: Hungary
Contact:

Re: yaP - yet another Portablizer

#380 Post by tproli »

Have you tried setting the workdir?

User avatar
Userfriendly
Posts: 430
Joined: Tue Nov 27, 2012 11:41 pm

Re: yaP - yet another Portablizer

#381 Post by Userfriendly »

Ah hah so that's what workdir does. It works. I put workdir = {YAPROOT}\Chatty\ and settings are dumped in there instead of the java folder in program files. Wonder what other applications need this method.

User avatar
tproli
Posts: 1172
Joined: Sat Sep 09, 2006 10:14 am
Location: Hungary
Contact:

Re: yaP - yet another Portablizer

#382 Post by tproli »

In this case JAVAEXE is the main application so that's why workdir needs to be set explicitly. I came across only a few apps that need this.

User avatar
Userfriendly
Posts: 430
Joined: Tue Nov 27, 2012 11:41 pm

Re: yaP - yet another Portablizer

#383 Post by Userfriendly »

Hey tproli, I got another specific thing I need to do but don't know how. Any idea how to exclude a folder from an app settings directory from being copied? Say I do dir = %Appdata%\SomeRandomApp :: Settings and inside the Mozilla folder is a Cache folder that I don't want to be backed up since it almost always too large and would make app startup/exit too slow if copied back and forth.

All I could think of is to clean it up after its copied with -dir = {YAPROOT}\Settings\Cache. But thats not what I want. If somehow its possible to exclude or delete before being copied over on exit is what I'm thinking. If the program had an option to delete cache on exit or limit cache size this wouldn't be a problem for me.

User avatar
tproli
Posts: 1172
Joined: Sat Sep 09, 2006 10:14 am
Location: Hungary
Contact:

Re: yaP - yet another Portablizer

#384 Post by tproli »

I'm afraid you can't do it directly (in one go). How about deleting before starting to copy settings to the portable dir? I think you'll need to use "restore" to avoid the "dir" command execute automatically first.

User avatar
Userfriendly
Posts: 430
Joined: Tue Nov 27, 2012 11:41 pm

Re: yaP - yet another Portablizer

#385 Post by Userfriendly »

tproli wrote:I'm afraid you can't do it directly (in one go). How about deleting before starting to copy settings to the portable dir? I think you'll need to use "restore" to avoid the "dir" command execute automatically first.
Well the restore = 1 thing worked. I wasn't sure on how to use the command at first but I figured it out. It worked by putting it after -dir = %Appdata%\SomeRandomApp\Cache. I kept reading the description of that setting and I still don't understand why it's called "Restore" at all. I think it sorta creates another section in between [BEFORE] and [AFTER]. Basically in between the time after app is exited but before settings are copied back to portable dir. We'll I'm not a smart man but I know I learned something new I can use from now on. :D

User avatar
tproli
Posts: 1172
Joined: Sat Sep 09, 2006 10:14 am
Location: Hungary
Contact:

Re: yaP - yet another Portablizer

#386 Post by tproli »

Userfriendly wrote: I still don't understand why it's called "Restore" at all
Believe me I had tough times to name this :) I guess you know that one of the hardest things in programming is adding meaningful names. Anyway, if you have a better suggestion then it's welcomed :)

User avatar
Midas
Posts: 6905
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: yaP - yet another Portablizer

#387 Post by Midas »

Minor bug report: when executing yaP v0.7.1[.4] without a parallel INI file and after answering positively to its prompt to create a new one, the INI file created has a reference to "yaP v0.6" in the header... it should read "yaP v0.7.1".

User avatar
tproli
Posts: 1172
Joined: Sat Sep 09, 2006 10:14 am
Location: Hungary
Contact:

Re: yaP - yet another Portablizer

#388 Post by tproli »

Thanks, will update soon. Software development management is a separate profession in which I do not excel I'm afraid :)

User avatar
Midas
Posts: 6905
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: yaP - yet another Portablizer

#389 Post by Midas »

You're doing great. Better than the whiner here... :mrgreen:

EDIT: common icon replacement methods (i.e., PE Icon Changer, QIcon Changer) don't seem to work with 'yaPX64.exe'. Any advice welcome.

just.odd.dude
Posts: 16
Joined: Sun Sep 15, 2013 7:55 am

Re: yaP - yet another Portablizer

#390 Post by just.odd.dude »

Avast blocking any download from app catalog.

https://www.virustotal.com/ru/file/0a18 ... 483727419/

Post Reply