You are here

Help understand PAc Logs

8 posts / 0 new
Last post
Freehunter
Offline
Last seen: 3 weeks 25 min ago
Joined: 2014-06-26 10:21
Help understand PAc Logs

Hi, I'm trying to make my first PortableApp. It has been thirty years since I did any programming and fifteen since I mucked about in the Windows registry. With the Launcher and Installer, I thought I'd give it a try. I'm going to use generic names for the App I'm trying to convert. (I have contacted the developers and will pass my results on to them.)

The program is not designed to use the registry and I assume (yeah, I know) the entries I find are normal Windows housekeeping. It does use QT and I noticed that needs potential cleanup.

The program normally puts its working files out in My Documents and leaves them there as the users library. I've setup the PortableApps version to copy the Users files from Data out to My Documents on run and back to Data on shutdown. The My Documents files are deleted. The QT entries are deleted on exit. It seems to be working but I find warnings in the logs for the Launcher and the Installer.

I wondered if they are really problems or normal for my choices. Are there obviuos mistakes I am missing? Here are the ini files and abbreviated logs:

- - - - - - - - - - -
APPINFO.INI
- - - - - - - - - - -

[Format]
Type=PortableApps.comFormat
Version=3.0

[Details]
Name=TheProgram Portable
AppID=TheProgramPortable
Publisher=TheProgram
Homepage=TheProgram.org
Category=Graphics & Pictures
Description=TheProgram is the free and open source software to 
Language=Multilingual

[License]
Shareable=true
OpenSource=true
Freeware=true
CommercialUse=true

[Version]
PackageVersion=1.0.2.0
DisplayVersion=1.0.2

[Control]
Icons=1
Start=TheProgramPortable.exe
ExtractIcon=TheProgram\TheProgram.exe

[Associations]
FileTypes=mhm,mhx
- - - - - - - - - - - - - - - - -
TheProgramPortable.ini
- - - - - - - - - - - - - - - - -

[Launch]
SplashTime=5000
LaunchAppAfterSplash=true
ProgramExecutable=TheProgram\TheProgram.exe
DirectoryMoveOK=yes
SupportsUNC=yes

[DirectoriesMove]
TheProgram=%DOCUMENTS%\TheProgram

[Activate]
Registry=true

[QtKeysCleanup]
1=Qt Factory Cache 4.8\com.trolltech.Qt.QImageIOHandlerFactoryInterface:
2=Qt Plugin Cache 4.8.false

- - - - - - - - - - - - - - - - - - - - - - - -
The LAUNCER LOG (shortened)
- - - - - - - - - - - - - - - - - - - - - - - -

MakeNSIS v2.46.5-Unicode - Copyright 1995-2009 Contributors
See the file COPYING for license details.
Credits can be found in the Users Manual.

Command line defined: "PACKAGE=G:\PortableApps\TheProgramPortable"
Command line defined: "NamePortable=TheProgram Portable"
Command line defined: "AppID=TheProgramPortable"
Command line defined: "Version=2.2.0.0"
Changing directory to: "G:\PortableApps\PortableApps.comLauncher\Other\Source"

Processing script file: "G:\PortableApps\PortableApps.comLauncher\Other\Source\PortableApps.comLauncher.nsi"
Processing plugin dlls: "G:\PortableApps\NSISPortable\App\NSIS\Plugins\*.dll"

- - - - - - - 

!insertmacro: _If
!insertmacro: end of _If
!insertmacro: InvalidValueError
MessageBox: 16: "Error: invalid value '$0' for [Launch]:MinOS. Please refer to the Manual for valid values."
!insertmacro: end of InvalidValueError
!insertmacro: _EndIf
!insertmacro: end of _EndIf

- - - - - - -

!insertmacro: _If
!insertmacro: end of _If
!insertmacro: InvalidValueError
MessageBox: 16: "Error: invalid value '$0' for [Launch]:MaxOS. Please refer to the Manual for valid values."
!insertmacro: end of InvalidValueError
!insertmacro: _EndIf
!insertmacro: end of _EndIf

- - - - - - -

!insertmacro: _And
!insertmacro: end of _And
MessageBox: 16: "Note to portable application developer: registry hive in key "$0" is bad, should start with HKCR, HKCU or HKLM. Please fix this. (The launcher will 

continue running.)"
!insertmacro: _EndIf
!insertmacro: end of _EndIf

- - - - - - -

Processed 1 file, writing output:
Adding plug-ins initializing function... Done!
Processing pages... Done!
Removing unused resources... Done!
Generating language tables... Done!

Output: "G:\PortableApps\TheProgramPortable\TheProgramPortable.exe"
Install: 0 pages (0 bytes), 1 section (16416 bytes), 4842 instructions (135576 bytes), 1441 strings (121282 bytes), 24 language tables (5808 bytes).
Datablock optimizer saved 358464 bytes (~52.6%).

Using lzma (compress whole) compression.

EXE header size:              228352 / 50176 bytes
Install code:                          (279410 bytes)
Install data:                          (93728 bytes)
Compressed data:               74377 / 373138 bytes
CRC (0x4FA99CD3):                  4 / 4 bytes

Total size:                   302733 / 423318 bytes (71.5%)

2 warnings:
  !include: could not find: "G:\PortableApps\TheProgramPortable\App\AppInfo\Launcher\Custom.nsh" (Segments.nsh:122)
  !include: could not find: "G:\PortableApps\TheProgramPortable\App\AppInfo\Launcher\Debug.nsh" (Debug.nsh:87)

- - - - - - - - - - - - - - - - - - - - - - - - -
The INSTALLER LOG (shortened)
- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
Processing script file: "G:\PortableApps\TheProgramPortable\Other\Source\PortableApps.comInstaller.nsi"
!define: "PORTABLEAPPSINSTALLERVERSION"="3.0.11.0"
!define: "PORTABLEAPPS.COMFORMATVERSION"="3.0.11"
!include: "PortableApps.comInstallerConfig.nsh"
!define: "PORTABLEAPPNAME"="TheProgram Portable"
!define: "PORTABLEAPPNAMEDOUBLEDAMPERSANDS"="TheProgram Portable"
!define: "APPID"="TheProgramPortable"
!define: "VERSION"="1.0.2.0"
!define: "FILENAME"="TheProgramPortable_1.0.2"
!define: "FINISHPAGERUN"="TheProgramPortable.exe"
!define: "CHECKRUNNING"="TheProgramPortable.exe"
!define: "CLOSENAME"="TheProgram Portable"
!define: "ADDONSDIRECTORYPRESERVE"="NONE"
!define: "INSTALLERCOMMENTS"="For additional details, visit PortableApps.com"
!define: "INSTALLERADDITIONALTRADEMARKS"=""
!define: "INSTALLERMULTILINGUAL"="true"

- - - - - - -


Processed 1 file, writing output:
Adding plug-ins initializing function... Done!
Processing pages... Done!
Removing unused resources... Done!
Generating language tables... Done!
warning: Variable "ITaskbarList3" not referenced or never set, wasting memory!
warning: Variable "INTERNALEULAVERSION" not referenced or never set, wasting memory!

Output: "G:\PortableApps\TheProgramPortable_1.0.2.paf.exe"
Install: 5 pages (320 bytes), 1 section (16416 bytes), 3346 instructions (93688 bytes), 4769 strings (295834 bytes), 60 language tables (19560 bytes).
Datablock optimizer saved 2241735 bytes (~0.9%).

Using lzma (compress whole) compression.

EXE header size:              158208 / 50176 bytes
Install code:                          (426194 bytes)
Install data:                          (234199295 bytes)
Compressed data:           161981506 / 234625489 bytes
CRC (0x5F0D3B16):                  4 / 4 bytes

Total size:                162139718 / 234675669 bytes (69.0%)

2 warnings:
  Variable "ITaskbarList3" not referenced or never set, wasting memory!
  Variable "INTERNALEULAVERSION" not referenced or never set, wasting memory!

3D1T0R
3D1T0R's picture
Offline
Last seen: 3 years 4 months ago
Developer
Joined: 2006-12-29 23:48
Why can't you tell us what "The Program" is? Mostly just tips.

First just a formatting complaint, please use the <pre> tag for INI and LOG files, <blockquote> is for when you quote a person.

Second if your [License] section is accurate then I don't see why you're asking in generic terms as you don't need to ask for permission to publish derivatives of OpenSource Freeware, let alone ask for help in repackaging them.

[License]
Shareable=true
OpenSource=true
Freeware=true
CommercialUse=true

AppInfo.ini:[Control]:ExtractIcon is not supported by the Platform (yet) so it shouldn't be used unless absolutely necessary (i.e. for legal reasons), instead the appropriate icon should be placed in the …\App\AppInfo\ folder as laid out in the Icons portion of the PortableApps.com Format Specification.

launcher.ini:[Launch]:DirectoryMoveOK & launcher.ini:[Launch]:SupportsUNC should only be set if you're absolutely certain that they are (or aren't) safe as they default to "warn" which is preferable to either yes or no in cases that are not known to be one or the other.

Moving to/from %Documents% is usually very slow and can sometimes cause conflicts with local apps, if there is some way that you can tell "The Program" to read & write these files from a folder inside the %PAL:Data% folder directly, things will be much smoother for the program's users.

I've never actually Portablised a Qt app, so I'm not sure if you're doing it right or not, but it looks about right to me.

Regarding the logs, I'm not too sure. I'll take a look at them when I get the chance later if noone else already has by then, but I'm still just getting back into PortableApps and I don't really remember what's normal for those logs.

~3D1T0R

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 1 month 2 weeks ago
DeveloperModerator
Joined: 2008-07-24 18:46
Further comments

Further to what's been mentioned here: The Qt handling looks right, I can't confirm you're not missing anything without a package to test, though. Regarding the launcher log: You can ignore both warnings, they're just saying you're not using custom code or a debug build. I'm not sure about the installer log, though. I haven't used it in a while, so can't comment on it. Did it successfully build an installer for you? If so, I'd wager you can ignore anything/everything in the log.

Freehunter
Offline
Last seen: 3 weeks 25 min ago
Joined: 2014-06-26 10:21
The installer worked

Thanks

I did have some instances of the launcher not being created and there were definite errors. I kind of assumed that successful creation with just warnings was more informational.

The installer created the paf and it worked so I hoped the log messages were informational.

This was just a concept piece. Hopefully if the program developers decide to go this way and contact PAc they can make some .ini files for user data location and make this all easier.

Again, Thanks

Freehunter
Offline
Last seen: 3 weeks 25 min ago
Joined: 2014-06-26 10:21
Well because

I'm suggesting that the developers use PAc but I don't feel I should "advertise" them in case they choose not to.

Thanks for the reply.

I wondered what tag did that on the board. I was thinking of a regular web page that wouldn't do that.

Yeah, this is a brute force approach. I was trying to give the developers a concept piece for the possibilities. They are coming up on a milestone release date and just trying to save them a little time with an example.

I did a version with the appicon.ico, this was a variation.

UNC noted.

I chose %Documents% because they put the user data out in My Documents and there are no internal or external options for changing that. When I first suggested PAc I mentioned that an .ini file for the location would be easier. The program is installed by unziping just about anywhere. Other than QT and the normal Windows housekeeping the registry is not touched.

I don't know Python and right now don't have any thing to use to compile from source for a test any way.

On some of my tries the launcher was not created so I know those were wrong. Since this seemed relatively simple I didn't think a custom.nsh or debug.nsh were required.

I did not use a .ini file for the installer because I thought the defaults covered what I was trying. Since I ran it without prompting I don't know if its warnings are serious or reminders of things to check.

Just trying to do this by going through the Launcher Manual. But wasn't sure most of the logs were informational or errors that needed fixed.

Thanks for taking a look at this.

One more question someone might answer. This program is under AGPL3. Awhile back I dug through the PAc site and if I remember correctly that was recognized as Open Source. Not sure where I found that. Is that correct.

Again, thanks for your help.

3D1T0R
3D1T0R's picture
Offline
Last seen: 3 years 4 months ago
Developer
Joined: 2006-12-29 23:48
We do better when working with a specific app then Das Programm.

If you're working with the App's Developer(s) on this, another option for redirecting Data that's normally stored locally to the %PAL:DataDir% directory would be a command-line argument (e.g. '--library-location=%PAL:DataDir%\Library') which is added via launcher.ini:[Launch]:CommandLineArguments (e.g. CommandLineArguments=--library-location=%PAL:DataDir%\Library)

Note: I wrote %PAL:Data%, but that's wrong it's supposed to be %PAL:DataDir% (I'm still rusty)

DirectoryMoveOK falls into the same 'set only when known' category as SupportsUNC does.

There are both Qt & Python apps available as Official PortableApps.com Apps which can also be used for reference.

Generally if PA.cI generates a .paf.exe for you, and you install from it and it installs correctly then you're usually safe, the exceptions being where you do something tricky (which usually falls into a Custom.nsh)
If you do end up needing a Custom.nsh there are several of us on the forums that can help out if you need it.

As you seem to have surmised, installer.ini is only needed if you need to change the installers behaviour (e.g. Online Installers & handling upgrades from previous versions)

Regarding AGPL3, if you mean the GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPL-3.0) then yes, it is OSI Approved (as can be seen on the linked page)

Also having taken a better look at the log files I'm pretty sure those are fine. In the Launcher's log the "_If", "end of _If", "InvalidValueError", "MessageBox: 16: "Error: invalid value…", etc. are just logging what it's building into the Launcher, in this case the Launcher will show an error if certain strings don't match the predefined acceptable values. Also I see nothing out of the ordinary at all in the Installer's log.

And at the end of this I want to say that if you (or they) said what App it was, more people would be able to express interest, there are lots of people out there who will not pay any attention to someone who asks a generic question and try's to apply the answers to a specific situation.
We can help you (and/or the Developer(s) of the App in question) better if you tell us what you're really doing.

~3D1T0R

Freehunter
Offline
Last seen: 3 weeks 25 min ago
Joined: 2014-06-26 10:21
Thanks

Thank you looking at it.

Forgive me for having taken up your time with this.

I had already given the developers links to PAc and the necessary tools, I'll stop now with the questions.

Rest assured I will resist future temptations to help someone. Nor will I take up someone's time by trying to learn how to make PortableApps.

3D1T0R
3D1T0R's picture
Offline
Last seen: 3 years 4 months ago
Developer
Joined: 2006-12-29 23:48
What the heck, that's not what I was saying at all.

I was just saying that you'll get a better and more helpful response if you tell us what you're working on, not that you shouldn't ask for help or that you shouldn't help people.
Please, learn to make PortableApps it's fun, it's not too difficult, and I think we have a great community.

Please keep asking questions.

I just think you should say 'I need help with this program' and tell us what program you're working on rather than saying 'I need help with a program, but I'm not going to tell you what it is.'

P.S.: Don't worry about taking up my time, if I don't want to give you my time I won't bother. I just meant that there are (other) people who might be able to help, who might not bother to try because you're using generic terms instead of talking about a real app.
Please don't be scared off by anything I've said here. I'm just trying to be helpful.

~3D1T0R

Log in or register to post comments