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: 6727
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: yaP - yet another Portablizer

#136 Post by Midas »

tproli wrote:Perhaps yaP needs a new feature for [FILES]: "create"? That would create a new empty file with a given name.
  • In the KISS spirit, for me it would be enough if yaP ensures required file(s) get placed where appropriate before program execution.
tproli wrote:In my quick test no directory was created even if there was no dcsettings.ini (not in the App dir and not in the launcher root, using yaP-ped DiskCleanerPortable).
  • Does that mean the "-p" option is enough for portability? Great, but no harm done by the extra file apart from its redundancy. :)

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

Re: yaP - yet another Portablizer

#137 Post by tproli »

The problem is that often there are no files to place. Think about the first start of a portable: no settings file is created by the main application, so on first run yaP cannot copy or check anything.

freakazoid
Posts: 1212
Joined: Wed Jul 18, 2007 5:45 pm

Re: yaP - yet another Portablizer

#138 Post by freakazoid »

tproli, great job on the yaP site.

Can I request that you put app version numbers beside the .ini files or in the modal window? This is so we can find out what app version the .ini file is applicable to.

Also, it might be nice to add a site changelog tab to know about the newest yAP'd apps or if there are any changes in yaP itself.
is it stealth? ;)

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

Re: yaP - yet another Portablizer

#139 Post by tproli »

Yes, there are numerous things like that to add, like the version number, small description, additional howto, folder structure, name who suggested the app, changelog, etc. I don't know how to add these nicely but I will surely come up with something later.

freakazoid
Posts: 1212
Joined: Wed Jul 18, 2007 5:45 pm

Re: yaP - yet another Portablizer

#140 Post by freakazoid »

Great! Glad it's on your radar! :)
is it stealth? ;)

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

Re: yaP - yet another Portablizer

#141 Post by Midas »

tproli wrote:The problem is that often there are no files to place.
At the discretion of the portable maker, I meant. :)

EDIT: Here's a more complex launcher that I was unable to pull through; it's for the Windows version of Claws-Mail...

http://pastebin.com/D1V7gBn0

I was able to redirect configuration files easily with "commandline=--alternate-config-dir {YAPROOT}\Data" but no matter what I try, user folders ('claws-mail' & '{account-name}') always get created at Windows %APPDATA% location... :(

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

Re: yaP - yet another Portablizer

#142 Post by Midas »

I kept thinking about updating the default yaP icon but couldn't find anything good enough for free, so I decided to try my hand with IcoFX (and freeware icons 'Package' by Marco Martin and 'Download' by Asher).

A first proposal: http://pnin.minus.com/mbpl18taA9p7Dn...

The green package significance should be self-evident. Further debate and proposals welcome...

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

Re: yaP - yet another Portablizer

#143 Post by tproli »

I think that's too complex for 32x32 px size, and too similar to DropIt :wink: ... Neither I have found a better icon but that's only a minor issue. I also used keywords "box" and "launch", "play", "portable" but no success yet.
Thanks for the proposal though.

Just saw your comment on Claws-Mail, I will check that later.

freakazoid
Posts: 1212
Joined: Wed Jul 18, 2007 5:45 pm

Re: yaP - yet another Portablizer

#144 Post by freakazoid »

Check out findicons.com to search for good icons to use. I've used it in the past to find some decent icons for some projects.
is it stealth? ;)

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

Re: yaP - yet another Portablizer

#145 Post by tproli »

No success with Claws-Mail. Perhaps playing with account settings could help though I was not able to redirect mail folders.

I also fixed a bug (create dirs when {YAPROOT} was used) but this did not help anything in this particular case.

I have used several icon search engines but haven't found the right one. Anyway, let this be the biggest bug :)

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

Re: yaP - yet another Portablizer

#146 Post by Midas »

tproli wrote:No success with Claws-Mail.
Schade. Claws is a favorite on Linux; I could turn to the devs (or John T., since his PAc seems to work alright) but that requires more commitment than I have available ATM...

<rant>

This isn't the first time I come across a Windows port of a Linux program (I'm looking at Virtaal, for instance) that got burdened with hard-coded paths and unneeded dependencies in the cross over. So much for the proverbial user liberties outside of the open platform, it seems... :(

In the spirit of igniting awareness, some apropos pointers: </rant>
tproli wrote:I have used several icon search engines but haven't found the right one. Anyway, let this be the biggest bug :)
Easily... :D

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

Re: yaP - yet another Portablizer

#147 Post by tproli »

I checked the PA version and what it does is simply copy user folder to the %AppData% forth and back. This could do yaP too of course but I'm afraid that would take much time when the mail folder grows large. If that's OK, I could release a yaP version but the use of the environment variables would be the best solution. Unfortunately that seems not working and I think that's a bug in the Windows version of Claws-Mail.

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

Re: yaP - yet another Portablizer

#148 Post by Ruby »

I made Geany IDE into yaP

Download the FULL Installer from HERE and install to e.g. C:\Geany - it (Un)Installs from the registry cleanly and only leaves the folders mention below, which are easlily removed.
Skip the 'shortcuts' and 'Language' files (etc\locale ~ 25 MB) and your left with ~16 MB.

Copy the entire 'Geany' directory to another location and then uninstall. You can exclude the 'Geany.lnk' and uninstaller from copy.
Delete the folders/directories %APPDATA%\gtk-2.0 and %APPDATA%\geany also the file %USERPROFILE%\.recently-used.xbel

The 'geany' config folder will be (re)created (as 'store') in the root of the portable Geany via a commandline arg (-c) which defines the current config location as opposed to 'Global' and is relative to Geany's root.

Place the yaP exe and ini at the root of the Geany directory.
That's about it, from this point on yaP handles the copying/moving around of the files/dirs.

Properties used:

Code: Select all

[GENERAL] 
; general launcher settings

application=bin\Geany.exe
applicationX64=
; main app to run (absolute/relative path). REQUIRED. 
; "App\MyApp.exe", "..\MyApp.exe", "%PROGRAMFILES%\MyApp.exe", "C:\MyApp.exe"

commandline=-c store
; command line parameters to pass to the main app. Example: "/nosplash"

[DIRECTORIES]
; main app's settings directory to backup/restore (absolute path)
store\gtk-2.0=%APPDATA%\gtk-2.0

[FILES]
; main app's setting files to backup/restore (absolute path)
store=%USERPROFILE%\.recently-used.xbel
The files/dirs are copied/moved back/forth to/from the 'store' sub-directory.

I had 1 issue where I couldn't set/define the path variable (without a batch) as is needed for MinGW:
e.g.

Code: Select all

PATH=%~d0\Devel\MinGW\bin;%PATH%
or
PATH=%~dp0..\..\MinGW\bin;%PATH%
Either/Both will work, however I couldn't figure out a way in the yaP.ini (am i missing something).

Here's an example of the batch script I've used; which handles all the copying/(re)moving of files/dirs AND the path variable:

Code: Select all

@echo off
cd /d %~dp0
PATH=%~d0\Devel\MinGW\bin;%PATH%
if exist %APPDATA%\gtk-2.0 (
move %APPDATA%\gtk-2.0 %APPDATA%\gtk-2.0.bak
)
if exist %USERPROFILE%\.recently-used.xbel (
move %USERPROFILE%\.recently-used.xbel %USERPROFILE%\.recently-used.xbel.bak
)
xcopy /iy %~d0\Devel\Geany\store\gtk-2.0 %APPDATA%\gtk-2.0
copy /y %~d0\Devel\Geany\store\.recently-used.xbel %USERPROFILE%\.recently-used.xbel
start /wait Geany.exe -c store
xcopy /iy %APPDATA%\gtk-2.0 %~d0\Devel\Geany\store\gtk-2.0
rd /s /q %APPDATA%\gtk-2.0
REM ~ del /f /q %USERPROFILE%\.recently-used.xbel
move /y %USERPROFILE%\.recently-used.xbel %~d0\Devel\Geany\store\.recently-used.xbel
move /y %APPDATA%\gtk-2.0.bak %APPDATA%\gtk-2.0
move /y %USERPROFILE%\.recently-used.xbel.bak %USERPROFILE%\.recently-used.xbel
This batch is actually a modified version (more users aware) of what I use as I don't copy the files back/forth but rather remove them.

Thanks tproli for your work on the yaP project; it's a little jewel of an app.

~Ruby

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

Re: yaP - yet another Portablizer

#149 Post by tproli »

Thanks for the suggestion, Gleany looks promising.

Here is my config (extract):

Code: Select all

[GENERAL] 
application=App\bin\Geany.exe
commandline=-c "{YAPROOT}\Settings"

[DIRECTORIES]
Settings\gtk-2.0=%APPDATA%\gtk-2.0

[FILES]
Settings=%USERPROFILE%\.recently-used.xbel

[ENVIRONMENT VARIABLES]
PATH=..\..\MinGW\bin
LANGUAGE=en
Notice that I modified the "store" directory name to "Settings".

I used "{YAPROOT}\Settings" in the command line to ensure passing absolute path.

As you can see, the last section is for environment variables. I have no MinGW so I couldn't test. These variables are for the current "session" only, that is, available only for yaPped Gleany and its subprocesses. So if you call MinGW from within Gleany it may work, otherwise not. Note that I used "..\..\" in the path, perhaps that needs an absolute path, try "{YAPROOT}\..\..\MinGW\bin" or full absolute path if it fails.
If it doesn't work, you can try adding a before batch feature of yaP to set the PATH.

I also added the LANGUAGE environment variable to the config, this forces starting Gleany with English interface, otherwise defaults to system default. This env. var is common to gtk-based apps like Gimp, MyPaint, etc, and works here too.

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

Re: yaP - yet another Portablizer

#150 Post by Ruby »

Doh! What was I thinking using the batch %! variable when -as you point out- I should be using a relative path.

I changed the ENV VAR; either of the following will work

Code: Select all

PATH=..\..\MinGW\bin;%PATH%
PATH=\Devel\MinGW\bin;%PATH%
I didn't use the {YAPROOT} macro for Geany as I knew it used it's root directory as a path variable and didn't think it was necessary (see image):

Image

Anyway, thanks again!

~Ruby

Post Reply