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
tproli
Posts: 1172
Joined: Sat Sep 09, 2006 10:14 am
Location: Hungary
Contact:

Re: yaP - yet another Portablizer v0.2

#16 Post by tproli »

I see. Thanks for the reply. Perhaps I should modify yaP to make it able to do this thing internally.

User avatar
guinness
Posts: 4118
Joined: Mon Aug 27, 2007 2:00 am
Contact:

Re: yaP - yet another Portablizer v0.2

#17 Post by guinness »

I think another reason is that DOS CMDS are meant to be used for simple tasks and what you want to do is a little more complex than the average user would require. Hence looking at using a programming language to create a small console application (e.g. myregistry.exe /empty HKCU/TEST_KEY >> Print to Console details about Registry Key) is the other option.

Ruby
Posts: 324
Joined: Sat Sep 05, 2009 6:35 pm

Re: yaP - yet another Portablizer v0.2

#18 Post by Ruby »

Code: Select all

reg query /?

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

Re: yaP - yet another Portablizer v0.2

#19 Post by tproli »

For those who are interested here's yaP v0.21:

Changelog
- added support for deleting empty registry key (see DeleteRegKeyIfEmpty1 in yaP.ini)

Download yaP v0.21
See first post in topic.

Here's the free version of SyncBack, yaPped (without application files):

Code: Select all

http://hotfile.com/dl/91179643/f376c08/syncback_yap.rar.html
http://rapidshare.com/files/438679097/syncback_yap.rar
Put application files to the "App" folder.

I found that SyncBack doesn't support paths beginning with "..\" or ".\", but using a dummy directory helps:

Code: Select all

"dummy\..\..\..\MyFolder\"
Creating the dummy directory in the SyncBack folder is not necessary though. Tested only on WinXP.
Last edited by tproli on Mon Oct 24, 2011 12:00 pm, edited 1 time in total.

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

Re: yaP - yet another Portablizer v0.2

#20 Post by tproli »

I was looking for a decent (or at least usable) ebook reader for PC. Finally found FBReader which seems to be what I was looking for, opens .mobi and .epub files. First I tried JPE-ing it but things went wrong, than I yaP-ped it.

Here's the yaP wrapper:
http://rolandtoth.hu/files/FBReader_yaP.zip

Download FBReader from
http://fbreader.org/downloads.php

Extract with UniExtract and from the folder "$_OUTDIR" move the "share" folder one level up (next to FBREADER.exe).
Finally move the extracted application files to the "App" folder of FBReader_yaP.

Note that every time you open an ebook, it gets into the database of FBReader. yaP can handle that until ebooks are not moved to another location (paths are absolute in its database). So using FBReader_yaP with library locally is OK. If you don't care about the library (like me) you can use it to open your ebooks.

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

Re: yaP - yet another Portablizer v0.21

#21 Post by tproli »

Link in first post updated.

User avatar
loin2kolpotoru
Posts: 279
Joined: Fri Oct 09, 2009 11:20 am

Re: yaP - yet another Portablizer v0.21

#22 Post by loin2kolpotoru »

thankyou for updating the links.

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

Re: yaP - yet another Portablizer

#23 Post by tproli »

New version added (v0.22):

- added "silentbatch=-1" option to disable closing of cmd window (for testing purposes; don't forget setting @echo on in your batch files)
- new example setups
- download is in 7z format (takes up 75% less space)

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

Re: yaP - yet another Portablizer

#24 Post by Midas »

Made a yaP launcher for UPX-iT (here) and would appreciate if anyone told me I got everything OK... :|

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

Re: yaP - yet another Portablizer

#25 Post by tproli »

UPX-iT Exception: Runtime Error! Failed to set registry values

Don't worry, it is because I have currently no admin rights (those nasty HKLM reg entries!). I will try it at home but as I see it should work, thanks for the contribution.

Perhaps I should add an admin-check to yaP to disable launching if it is enabled in the ini file.

How about Free UPX?

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

Re: yaP - yet another Portablizer

#26 Post by tproli »

No success on WinXP SP2 with admin rights:

Image

It is perhaps because I have no msxml installed (or wrong version). Adding this line to the before.bat solved it:

Code: Select all

regsvr32 /s /i "%~dp0..\App\msxml4.dll"
Plus the corresponding part in after.bat:

Code: Select all

regsvr32 /s /u "%~dp0..\App\msxml4.dll"
Additionally I had to modify

Code: Select all

HKEY_USERS\S-1-5-21-1292428093-2147244605-682003330-1003\Software\UPXiT
to

Code: Select all

HKEY_CURRENT_USER\Software\UPXiT
to enable saving/restoring settings to settings.reg.

As you can see, the msxml is a tricky part and because of that it is not safe to use - you would have to check if there's msxml installed on the host machine and such things. But it is OK for private use of course. But perhaps this issue is not present above XP SP2.

Is there any reason you included your settings.reg?

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

Re: yaP - yet another Portablizer

#27 Post by Midas »

tproli wrote:How about Free UPX?
Featuritis? That main dialog alone gives me an headache, whereas UPX-iT is more like set and forget... :D
tproli wrote:No success on WinXP SP2 with admin rights:

Image

It is perhaps because I have no msxml installed (or wrong version). Adding this line to the before.bat solved it:

Code: Select all

regsvr32 /s /i "%~dp0..\App\msxml4.dll"
Plus the corresponding part in after.bat:

Code: Select all

regsvr32 /s /u "%~dp0..\App\msxml4.dll"
Additionally I had to modify

Code: Select all

HKEY_USERS\S-1-5-21-1292428093-2147244605-682003330-1003\Software\UPXiT
to

Code: Select all

HKEY_CURRENT_USER\Software\UPXiT
to enable saving/restoring settings to settings.reg.

As you can see, the msxml is a tricky part and because of that it is not safe to use - you would have to check if there's msxml installed on the host machine and such things. But it is OK for private use of course. But perhaps this issue is not present above XP SP2.
I see -- that msxml is v4, most systems are currently on v6, I think. Thank you very much for your input tproli. I'm on XP Pro SP3, but I'll add/check those ASAP and report back...
tproli wrote:Is there any reason you included your settings.reg?
Noobiness, I guess... ;)

EDIT: changed everything as instructed and all seems to be working. The HKEY_USERS... swapping with HKEY_CURRENT_USER... is paramount as without it -- it slowly dawned on me -- the batches would fail on a different system.

Another aspect is that, if I understand correctly, those msxml dlls are only used to write the history file, which is hardly a critical functionality, but apart from that I fail to see why they would be more dangerous than, for example, shell extensions.

One last question: while checking the batch files output, I get a bunch of "Error: The system was unable to find the specified registry key or value" lines (15, to be exact); would that be normal?

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

Re: yaP - yet another Portablizer

#28 Post by Midas »

yaPed another program, Sigil (epub editor): http://www.filedropper.com/yap-sigil-05x

Hope I was better this time. Comments welcome, as always. :)

P.S.: Is there an easy way to change yaP's icon? As things are, all portables will have the same icon (unless shortcuts are tweaked, that is)...

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

Re: yaP - yet another Portablizer

#29 Post by tproli »

I get a bunch of "Error: The system was unable to find the specified registry key or value" lines (15, to be exact)
I guess are those shell extension reg entries. If you are good at batch scripting (not like me) you could check if they exists or not and backup/restore them only when needed. But it is easier to do that every time, regardless if they are present or not. So they are not normal but I don't think they're worth the effort.

yaP icon: you cannot modify it, unfortunately. You should use a 3rd party application for this purpose.

Sigil: thanks for yaP-ping it. It started and run fine here, only some minor things:
- Trolltech registry key (better saying its subkeys) may be used by another applications, so it would be safer not to touch it, or at least not to delete it.
- first I thought something's wrong with the .bat files, but finally found that my PC is slow. I had to use wait=2000 in Sigil.ini
- I haven't tested the dictionary files but there were nothing left in USERPROFILE
- there's an empty Sigil directory left in TEMP for me

And now something completely different... yaP v0.23! :)

What's new:
- yaP now creates "EXENAME.ini" if no ini file found (instead of "yaP.ini")
- RequestExecutionLevel set to "user" - should disable UAC prompt
- new ini option: multipleinstance - option to enable or disable running multiple instances
- added example setups for Anki, CogniTrainerGSpot, FTP Wanderer, GSpot, Images2PDF, Image Tuner, ISO Workshop, MITT, ocenaudio, OverDisk, ODIN, QDictionary, ShiftN, Sizer, SoftPerfect Network Scanner, SolveSpace, SUMo, TClock Light
- added urls to example applications
- updated to NirCmd 2.65

I didn't plan to release it today but seeing your unstoppable yaP-addiction I changed my mind :)
(make a backup of the previous version though :))

Note: you have to name your yaP launcher differently than the main exe if you would like to use the new multipleinstance feature. yaP checks applications by their names, so naming them similarly will cause yaP saying "The application is already running". I use ApplicationNamePortable.exe for my launchers.

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

Re: yaP - yet another Portablizer

#30 Post by Midas »

tproli wrote:So they are not normal but I don't think they're worth the effort.
Yes, after stepping through the batches' execution, I was able to trace where the errors where coming from. I agree, it's a simple cost/benefit equation, and if the output is hidden, it's an absolute non-issue. But... (see below)
tproli wrote:yaP icon: you cannot modify it, unfortunately. You should use a 3rd party application for this purpose.
Fine, no biggie, there are other ways if only less convenient. Maybe on a future release, you could add a setting to make yaP assume the icon of the exe its INI points too...
tproli wrote:Sigil: thanks for yaP-ping it. It started and run fine here, only some minor things:
- Trolltech registry key (better saying its subkeys) may be used by another applications, so it would be safer not to touch it, or at least not to delete it.
- first I thought something's wrong with the .bat files, but finally found that my PC is slow. I had to use wait=2000 in Sigil.ini
- I haven't tested the dictionary files but there were nothing left in USERPROFILE
- there's an empty Sigil directory left in TEMP for me
After reviewing it, I hit a major snag. Whenever I set the INI option "silentbatch=1", it kind of stops working -- the user_dict file doesn't get copied, and interface options are reset. It looks as if the batches need to open the console window to perform. For the time being, I solved it by not setting that option, resorting instead to postfixing relevant lines with '>nul' and '2>nul', thus redirecting standard output and standard error... it's an ugly kludge, but it works.

I'm aware of the issue with the Trolltech key; regardless, I thought that if I found one that messed up, it would be a prime candidate to getting portabilized... :mrgreen:
tproli wrote:And now something completely different... yaP v0.23! :)
[...]
I didn't plan to release it today but seeing your unstoppable yaP-addiction I changed my mind :)
Gee, thanks. What I like about yaP is its 'quick and dirty' way to make things work -- when everything goes well, a portable is up and running in 5 minutes. Its weak spot is the batch files, which are less than evident when you want to 'push the envelope'... Previously, I had been toying with the idea of using something like GUI4CLI for that.
tproli wrote:Note: you have to name your yaP launcher differently than the main exe if you would like to use the new multipleinstance feature. yaP checks applications by their names, so naming them similarly will cause yaP saying "The application is already running". I use ApplicationNamePortable.exe for my launchers.
I do it like this, because I have to attend to several rigs which aren't always in synch -- this way I can just drop the yaPed portable where previously the app was. But thanks for the warning.

One more question: is the comment line "; settings file for yaP v2.1" at the beginning mandatory? Does it get parsed in any way?

Post Reply