You are here

PortableApps.com Updater 1.0 ALPHA 2 (outdated)

107 posts / 0 new
Last post
MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
PortableApps.com Updater 1.0 ALPHA 2 (outdated)

You'll find the actual page here:https://portableapps.com/node/12584>

Application: PortableApps.com ™ Updater
Category: Utilities
Description: Holds Your PortableApps up to date.

Download PortableApps.com ™ Updater 1.0 ALPHA2 [1.2MB download / 1.4MB installed]
(MD5: 44d495a5f39424eb220c2e91c536e644)

Features
PortableApps Updater is an update tool with features like:

  • automatic update of all hosted Apps
  • multi-language support (offers the right localized package/informations depending of the selected language)
  • built in md5sum check for the offered packages
  • Support of all packages in paf format (Installer and 7-Zip packages)
  • Configuration with ini or command line
  • built in support for randomized mirror servers
  • built in support for http and ftp sources
  • built in support for the Sorceforge and OOoDev mirror network
  • proxy support (Windows Proxy by default, own proxy server, no proxy)
  • personal blacklist (block update offers for unwanted Apps)
  • recommend packages / make packages mandantory
  • support for local or private web based (other servers than PortableApps.com) Application management

It uses GNU Wget Version 1.11 as a binary version found on: http://wget.addictivecode.org/
(This version was compressed with upx --best --compress-icons=0 --crp-ms=999999 in order to save space.)
Learn more about GNU Wget
... in the Wget manual
... in the Wget Wiki
More about GNU wget...

Release Notes:

Version 1.0 ALPHA2 (2008-03-12):

  • Fix width of component page (thanks to John Smile )
  • Defaults changed (packagedir set to $TEMP, pdel=true)
  • Fix Path to license.txt



Version 1.0 ALPHA1 (2008-03-12):

  • initial relase (it is stable but ALPHA for several reasons)

Version 1.0 1.0 ALPHA1 (2008-03-12): Initial release

Many thanks to Simeon for first tests, feedback and all the answers releated to questions and requests for this tool in the forums :-). Thanks to John (and all the contributors) for the installer and to the translators for the needed strings.

José Pedro Arvela
Offline
Last seen: 5 years 12 months ago
Joined: 2007-07-10 07:29
AWESOME!!!

It is AWESOME!!! I love it. And it is using the multi-language installer and my pt-PT translation for the updater!!!

It is clean and professional and I will from now on use it on my pen.

Suggestion: Can you make the app selection box a little bigger? It is too small in my opinion.

Love it.

EDIT: On the app page application is written applikation. Just for you to know.

Blue is everything.

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
String fixed :-)

What are translations for ... than to use it? Wink

The App-Selection Box is created by NSIS. There is no easy way to change it
(This in one reason for the Alpha state). If You'll use a blacklist for non wanted Apps and/or nearly all Apps are up to date the selection box is big enough Smile

Marko

Paid for Software more or less?
What You need is OSS!

José Pedro Arvela
Offline
Last seen: 5 years 12 months ago
Joined: 2007-07-10 07:29
Yep

The app selection box is small... horizontally, if you understand what I mean. The problem is that I can't see the complete name of the app. But it is an minor issue.

A nice idea: automatically know which apps you want updated after first use (the app saves info about the programs updated last time, and saves them to a list of app that will be the only ones updated for next time).
And a silent switch... if the first one is implemented. Maybe even integration with PAM 1.1 or 1.5... (giving some kind of yellow dialog box from the taskbar warning that updates are available and automatically updating the apps when PAM is launched)

But these are ideas for a more distant version aren't they?

Blue is everything.

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
Most requests are still there ...

...
as I said, there is no easy way to change this (perhaps we could use a own page instead of the components page but this will not be fixed soon)

"A nice idea: automatically know which apps you want updated after first use (the app saves info about the programs updated last time, and saves them to a list of app that will be the only ones updated for next time)."

The sense of an updater is to check all wanted stuff (it compares local and published versions on only offers new packages. There is no need to save informations about updates cause this informations could be wrong or obsolet if there was a manual update of the package between last check and actual check)

One feature could be to set all not selected packages on the blacklist (You have to remove it in the settings.ini) instead to put it on the blacklist by editing settings.ini.

"And a silent switch..."
... ist still present (see default settings.ini for more informations).

The integration in the PAM is on the todo list. But we will check if we could do the updater in Delphi for better integration.

If the PAM team is willing to integrate this version in a mod or (future development) version its easy to find a way to tell the menu, that updates are available. But this should be only second choise and its up to John and the PAM team.

Paid for Software more or less?
What You need is OSS!

LOGAN-Portable
LOGAN-Portable's picture
Offline
Last seen: 11 years 11 months ago
Developer
Joined: 2007-09-11 12:24
Nah

"The integration in the PAM is on the todo list. But we will check if we could do the updater in Delphi for better integration."

Hmm maybe you should not do that and keep using NSIS. I'm sure PAM can read any info the updater writes in an ini and communicate like that. I am glad it's NSIS because mortals like us could fiddle with it. If you move it into a delphi application then it's not easy to use/modify by everybody.

Oh PS. a Update finish page would have been cool.

Dijaboro
Dijaboro's picture
Offline
Last seen: 2 years 1 month ago
Joined: 2007-04-19 02:49
thx for this app but ...

i started the first time. on the first view nothing happens for the user. so i started it again. a few seconds later i get the feedback all apps up-to-date. so i closed the dialog. even a few seconds later the dialog popup again (second start).

the user is the origin of many errors. so maybe this can be reduce by an search-for-update-whatever-dialog during checking for updates. the silent mode should be activated by the user themself

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
This is another issue ...

... I'll check if there is an quick solution for it.

Marko

Paid for Software more or less?
What You need is OSS!

NeoRame
NeoRame's picture
Offline
Last seen: 4 years 1 month ago
Joined: 2007-05-11 09:12
First i must say its awesome

First i must say its awesome app and idea but...

1. when i select a few apps, on the left side it doesnt refresh the install size...
2. the German locale doesnt show ä,ü,ö in the app description
3. and there are no all apps listed (like FF, TB, Filezilla....)

and i think you can a little bit widen the applist, and you need a new icon Wink

but for now and for an alpha awesome work

regards
NeoRame

Hell was full, so I came back!!!
Sorry for my lousy English!!!

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
Its Alpha :-)

1. That's another reason for alpha state (There is no simple way to refresh the install size cause the installer don't know it at compilation time... I've searched long time for a better solution but found none, thats why You can read the "Don't trust the install size" hint on the left of the component box)
2. That's why the App descriptions are readed from a plain text file and I found no way at the moment to show them correct if ö and so on are present in the strings.
3. Only outdated Apps are offered :-9 Check if You have still the last version Smile

Marko

Paid for Software more or less?
What You need is OSS!

LOGAN-Portable
LOGAN-Portable's picture
Offline
Last seen: 11 years 11 months ago
Developer
Joined: 2007-09-11 12:24
Great start. Although I have

Great start. Although I have a few questions and remarks.

When I started it, I selected all available apps, but it didn't show only the out-of-date apps (Based on the versions in AppIni)? I got the feeling it downloaded and installed every application.

A way of seeing current version against available version would be usefull.

So although I kept my portableapps quite up-to-date it doenloaded everything.

Is there a special reason you didn't use the download dll option of NSIS but wget?

Is there a way you could implement using the actual sourceforge page to check version updates? (Like the WFX_Versions plugin of firefox) This would eliminate the need to manually keep an external ini file up to date for every released application.

Application related:
InkScape Portable setup is in German language. Was the official paf.exe German??

Ereaser Portable not removed from list after update...

Maybe the updater should offer an option to remove the old version for a clean install. (I don't know how far the installer handles removing obsolete files.

Good job, keep'em coming!

PS. It doesn't delete the downloaded installers from Data\Setup

Simeon
Simeon's picture
Offline
Last seen: 10 years 2 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
But

It has a switch to delete the installers. Check the [cleanup] section of the settings.ini.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
Some answers ...

*Only Apps with different version to the published one should be offered
*download.dl don't work right with proxy
*Inkscape is not official PA version (it was wrong version too) it was included to show the use of different mirrors. Now the same version as on SF is delivered.
In a final version only pa packages will be delivered.

Marko

Paid for Software more or less?
What You need is OSS!

John T. Haller
John T. Haller's picture
Offline
Last seen: 4 hours 12 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Quick Suggestions

Nice start, Marko Smile A couple suggestions:

You can fix the horizontal width issue by adding !define MUI_COMPONENTSPAGE_SMALLDESC just before the insert macros for the pages. The Multi installer does this. Or you can use the same with NODESC to leave it off entirely.

Also, I'd recommend downloading to the local TEMP directory by default and deleting when done by default. Most people will be using smaller flash drives and writes will be slow and space will be at a premium.

Sometimes, the impossible can become possible, if you're awesome!

Stevoisiak
Stevoisiak's picture
Offline
Last seen: 5 years 4 months ago
Joined: 2008-02-05 11:22
This seems a perfect update

I think auto-updates for apps would be a great addition to the standard menu

Simplifying daily life through technology

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
Thank You ...

... for the inspiration Wink

The new installers and launchers are a great starting point :-).

I'll make the changes with the next Alpha release.

Marko

Paid for Software more or less?
What You need is OSS!

wk
wk's picture
Offline
Last seen: 1 year 6 months ago
Joined: 2007-09-05 12:31
works great..

some suggestions:
- if an app is installed to a subfolder (e.g. using categorizer )or a different folder, updater might remember the path..?
- new icon...
-final window like "you´re done" or "finished install/upgrade" would be appreciated

Edit: when being final an integration into PAM like the backupmenu (with button or in the options menu)should be thought of.

Anyway good work.. Wink

"Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis .." Friday Next -
"May The Schwartz be with You!" Yogurt the Yoda

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
Some answers

*subfolders are not supported at the moment, cause PA.com Platform doesn't support it
*If someone could create a better icon I'll be happy...
*finish page should shown as default (there was a bug in the default settings) Smile if you use settings.ini set Finish=true in the 'Show' section or delete the entry Smile

Marko

Paid for Software more or less?
What You need is OSS!

LOGAN-Portable
LOGAN-Portable's picture
Offline
Last seen: 11 years 11 months ago
Developer
Joined: 2007-09-11 12:24
I can't recompile the

I can't recompile the source
!include: could not find: "Time.nsh"

Shawn Faucher
Shawn Faucher's picture
Offline
Last seen: 15 years 4 months ago
Developer
Joined: 2007-10-23 22:14
You need time plugin

http://nsis.sourceforge.net/Time_plugin

Also need:
http://nsis.sourceforge.net/MD5_plugin
http://nsis.sourceforge.net/Setting_Environment_Variables_to_Active_Inst...

Also have to change "..\..\..\..\Common\Lisenz.txt" to "License.txt" since the original was not provided in the source.

formerly rayven01

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
No need to change ...

... License.txt (GPL) is fixed in the ALPHA2.

Marko

Paid for Software more or less?
What You need is OSS!

arqbrulo
arqbrulo's picture
Offline
Last seen: 4 years 10 months ago
Joined: 2006-08-10 16:38
Alpha 2?

I downloaded Alpha 2 (I think, it's called ALPHA 2), but the fixes that you mentioned are not implemented.

EDIT: never mind, the link is still to download alpha 1, not 2.

"In three words I can sum up everything I've learned about life: it goes on." -- Robert Frost
"In three words I can sum up everything I've learned about life: baby ain't mine." -- Adam Holguin

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
Wrong link ...

... fixed now. Thank You for the ping!

Marko

Paid for Software more or less?
What You need is OSS!

Dijaboro
Dijaboro's picture
Offline
Last seen: 2 years 1 month ago
Joined: 2007-04-19 02:49
[BUG] wrong dialog after install app via updater

App Version alpha2
OS Version Windows XP Service Pack 2 (fully patched) german
Install Path \PortableApps\PortableAppsUpdater
Upgrade? upgraded alpha1 to alpha2
Expected after installatiom eraser via updater a dialog get visible as like "all app up-to-date"
Actual dialog with following text visible "Die Installation von PortableApps wird abgeschlossen
PortableApps 1.0.0 wurde auf ihrem Laufwerk installiert/aktualisiert.
Bitte klicken Sie auf 'Beenden', um diesen Assistenten zu schliessen.
Reproduce
1. Launch Updater
2. Select Eraser for Update
3. use default download folder
4. download the app
5. start installation of eraser
6. finish insatllation
7. dialog with wrong text popup

ps: marko i think i don't have to translate the dialog text for you Wink

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
No bug ...

... it is the right string (the one used by the installers) but we should change it.

Marko

Paid for Software more or less?
What You need is OSS!

digitxp
digitxp's picture
Offline
Last seen: 13 years 3 months ago
Joined: 2007-11-03 18:33
Awsome!

This is awesome :D. I think this would make a great launcher integration to the suite installer, I've noticed a lot of people wanting a suite installer that you can select. Then John could make an online version (with this installer), and an offline version (which I think would be too much for him..).

Insert original signature here with Greasemonkey Script.

LOGAN-Portable
LOGAN-Portable's picture
Offline
Last seen: 11 years 11 months ago
Developer
Joined: 2007-09-11 12:24
I don't think I get the

I don't think I get the online bit, but I agree this could be a useful addition to the portable platform. Saves a lot of time browsing back and forth to download all updates and install all downloaded files and then deleting the installers. Very cool to have this a platform app. (That should be incorporated into the official suite).

I'm still lurking to find any new Alpha's, Beta's, Charlie's and Delta's for the new platform description, the menu, etc. I'm unsure if the source of the platform has finally uploaded to SVN...

At least I'm glad he didn't waited with posting this until the new PAM was released.. I'm to impatient to wait for it, lol.

I kinda feel sad the MOD's aren't updated anymore due to the developers all joined the official PAM. There was always some update to play with Biggrin

digitxp
digitxp's picture
Offline
Last seen: 13 years 3 months ago
Joined: 2007-11-03 18:33
By online

I mean auto-download...
Anyways, I would love if Marco (or Marko, whichever is correct) could add comments, as I am not very experienced with user variables that are self-explanatory :P.

Insert original signature here with Greasemonkey Script.

arqbrulo
arqbrulo's picture
Offline
Last seen: 4 years 10 months ago
Joined: 2006-08-10 16:38
Temp folder

it's my opinion that the files should be downloaded to the TEMP folder NOT the TEMP\Data\settings folder.

"In three words I can sum up everything I've learned about life: it goes on." -- Robert Frost
"In three words I can sum up everything I've learned about life: baby ain't mine." -- Adam Holguin

rab040ma
Offline
Last seen: 6 months 1 day ago
Joined: 2007-08-27 13:35
Why would it matter if they

Why would it matter if they go to a subdirectory of %TEMP% if the subdirectory is deleted afterwards? Or are you saying that the TEMP\Data\settings folder is on the USB drive? I think that has been fixed.

MC

Kevin Porter
Kevin Porter's picture
Offline
Last seen: 10 years 10 months ago
Developer
Joined: 2007-01-10 19:25
Great!

Everything works great. I have no complaints.

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

José Pedro Arvela
Offline
Last seen: 5 years 12 months ago
Joined: 2007-07-10 07:29
It looks OK

It looks OK. The new App selection box is great. If you want I can try to make a new icon for it (no guarantees that it will be finished or look good). Just tell what you want it to look.

Blue is everything.

wk
wk's picture
Offline
Last seen: 1 year 6 months ago
Joined: 2007-09-05 12:31
Alpha 2 doesn´t close, when it doesn´t find PortableAppsSite

This morning there were some difficulties in getting to this site, though my internet connection had no problem. So I took the chance and tried the installer.On first attempt it said something like "everything is up to date". Next time it showed the Gui but no apps were listed in the window, only checkboxes, third time nothing happend. When safely removing, the drive couldn´t be removed but with unlocker, killing all three running Updaters+wget processes.
This could be a bug, perhaps updater should close with a short notification like "PA site not found, updater will be terminated,please try again later.."

"Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis .." Friday Next -
"May The Schwartz be with You!" Yogurt the Yoda

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
You are right...

... this will be fixed in the next version, the license issue too and it will get a new feature (auto-update itself).

Thank You for Feedback.

Marko

Paid for Software more or less?
What You need is OSS!

Simeon
Simeon's picture
Offline
Last seen: 10 years 2 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
Alpha2

works fine. But what about having the license displayed only once like the Mozilla installers do?

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

muskrat
muskrat's picture
Offline
Last seen: 2 years 6 months ago
Joined: 2005-12-09 08:24
Huh? Lots of checkboxes without labels

Umm, maybe I'm missing something, but I wanted to test this application out but I'm getting a really weird dialog window.

I've posted a screen capture to assist with my lack of description here http://muskratsplace.atspace.com/PATesting.html

Win2K Pro SP4
Admin Rights

/s/ When life turns your dreams to dust, vacuum Wink

wk
wk's picture
Offline
Last seen: 1 year 6 months ago
Joined: 2007-09-05 12:31
was the same I described in my last post.

Happened when PortableApps site couldn´t be found this noon.

"Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis .." Friday Next -
"May The Schwartz be with You!" Yogurt the Yoda

rab040ma
Offline
Last seen: 6 months 1 day ago
Joined: 2007-08-27 13:35
Doesn't happen very often,

Doesn't happen very often, but it sounds like there should be a "not found, try again later" message at that point.

MC

muskrat
muskrat's picture
Offline
Last seen: 2 years 6 months ago
Joined: 2005-12-09 08:24
I actually think it is network related...

From home and other networks I can get the listings. But while at work I keep getting the blank listing. I know that they filter some ports here so maybe that's what's going on...

I haven't actually run it yet from home, so I can not provide any other useful information at this time.

/s/ When life turns your dreams to dust, vacuum Wink

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 2 months ago
Joined: 2006-01-06 21:27
Ow.

Code. Bad.

I'll clean this up a bit when I have time, but why are you using 50 description texts?
My thoughts are to change this to a listbox and use nsDialogs. All in favour?

"If you're not part of the solution, you're part of the precipitate."

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 2 months ago
Joined: 2006-01-06 21:27
Quickly.

This is a quick cleanup of some things I saw.

  • Instead of having (!!!), the message box now uses the MB_ICONEXCLAMATION icon
  • Changed a few Langstring lines to LangString and ${LANG_German} to ${LANG_GERMAN} for consistency
  • Changed the MD5 check failure message to explain a bit better (still needs localisation)
  • Commented some sections a bit better

Code here:

; === Defines ===
!define SHORTNAME "PortableAppsUpdater"
!define VERSION "1.0.0.2"
!define FILENAME "PortableAppsUpdater"
!define PRODUCT_NAME "PortableApps"
!define PRODUCT_VERSION "1.0.0"
!define NAME "${PRODUCT_NAME} ${PRODUCT_VERSION}"
!define PRODUCT_PUBLISHER "PortableApps.com / OpenOffice.org Deutschland e. V."
!define PRODUCT_WEB_SITE "http://oooportable.org"

; === App info ===
Name "${PRODUCT_NAME}"
OutFile "..\..\${FILENAME}.exe"

; === NSIS options ===
SetCompressor /SOLID lzma
CRCCheck on
AutoCloseWindow True
RequestExecutionLevel user
AllowRootDirInstall true

; === MUI start ===
!include MUI.nsh
!include FileFunc.nsh
!include LogicLib.nsh
;!insertmacro DriveSpace
!insertmacro GetOptions
;!insertmacro GetDrives
;!insertmacro GetRoot
;!insertmacro GetSize
!insertmacro GetParent
!include "Time.nsh"
!include "Sections.nsh"
!include "Registry.nsh"
!include "TextFunc.nsh"



; MUI Settings
!define MUI_ABORTWARNING
;!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
!define MUI_ICON "..\..\App\AppInfo\appicon.ico"
BrandingText "PortableApps.com - Your Digital Life, Anywhere™"

; Language Selection Dialog Settings
!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
!define MUI_COMPONENTSPAGE_SMALLDESC
; Welcome page
!define MUI_WELCOMEFINISHPAGE_BITMAP "PortableApps.comInstaller.bmp"
!define MUI_WELCOMEPAGE_TITLE "${NAME}"
!define MUI_WELCOMEPAGE_TEXT "$(welcome)"
!define MUI_PAGE_CUSTOMFUNCTION_PRE welPre
!insertmacro MUI_PAGE_WELCOME
!define MUI_PAGE_CUSTOMFUNCTION_PRE licPre
; License page
!insertmacro MUI_PAGE_LICENSE "..\..\Other\Source\License.txt"
!define MUI_PAGE_CUSTOMFUNCTION_PRE compPre
; Components page
!define MUI_PAGE_COMPONENTS_TITLE "Titel"
!define MUI_PAGE_COMPONENTS_TEXT "Text"
!insertmacro MUI_PAGE_COMPONENTS
!define MUI_PAGE_CUSTOMFUNCTION_PRE dirPre
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeave
; Directory page
!define MUI_PAGE_DIRECTORY_TITLE "Titel Dir"
!insertmacro MUI_PAGE_DIRECTORY
!define MUI_PAGE_CUSTOMFUNCTION_PRE instPre
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
!define MUI_PAGE_CUSTOMFUNCTION_PRE finPre
; Finish page
;!define MUI_FINISHPAGE_RUN "$INSTDIR\StartPortableApps.exe"
!define MUI_FINISHPAGE_TEXT "$(finish)"
!insertmacro MUI_PAGE_FINISH

; Language files

!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Portuguese"
!insertmacro MUI_LANGUAGE "Spanish"

!insertmacro MUI_RESERVEFILE_LANGDLL

; === German translations ===
LangString welcome ${LANG_GERMAN} "Dieser Assistent wird Sie durch die Online Installation\rbzw. das Online-Update Ihrer PortableApps führen.\r\n\r\nBitte beachten Sie, dass dafür eine Internetverbindung erforderlich ist.\r\n\r\nWenn Sie ein Upgrade von existierenden Installationen Ihrer Anwendungen durchführen, schliessen Sie diese bitte, bevor Sie fortfahren.\r\n\r\nKlicken Sie auf 'Weiter', um fortzufahren."
LangString finish ${LANG_GERMAN} "${NAME} wurde auf Ihrem Laufwerk installiert/aktualisiert.\r\n\r\nBitte Klicken Sie auf 'Beenden', um diesen Assistenten zu schliessen."
LangString plok ${LANG_GERMAN} "ist aktuell!"
LangString checkforplatform ${LANG_GERMAN} "PortableApps.com Platform überprüfen"
LangString refreshmenu ${LANG_GERMAN} "PortableApps.com Menü neu laden"
LangString components ${LANG_GERMAN} "Wählen Sie die Komponenten aus, die Sie installieren/aktualisieren möchten."
LangString c_subtext ${LANG_GERMAN} "Achtung!"
LangString c_subtext2 ${LANG_GERMAN} "Wählen Sie die Komponenten aus, die Sie installieren/aktualisieren möchten und wählen Sie diejenigen ab, die Sie nicht installieren wollen. Die Speicherangaben stimmen nicht!"
LangString d_subtext ${LANG_GERMAN} "Die heruntergeladenen Installationspakete für ${NAME} (je nach Auswahl bis zu 200 MB) werden in dem unten angegebene Verzeichnis gespeichert. Falls Sie in ein anderes Verzeichnis installieren möchten, klicken Sie auf Suchen und wählen Sie ein anderes Verzeichnis aus."
LangString d_label ${LANG_GERMAN} "Speicherort für heruntergeladene Installationspakete von ${NAME}"
LangString d_button ${LANG_GERMAN} "Suchen"
LangString allok ${LANG_GERMAN} "Keine Aktualisierung erforderlich!"
LangString wrongdir ${LANG_GERMAN} "Fehler: Das gewählte Verzeichnis hat $R0 Leerzeichen.$\nBitte wählen Sie ein anderes Verzeichnis."
LangString deleteok ${LANG_GERMAN} "Wollen Sie wirklich alle Dateien in $INSTDIR/setup löschen?"

; === English translations ===
LangString welcome ${LANG_ENGLISH} "This wizard will guide you through the installation of your PortableApps.\r\n\r\nIf you are upgrading existing PortableApps, please close them before proceeding.\r\n\r\nClick Next to continue."
LangString finish ${LANG_ENGLISH} "${NAME} has been installed on your device.\r\n\r\nClick Finish to close this wizard."
LangString runwarning ${LANG_ENGLISH} "Please close all instances of ${CLOSENAME} and then click OK.  The portable app can not be upgraded while it is running."
LangString invaliddirectory ${LANG_ENGLISH} "The destination folder you selected is invalid.  Please choose a valid folder."
LangString notenoughspace ${LANG_ENGLISH} "The device you have selected to install to does not have enough free space for this app."
LangString checkforplatform ${LANG_ENGLISH} "Checking for PortableApps.com Platform"
LangString refreshmenu ${LANG_ENGLISH} "Refreshing PortableApps.com Menu"
LangString plok ${LANG_ENGLISH} "is up to date!"
LangString components ${LANG_ENGLISH} "Select the components to install/update."
LangString c_subtext ${LANG_ENGLISH} "Attention!"
LangString c_subtext2 ${LANG_ENGLISH} "Select the components to install/update and unselect unwanted packages. Don't trust the needed space count, it is wrong!"
LangString d_subtext ${LANG_ENGLISH} "Downloaded install packages of ${NAME} (up to 200 MB depending on your selection) will be stored in this folder. If you want to use another folder, please click Browse and select another one."
LangString d_label ${LANG_ENGLISH} "Place for downloaded install packages of ${NAME}"
LangString d_button ${LANG_ENGLISH} "Browse"
LangString allok ${LANG_ENGLISH} "No actualization needed"
LangString wrongdir ${LANG_ENGLISH} "Error: The Installaton directory has $R0 space$R1.$\nPlease select another directory."
LangString deleteok ${LANG_ENGLISH} "Do you really want to delete all files in $INSTDIR?"

; === French translations ===
LangString welcome ${LANG_FRENCH} "Cet assistant vous guidera tout au long de l'installation de ${NAME}.\r\n\r\nSi vous mettez à jour une installation existante de PortableApps, veuillez l'arrêter avant de continuer.\r\n\r\nCliquez sur Next pour continuer."
LangString finish ${LANG_FRENCH} "${NAME} a été installé sur votre disque.\r\n\r\nCliquez sur Finish pour fermer cet assistant."
LangString runwarning ${LANG_FRENCH} "Veuillez fermer toutes les instances de ${CLOSENAME} et cliquez ensuite sur OK. L'application portable ne peut pas être mise à jour tant qu'il fonctionne."
LangString invaliddirectory ${LANG_FRENCH} "Le dossier de destination que vous avez sélectionné est invalide. Veuillez choisir un dossier valide."
LangString notenoughspace ${LANG_FRENCH} "Le disque que vous avez sélectionné pour l'installation, ne contient pas assez d'espace libre pour cette application."
LangString checkforplatform ${LANG_FRENCH} "Recherche de la Plateforme PortableApps.com"
LangString refreshmenu ${LANG_FRENCH} "Actualisation du Menu PortableApps.com"
;thanks to whibo
LangString plok ${LANG_FRENCH} "est à jour!"
LangString components ${LANG_FRENCH} "Sélectionnez les composantes à installer/mettre à jour."
LangString c_subtext ${LANG_FRENCH} "Attention!"
LangString c_subtext2 ${LANG_FRENCH} "Sélectionnez les composantes à installer/mettre à jour et ne sélectionnez pas les composantes que vous ne voulez pas. Ne croyez pas que l'espace nécessaire à l'installation compte, c'est faux!"
LangString d_subtext ${LANG_FRENCH} "Composantes téléchargées de ${NAME} (plus de 200 MO dépendamment de Votre sélection) vont être enregistrer dans ce dossier. Si vous voulez les enregistrer dans un autre dossier, S.V.P cliquez sur Sélectionner et choisissez-en un autre."
LangString d_label ${LANG_FRENCH} "Endroit pour enregister les fichiers d'installation des composantes de ${NAME}"
LangString d_button ${LANG_FRENCH} "Sélectionner"
LangString allok ${LANG_FRENCH} "Aucune actualisation nécessaire"
LangString wrongdir ${LANG_FRENCH} "Erreur: Le dossier d'installation a $R0 space$R1.$\nS.V.P veuillez choisir un autre dossier."
LangString deleteok ${LANG_FRENCH} "Voulez-vous vraiment effacer tout les fichiers dans $INSTDIR?"

LangString welcome ${LANG_ITALIAN} "Questa procedura vi guiderà durante l'installazione di PortableApps.\r\n\r\nSe state aggiornando una installazione già esistente di PortableApss, vi invitiamo a chiuderla prima di procedere.\r\n\r\nPremere  su Continua per proseguire."
LangString finish ${LANG_ITALIAN} "${NAME} è stato installato sulla vostra periferica.\r\n\r\nPremere Fine per terminare questa procedura."
LangString runwarning ${LANG_ITALIAN} "Vi invitiamo a chiudere tutte le sessioni aperte di ${CLOSENAME} e quindi premere su OK.  L'applicazione portatile non può essere aggiornata mentre è in esecuzione."
LangString invaliddirectory ${LANG_ITALIAN} "La cartella di destinazione selezionata non è valida.  Vi preghiamo di selezionarne una valida."
LangString notenoughspace ${LANG_ITALIAN} "La periferica che avete selezionato per l'installazione non ha spazio libero sufficiente per questa applicazione."
LangString checkforplatform ${LANG_ITALIAN} "Controllo della Piattaforma PortableApps.com"
LangString refreshmenu ${LANG_ITALIAN} "Aggiornamento del Menù PortableApps.com"
; Needs to be translated
LangString plok ${LANG_ITALIAN} "is up to date!"
LangString components ${LANG_ITALIAN} "Select the components to install/update."
LangString c_subtext ${LANG_ITALIAN} "Attention!"
LangString c_subtext2 ${LANG_ITALIAN} "Select the components to install/update and unselect unwanted packages. Don't trust the needed space count, it is wrong!"
LangString d_subtext ${LANG_ITALIAN} "Downloaded install packages of ${NAME} (up to 200 MB depending on Your selection) will be stored in this directory. If You want another directory, please click Search and select another one."
LangString d_label ${LANG_ITALIAN} "Place for downloaded install packages of ${NAME}"
LangString d_button ${LANG_ITALIAN} "Search"
LangString allok ${LANG_ITALIAN} "No actualization needed"
LangString wrongdir ${LANG_ITALIAN} "Error: The Installaton directory has $R0 space$R1.$\nPlease select another directory."
LangString deleteok ${LANG_ITALIAN} "do You really want to delete all files in  $INSTDIR ?"
;End of section needing translation

;thanks to ptm/lflcorreia
LangString welcome ${LANG_PORTUGUESE} "Este assistente irá guiá-lo na instalação da aplicação ${NAME}.\r\n\r\nSe está a actualizar uma instalação existente de ${NAME}, por favor feche-a antes de continuar.\r\n\r\nClique em Seguinte para continuar."
LangString finish ${LANG_PORTUGUESE} "${NAME} foi instalado no seu dispositivo.\r\n\r\nClique em Terminar para fechar este assistente."
LangString runwarning ${LANG_PORTUGUESE} "Por favor feche todas as instâncias de ${CLOSENAME} e depois clique em OK. A aplicação portátil não pode ser actualizada enquanto está a ser executada."
LangString invaliddirectory ${LANG_PORTUGUESE} "A pasta de destino que seleccionou é inválida. Por favor escolha uma pasta válida."
LangString notenoughspace ${LANG_PORTUGUESE} "O dispositivo que seleccionou para a instalação não tem espaço livre suficiente para esta aplicação."
LangString checkforplatform ${LANG_PORTUGUESE} "A localizar a Plataforma PortableApps.com"
LangString refreshmenu ${LANG_PORTUGUESE} "A recarregar o Menu PortableApps.com"
LangString plok ${LANG_PORTUGUESE} "é a versão mais recente!"
LangString components ${LANG_PORTUGUESE} "Seleccione os componentes para instalar/actualizar."
LangString c_subtext ${LANG_PORTUGUESE} "Atenção!"
LangString c_subtext2 ${LANG_PORTUGUESE} "Seleccione os componentes para instalar/actualizar e desmarque pacotes não desejados. Não confie na contagem do espaço necessário, está errada!"
LangString d_subtext ${LANG_PORTUGUESE} "O download dos pacotes de instalação de ${NAME} (até 200 MB dependendo da sua selecção) irão ser armazenados nesta pasta. Se quer outra pasta, por favor carregue em Procurar e seleccione outra pasta."
LangString d_label ${LANG_PORTUGUESE} "Pasta para o download dos pacotes de instalação de ${NAME}"
LangString d_button ${LANG_PORTUGUESE} "Navegar"
LangString allok ${LANG_PORTUGUESE} "Não são necessárias actualizações"
LangString wrongdir ${LANG_PORTUGUESE} "Erro: A pasta da instalação tem $R0 de espaço$R1.$\nPor favor escolha outra pasta."
LangString deleteok ${LANG_PORTUGUESE} "Tem a certeza que quer apagar todos os ficheiros em $INSTDIR?"

;thanks to Aciago/Spanish team on pa.com
LangString welcome ${LANG_SPANISH} "Este asistente lo guiará en la instalación de ${NAME}.\r\n\r\nSi Usted está actualizando una versión ya existente de ${NAME}, por favor, ciérrela antes de proseguir.\r\n\r\nHaga clic en Siguiente para continuar."
LangString finish ${LANG_SPANISH} "${NAME} ha sido instalado en su dispositivo.\r\n\r\nPresione Finalizar para cerrar este asistente."
LangString runwarning ${LANG_SPANISH} "Por favor, cierre todos las instancias de ${CLOSENAME} y luego haga clic en OK. No se puede actualizar dicho programa portátil mientras se está en ejecución."
LangString invaliddirectory ${LANG_SPANISH} "La carpeta de destino no es válida. Por favor, escoja otra carpeta."
LangString notenoughspace ${LANG_SPANISH} "No hay suficiente espacio libre en el dispositivo seleccionado para instalar la aplicación."
LangString checkforplatform ${LANG_SPANISH} "Buscando la Plataforma de PortableApps.com"
LangString refreshmenu ${LANG_SPANISH} "Recargando el Menú de PortableApps.com"
LangString plok ${LANG_SPANISH} "¡Está actualizado!"
LangString components ${LANG_SPANISH} "Seleccione los componentes a instalar/actualizar."
LangString c_subtext ${LANG_SPANISH} "¡Atención!"
LangString c_subtext2 ${LANG_SPANISH} "Seleccione los componentes a instalar/actualizar y deseleccione los paquetes indeseados. ¡No confíe en la cuenta de espacio necesario, es incorrecta!"
LangString d_subtext ${LANG_SPANISH} "Los paquetes de instalación de ${NAME} descargados (más de 200 MB dependiendo de su selección) serán almacenados en esta carpeta. Si desea usar otro directorio, por favor presione en Buscar y seleccione otro."
LangString d_label ${LANG_SPANISH} "Lugar para los paquetes de instalación de ${NAME} descargados"
LangString d_button ${LANG_SPANISH} "Navegar"
LangString allok ${LANG_SPANISH} "No se necesita actualización"
LangString wrongdir ${LANG_SPANISH} "Error: El directorio de instalación tiene $R0 de espacio$R1.$\nPor favor seleccione otro directorio."
LangString deleteok ${LANG_SPANISH} "¿Realmente desea eliminar todos los archivos en $INSTDIR?"


; Reserve files
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
; === MUI end ===

ComponentText "$(components)" "$(c_subtext)"  "$(c_subtext2)"
DirText "$(d_subtext)" "$(d_label)" "$(d_button)"
InstallButtonText "Start"

var Mirror
var mirror_001
var mirror_002
var mirror_003
var mirror_004
var mirror_005
var mirror_006
var mirror_007
var mirror_008
var mirror_009
var debug
var OMirror
var OName
var OFile
var UFile
var OSource
var OSize
var pversion
var pdel
var lversion
var imod
var mversion
var mcount
var APP_SET
var Proxy_Adr
var wpage
var lpage
var cpage
var dpage
var fpage
var var1
var var2
var var3
var var4
var var5
var var6
var var7
var var8
var var9
var var10
var var11
var var12
var var13
var var14
var var15
var var16
var var17
var var18
var var19
var var20
var var21
var var22
var var23
var var24
var var25
var var26
var var27
var var28
var var29
var var30
var var31
var var32
var var33
var var34
var var35
var var36
var var37
var var38
var var39
var var40
var var41
var var42
var var43
var var44
var var45
var var46
var var47
var var48
var var49
var var50
var var_1
var var_2
var var_3
var var_4
var var_5
var var_6
var var_7
var var_8
var var_9
var var_10
var var_11
var var_12
var var_13
var var_14
var var_15
var var_16
var var_17
var var_18
var var_19
var var_20
var var_21
var var_22
var var_23
var var_24
var var_25
var var_26
var var_27
var var_28
var var_29
var var_30
var var_31
var var_32
var var_33
var var_34
var var_35
var var_36
var var_37
var var_38
var var_39
var var_40
var var_41
var var_42
var var_43
var var_44
var var_45
var var_46
var var_47
var var_48
var var_49
var var_50
var tvar1
var tvar2
var tvar3
var tvar4
var tvar5
var tvar6
var varn
var varb
var vart
var varc
var vard
var no_ok
var pbatch
var pselect
var PortableApps.comLocaleID
var PORTABLEAPPSROOTPATH
var OCaption
var ODescription
var md5
;InstallDir "$EXEDIR\Data\setup"
InstallDir "$TEMP\Data\setup"







Section "-setup (erforderlich)" SEC00
	;SectionGetText {SEC00} $R2
	;MessageBox MB_OK "R0 $R0 R2 $R2"
	;StrCpy $OName $R2
	;Call OI_select
SectionEnd

Section /o "$var1" SEC01
	StrCpy $OName $var1
	Call OI_select
SectionEnd

Section /o "$var2" SEC02
	StrCpy $OName $var2
	Call OI_select
SectionEnd

Section /o "$var3" SEC03
	StrCpy $OName $var3
	Call OI_select
SectionEnd

Section /o "$var4" SEC04
	StrCpy $OName $var4
	Call OI_select
SectionEnd

Section /o "$var5" SEC05
	StrCpy $OName $var5
	Call OI_select
SectionEnd

Section /o "$var6" SEC06
	StrCpy $OName $var6
	Call OI_select
SectionEnd

Section /o "$var7" SEC07
	StrCpy $OName $var7
	Call OI_select
SectionEnd

Section /o "$var8" SEC08
	StrCpy $OName $var8
	Call OI_select
SectionEnd

Section /o "$var9" SEC09
	StrCpy $OName $var9
	Call OI_select
SectionEnd

Section /o "$var10" SEC10
	StrCpy $OName $var10
	Call OI_select
SectionEnd

Section /o "$var11" SEC11
	StrCpy $OName $var11
	Call OI_select
SectionEnd

Section /o "$var12" SEC12
	StrCpy $OName $var12
	Call OI_select
SectionEnd

Section /o "$var13" SEC13
	StrCpy $OName $var13
	Call OI_select
SectionEnd

Section /o "$var14" SEC14
	StrCpy $OName $var14
	Call OI_select
SectionEnd

Section /o "$var15" SEC15
	StrCpy $OName $var15
	Call OI_select
SectionEnd

Section /o "$var16" SEC16
	StrCpy $OName $var16
	Call OI_select
SectionEnd

Section /o "$var17" SEC17
	StrCpy $OName $var17
	Call OI_select
SectionEnd

Section /o "$var18" SEC18
	StrCpy $OName $var18
	Call OI_select
SectionEnd

Section /o "$var19" SEC19
	StrCpy $OName $var19
	Call OI_select
SectionEnd

Section /o "$var20" SEC20
	StrCpy $OName $var20
	Call OI_select
SectionEnd

Section /o "$var21" SEC21
	StrCpy $OName $var21
	Call OI_select
SectionEnd

Section /o "$var22" SEC22
	StrCpy $OName $var22
	Call OI_select
SectionEnd

Section /o "$var23" SEC23
	StrCpy $OName $var23
	Call OI_select
SectionEnd

Section /o "$var24" SEC24
	StrCpy $OName $var24
	Call OI_select
SectionEnd

Section /o "$var25" SEC25
	StrCpy $OName $var25
	Call OI_select
SectionEnd

Section /o "$var26" SEC26
	StrCpy $OName $var26
	Call OI_select
SectionEnd

Section /o "$var27" SEC27
	StrCpy $OName $var27
	Call OI_select
SectionEnd

Section /o "$var28" SEC28
	StrCpy $OName $var28
	Call OI_select
SectionEnd

Section /o "$var29" SEC29
	StrCpy $OName $var29
	Call OI_select
SectionEnd

Section /o "$var30" SEC30
	StrCpy $OName $var30
	Call OI_select
SectionEnd

Section /o "$var31" SEC31
	StrCpy $OName $var31
	Call OI_select
SectionEnd

Section /o "$var32" SEC32
	StrCpy $OName $var32
	Call OI_select
SectionEnd

Section /o "$var33" SEC33
	StrCpy $OName $var33
	Call OI_select
SectionEnd

Section /o "$var34" SEC34
	StrCpy $OName $var34
	Call OI_select
SectionEnd

Section /o "$var35" SEC35
	StrCpy $OName $var35
	Call OI_select
SectionEnd

Section /o "$var36" SEC36
	StrCpy $OName $var36
	Call OI_select
SectionEnd

Section /o "$var37" SEC37
	StrCpy $OName $var37
	Call OI_select
SectionEnd

Section /o "$var38" SEC38
	StrCpy $OName $var38
	Call OI_select
SectionEnd

Section /o "$var39" SEC39
	StrCpy $OName $var39
	Call OI_select
SectionEnd

Section /o "$var40" SEC40
	StrCpy $OName $var40
	Call OI_select
SectionEnd

Section /o "$var41" SEC41
	StrCpy $OName $var41
	Call OI_select
SectionEnd

Section /o "$var42" SEC42
	StrCpy $OName $var42
	Call OI_select
SectionEnd

Section /o "$var43" SEC43
	StrCpy $OName $var43
	Call OI_select
SectionEnd

Section /o "$var44" SEC44
	StrCpy $OName $var44
	Call OI_select
SectionEnd

Section /o "$var45" SEC45
	StrCpy $OName $var45
	Call OI_select
SectionEnd

Section /o "$var46" SEC46
	StrCpy $OName $var46
	Call OI_select
SectionEnd

Section /o "$var47" SEC47
	StrCpy $OName $var47
	Call OI_select
SectionEnd

Section /o "$var48" SEC48
	StrCpy $OName $var48
	Call OI_select
SectionEnd

Section /o "$var49" SEC49
	StrCpy $OName $var49
	Call OI_select
SectionEnd

Section /o "$var50" SEC50
	StrCpy $OName $var50
	Call OI_select
SectionEnd

Section "-Cleanup" sec_cu


SectionEnd


Section -Post
	Sleep 2000
	Delete "$EXEDIR\Data\updater.ini"
	${registry::Unload}
	${time::Unload}
;=== Refresh PortableApps.com Menu (not final version)
	${GetParent} `$INSTDIR` $0
	;=== Check that it exists at the right location
	DetailPrint '$(checkforplatform)'
	IfFileExists `$0\PortableApps.com\App\PortableAppsPlatform.exe` "" TheEnd
		;=== Check that it's the real deal so we aren't hanging with no response
		MoreInfo::GetProductName `$0\PortableApps.com\App\PortableAppsPlatform.exe`
		Pop $1
		StrCmp $1 "PortableApps.com Platform" "" TheEnd
		MoreInfo::GetCompanyName `$0\PortableApps.com\App\PortableAppsPlatform.exe`
		Pop $1
		StrCmp $1 "PortableApps.com" "" TheEnd
		StrCmp $debug "false" +2
		MessageBox MB_OK "POST PA found!"
		

		;=== Check that it's running
		FindProcDLL::FindProc "PortableAppsPlatform.exe"
		StrCmp $R0 "1" "" TheEnd
		
		;=== Send message for the Menu to refresh
		StrCpy $2 'PortableApps.comPlatformWindowMessageToRefresh$0\PortableApps.com\App\PortableAppsPlatform.exe'
		System::Call "user32::RegisterWindowMessage(t r2) i .r3"
		DetailPrint '$(refreshmenu)'
		SendMessage 65535 $3 0 0
	TheEnd:
SectionEnd













ShowInstDetails show

Function .onInit
	Call default_settings
	Push $EXEDIR
	Call GetParent
	Pop $PORTABLEAPPSROOTPATH
	;MessageBox MB_OK $PORTABLEAPPSROOTPATH
	call GET_COMMAND_LINE_PARAMETERS
	call read_proxy_settings
	call GET_LANG
	call sstart
	call PREFILL_COMPONENTS_PAGE
FunctionEnd

Function GET_LANG

	;BEGIN: Init Language Detection Code
	ReadEnvStr $PortableApps.comLocaleID "PortableApps.comLocaleID"
	StrCmp $PortableApps.comLocaleID "1031" SetLanguageFromEnvironment ;German
	StrCmp $PortableApps.comLocaleID "1034" SetLanguageFromEnvironment ;Spanish
	StrCmp $PortableApps.comLocaleID "1036" SetLanguageFromEnvironment ;French
	StrCmp $PortableApps.comLocaleID "1040" SetLanguageFromEnvironment ;Italian
	StrCmp $PortableApps.comLocaleID "2070" SetLanguageFromEnvironment ;Portuguese
	StrCmp $PortableApps.comLocaleID "1033" SetLanguageFromEnvironment ShowLanguageSelector ;English

	;END: Init Language Detection Code
	
	SetLanguageFromEnvironment:

		StrCpy $LANGUAGE $PortableApps.comLocaleID
		Goto No_LANG_SELECT

	ShowLanguageSelector:
		!insertmacro MUI_LANGDLL_DISPLAY
	No_LANG_SELECT:
FunctionEnd

Function GET_COMMAND_LINE_PARAMETERS
	IfFileExists "$EXEDIR/Data/settings.ini" use_ini
	;MessageBox MB_OK "keine INI"


	${GetOptions} "$CMDLINE" "/CFG=" $R0
	IfErrors step0
		StrCpy $UFile $R0
	
	step0:
	${GetOptions} "$CMDLINE" "/NOWP" $R0
	IfErrors noskip1
		StrCpy "$wpage" "false"
	noskip1:

	;Inst Page must be shown if APP is set
	;${GetOptions} "$CMDLINE" "/APP=" $R0
	;IfErrors noskip2

	
	${GetOptions} "$CMDLINE" "/NOIP" $R0
	IfErrors noskip2
		;StrCpy "$ipage" "false"
	noskip2:
	${GetOptions} "$CMDLINE" "/NOFP" $R0
	IfErrors noskip3
		StrCpy "$fpage" "false"
	noskip3:
	${GetOptions} "$CMDLINE" "/APP=" $R0
	IfErrors noskip4
		StrCpy $APP_SET "TRUE"
	
	noskip4:
	${GetOptions} "$CMDLINE" "/NODIR" $R0
	IfErrors noskip5
		StrCpy "$dpage" "false"
	noskip5:
	${GetOptions} "$CMDLINE" "/NOL" $R0
	IfErrors noskip6
		StrCpy "$lpage" "false"
	noskip6:
	${GetOptions} "$CMDLINE" "/PDEL" $R0
	IfErrors nodelete
		MessageBox MB_YESNO|MB_ICONEXCLAMATION "$(deleteok)" IDNO nodelete
		StrCpy "$pdel" "false"
	;RMDir /r "$INSTDIR\setup\*.*" 
	;RMDir "$INSTDIR\setup"
	;RMDir /r "$INSTDIR" 
	nodelete:
	${GetOptions} "$CMDLINE" "/DEBUG" $R0
	IfErrors nodebug
		StrCpy "$debug" "true"
	nodebug:
	${GetOptions} "$CMDLINE" "/LANG=" $R0
	IfErrors nolang
		SetEnv::SetEnvVar "PortableApps.comLocaleID" "$R0"
	nolang:
	${GetOptions} "$CMDLINE" "/NOOK" $R0	
	IfErrors mno_ok
		StrCpy "$no_ok" "true"
	mno_ok:
	GoTo Exit
	
	use_ini:
	;MessageBox MB_OK "INI gefunden"
	call read_settings_ini
	
	
	Exit:

FunctionEnd

Function PREFILL_COMPONENTS_PAGE
ReadINIStr $0 "$UFile" "Hosted_Apps" "count"
	StrCpy $mcount $0
	step1:
	intOp $varn $varn + 1
	Call OU_select
	;MessageBox MB_OK "VARN ist $varn VARB ist $varb Caption $OCaption version $pversion"
	${Select} $varn

	${Case} "$mcount"
		Goto step2
	${Case} "1"
		StrCmp $varb "1" step1
		StrCpy $var1 $vart
		StrCpy $var_1 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC01} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC01}
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC01} 17
		Goto step1
	${Case} "2"
		StrCmp $varb "1" step1
		StrCpy $var2 $vart
		StrCpy $var_2 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC02} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC02}
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC02} 17
		Goto step1
	${Case} "3"
		StrCmp $varb "1" step1
		StrCpy $var3 $vart
		StrCpy $var_3 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC03} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC03}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC03} 17
		Goto step1
	${Case} "4"
		StrCmp $varb "1" step1
		StrCpy $var4 $vart
		StrCpy $var_4 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC04} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC04}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC04} 17
		Goto step1
	${Case} "5"
		StrCmp $varb "1" step1
		StrCpy $var5 $vart
		StrCpy $var_5 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC05} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC05}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC05} 17
		Goto step1
	${Case} "6"
		StrCmp $varb "1" step1
		StrCpy $var6 $vart
		StrCpy $var_6 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC06} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC06}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC06} 17
		Goto step1
	${Case} "7"
		StrCmp $varb "1" step1
		StrCpy $var7 $vart
		StrCpy $var_7 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC07} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC07}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC07} 17
		Goto step1
	${Case} "8"
		StrCmp $varb "1" step1
		StrCpy $var8 $vart
		StrCpy $var_8 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC08} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC08}
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC08} 17
		Goto step1
	${Case} "9"
		StrCmp $varb "1" step1
		StrCpy $var9 $vart
		StrCpy $var_9 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC09} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC09}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC09} 17
		Goto step1
	${Case} "10"
		StrCmp $varb "1" step1
		StrCpy $var10 $vart
		StrCpy $var_10 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC10} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC10}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC10} 17
		Goto step1
	${Case} "11"
		StrCmp $varb "1" step1
		StrCpy $var11 $vart
		StrCpy $var_11 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC11} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC11}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC11} 17
		Goto step1
	${Case} "12"
		StrCmp $varb "1" step1
		StrCpy $var12 $vart
		StrCpy $var_12 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC12} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC12}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC12} 17
		Goto step1
	${Case} "13"
		StrCmp $varb "1" step1
		StrCpy $var13 $vart
		StrCpy $var_13 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC13} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC13}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC13} 17
		Goto step1
	${Case} "14"
		StrCmp $varb "1" step1
		StrCpy $var14 $vart
		StrCpy $var_14 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC14} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC14}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC14} 17
		Goto step1
	${Case} "15"
		StrCmp $varb "1" step1
		StrCpy $var15 $vart
		StrCpy $var_15 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC15} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC15}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC15} 17
		Goto step1
	${Case} "16"
		StrCmp $varb "1" step1
		StrCpy $var16 $vart
		StrCpy $var_16 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC16} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC16}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC16} 17
		Goto step1
	${Case} "17"
		StrCmp $varb "1" step1
		StrCpy $var17 $vart
		StrCpy $var_17 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC17} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC17}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC17} 17
		Goto step1
	${Case} "18"
		StrCmp $varb "1" step1
		StrCpy $var18 $vart
		StrCpy $var_18 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC18} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC18}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC18} 17
		Goto step1
	${Case} "19"
		StrCmp $varb "1" step1
		StrCpy $var19 $vart
		StrCpy $var_19 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC19} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC19}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC19} 17
		Goto step1
	${Case} "20"
		StrCmp $varb "1" step1
		StrCpy $var20 $vart
		StrCpy $var_20 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC20} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC20}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC20} 17
		Goto step1
	${Case} "21"
		StrCmp $varb "1" step1
		StrCpy $var21 $vart
		StrCpy $var_21 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC21} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC21}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC21} 17
		Goto step1
	${Case} "22"
		StrCmp $varb "1" step1
		StrCpy $var22 $vart
		StrCpy $var_22 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC22} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC22}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC22} 17
		Goto step1
	${Case} "23"
		StrCmp $varb "1" step1
		StrCpy $var23 $vart
		StrCpy $var_23 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC23} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC23}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC23} 17
		Goto step1
	${Case} "24"
		StrCmp $varb "1" step1
		StrCpy $var24 $vart
		StrCpy $var_24 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC24} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC24}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC24} 17
		Goto step1
	${Case} "25"
		StrCmp $varb "1" step1
		StrCpy $var25 $vart
		StrCpy $var_25 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC25} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC25}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC25} 17
		Goto step1
	${Case} "26"
		StrCmp $varb "1" step1
		StrCpy $var26 $vart
		StrCpy $var_26 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC26} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC26}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC26} 17
		Goto step1
	${Case} "27"
		StrCmp $varb "1" step1
		StrCpy $var27 $vart
		StrCpy $var_27 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC27} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC27}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC27} 17
		Goto step1
	${Case} "28"
		StrCmp $varb "1" step1
		StrCpy $var28 $vart
		StrCpy $var_28 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC28} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC28}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC28} 17
		Goto step1
	${Case} "29"
		StrCmp $varb "1" step1
		StrCpy $var29 $vart
		StrCpy $var_29 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC29} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC29}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC29} 17
		Goto step1
	${Case} "30"
		StrCmp $varb "1" step1
		StrCpy $var30 $vart
		StrCpy $var_30 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC30} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC30}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC30} 17
		Goto step1
	${Case} "31"
		StrCmp $varb "1" step1
		StrCpy $var31 $vart
		StrCpy $var_31 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC31} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC31}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC31} 17
		Goto step1
	${Case} "32"
		StrCmp $varb "1" step1
		StrCpy $var32 $vart
		StrCpy $var_32 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC32} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC32}
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC32} 17
		Goto step1
	${Case} "33"
		StrCmp $varb "1" step1
		StrCpy $var33 $vart
		StrCpy $var_33 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC33} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC33}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC33} 17
		Goto step1
	${Case} "34"
		StrCmp $varb "1" step1
		StrCpy $var34 $vart
		StrCpy $var_34 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC34} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC34}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC34} 17
		Goto step1
	${Case} "35"
		StrCmp $varb "1" step1
		StrCpy $var35 $vart
		StrCpy $var_35 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC35} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC35}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC35} 17
		Goto step1
	${Case} "36"
		StrCmp $varb "1" step1
		StrCpy $var36 $vart
		StrCpy $var_36 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC36} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC36}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC36} 17
		Goto step1
	${Case} "37"
		StrCmp $varb "1" step1
		StrCpy $var37 $vart
		StrCpy $var_37 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC37} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC37}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC37} 17
		Goto step1
	${Case} "38"
		StrCmp $varb "1" step1
		StrCpy $var38 $vart
		StrCpy $var_38 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC38} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC38}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC38} 17
		Goto step1
	${Case} "39"
		StrCmp $varb "1" step1
		StrCpy $var39 $vart
		StrCpy $var_39 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC39} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC39}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC39} 17
		Goto step1
	${Case} "40"
		StrCmp $varb "1" step1
		StrCpy $var40 $vart
		StrCpy $var_40 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC40} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC40}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC40} 17
		Goto step1
	${Case} "41"
		StrCmp $varb "1" step1
		StrCpy $var41 $vart
		StrCpy $var_41 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC41} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC41}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC41} 17
		Goto step1
	${Case} "42"
		StrCmp $varb "1" step1
		StrCpy $var42 $vart
		StrCpy $var_42 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC42} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC42}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC42} 17
		Goto step1
	${Case} "43"
		StrCmp $varb "1" step1
		StrCpy $var43 $vart
		StrCpy $var_43 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC43} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC43}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC43} 17
		Goto step1
	${Case} "44"
		StrCmp $varb "1" step1
		StrCpy $var44 $vart
		StrCpy $var_44 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC44} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC44}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC44} 17
		Goto step1
	${Case} "45"
		StrCmp $varb "1" step1
		StrCpy $var45 $vart
		StrCpy $var_45 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC45} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC45}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC45} 17
		Goto step1
	${Case} "46"
		StrCmp $varb "1" step1
		StrCpy $var46 $vart
		StrCpy $var_46 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC46} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC46}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC46} 17
		Goto step1
	${Case} "47"
		StrCmp $varb "1" step1
		StrCpy $var47 $vart
		StrCpy $var_47 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC47} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC47}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC47} 17
		Goto step1
	${Case} "48"
		StrCmp $varb "1" step1
		StrCpy $var48 $vart
		StrCpy $var_48 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC48} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC48}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC48} 17
		Goto step1
	${Case} "49"
		StrCmp $varb "1" step1
		StrCpy $var49 $vart
		StrCpy $var_49 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC49} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC49}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC49} 17
		Goto step1
	${Case} "50"
		StrCmp $varb "1" step1
		StrCpy $var50 $vart
		StrCpy $var_50 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC50} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC50}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC50} 17
		Goto step1
        ${CaseElse}
		;Goto step1
	${EndSelect}

	step2:
	StrCmp $vard "1" step4
	StrCmp $varc "1" step4
	StrCmp $no_ok "true" +2
	MessageBox MB_OK "$(allok)"
	Delete "$EXEDIR\Data\updater.ini"
	Quit
	step4:
FunctionEnd


Function OU_select
	StrCpy "$varb" "0"
	${Select} $varn
	${Case} "batch"
		;MessageBox MB_OK "Batchmode"
	${CaseElse}
		ReadINIStr $0 "$UFile" "Hosted_Apps" $varn
		StrCpy $vart $0
		StrCpy $OName $vart
		;MessageBox MB_OK "Vart:$vart"
	${EndSelect}
	call read_update_ini_OName
	
	ReadINIStr $0 "$PORTABLEAPPSROOTPATH\$OName\App\AppInfo\appinfo.ini" "Version" "PackageVersion"
	StrCpy "$lversion" $0
	${Select} $lversion
	${Case} $pversion
		StrCpy "$varb" "1"
		;MessageBox MB_OK "$OName: $(plok) (server:$pversion/suite:$lversion)"
	${Case} ""
		;check if this app on the useres blacklist
		ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Blacklist" "$OName"
		StrCmp $0 "true" +3
		StrCpy "$vard" "1"
		Goto +2
		StrCpy "$varb" "1"
	${CaseElse}	

	${EndSelect}
FunctionEnd

Function sstart
	
	Delete "$EXEDIR\Data\updater.ini"
	;SetOutPath "$EXEDIR\setup"
	;SetOverwrite ifnewer

	${Select} $UFile

	${Case} "$EXEDIR\Data\updater.ini"
		;MessageBox MB_OK "Netz"
		SetOutPath "$EXEDIR\Data\"
		nsexec::exectolog `"$EXEDIR\App\wget" --passive-ftp "$OFile"` 
		;Call ODownload
	${CaseElse}
		;MessageBox MB_OK "Lokal"
	${EndSelect}
	SetOutPath "$INSTDIR"
	StrCmp $debug "false" +2
	MessageBox MB_OK "$INSTDIR"

	${GetOptions} "$CMDLINE" "/APP=" $R0
	IfErrors raus
	StrCpy $OName $R0
	;Call OStart
	MessageBox MB_OK "Geprüft wird: $OName. Wenn eine Aktualisierung erforderlich ist, wird der Installer nach der Prüfung herunter geladen und danach aufgerufen (kann etwas dauern)."
	StrCpy $varn "batch"
	Call OU_select
	StrCmp $vard "1" step5
	StrCmp $varc "1" step5
    	StrCmp $no_ok "true" +2
	MessageBox MB_OK "$(allok)"

	Delete "$EXEDIR\Data\updater.ini"
	Quit

	step5:
	Call OI_select
	Quit

	raus:
 	Call read_update_ini_OName
	BringToFront
FunctionEnd

Function DirectoryLeave
 
  # Call the CheckForSpaces function.
  Push $INSTDIR # Input string (install path).
   Call CheckForSpaces
  Pop $R0 # The function returns the number of spaces found in the input string.
 
  # Check if any spaces exist in $INSTDIR.
  StrCmp $R0 0 NoSpaces
 
    # Plural if more than 1 space in $INSTDIR.
    StrCmp $R0 1 0 +3
      StrCpy $R1 ""
    Goto +2
      StrCpy $R1 "s"
 
    # Show message box then take the user back to the Directory page.
    MessageBox MB_OK|MB_ICONEXCLAMATION "$(wrongdir)"
    Abort
 
  NoSpaces:
 
FunctionEnd

Function CheckForSpaces
 Exch $R0
 Push $R1
 Push $R2
 Push $R3
 StrCpy $R1 -1
 StrCpy $R3 $R0
 StrCpy $R0 0
 loop:
   StrCpy $R2 $R3 1 $R1
   IntOp $R1 $R1 - 1
   StrCmp $R2 "" done
   StrCmp $R2 " " 0 loop
   IntOp $R0 $R0 + 1
 Goto loop
 done:
 Pop $R3
 Pop $R2
 Pop $R1
 Exch $R0
FunctionEnd


Function welPre
StrCmp $wpage "true" +2
	Abort
FunctionEnd

Function instPre
;StrCmp $ipage "true" +2
	;Abort
FunctionEnd
 
Function finPre
StrCmp $fpage "true" +2
	Abort
FunctionEnd

Function compPre
${GetOptions} "$CMDLINE" "/APP=" $R0
IfErrors noskip04
	StrCpy $APP_SET "TRUE"
	Abort
noskip04:
FunctionEnd

Function dirPre
StrCmp $dpage "true" noskip05
	Abort
noskip05:
call DirectoryLeave
FunctionEnd

Function licPre
StrCmp $lpage "true" +2
	Abort
FunctionEnd

Function default_settings
	StrCpy "$Proxy_Adr" ""
	StrCpy "$wpage" "true"
	StrCpy "$lpage" "true"
	StrCpy "$cpage" "true"
	StrCpy "$dpage" "true"
	StrCpy "$fpage" "true"
	StrCpy "$pdel" "true"
	StrCpy $UFile "$EXEDIR\Data\updater.ini"
	StrCpy $OFile "https://portableapps.com/updater.ini"
	StrCpy $varn "0"
	StrCpy $debug "false"
	StrCpy $no_ok "false"
	StrCpy $pbatch "false"
	StrCpy $pselect "false"

FunctionEnd




Function ORandom
 ${time::GetLocalTime} $0
 ${time::TimeString} "$0" $tvar1 $tvar2 $tvar3 $tvar4 $tvar5 $tvar6

 ${If} $tvar6 = 5
    StrCpy $Mirror $mirror_001
 ${EndIf}
 ${If} $tvar6 >= 10
    StrCpy $Mirror $mirror_002
 ${EndIf}
 ${If} $tvar6 >= 15
    StrCpy $Mirror $mirror_003
 ${EndIf}
 ${If} $tvar6 >= 20
    StrCpy $Mirror $mirror_004
 ${EndIf}
 ${If} $tvar6 >= 30
    StrCpy $Mirror $mirror_005
 ${EndIf}
 ${If} $tvar6 >= 40
    StrCpy $Mirror $mirror_006
 ${EndIf}
 ${If} $tvar6 >= 45
    StrCpy $Mirror $mirror_007
 ${EndIf}
 ${If} $tvar6 >= 50
    StrCpy $Mirror $mirror_008
 ${EndIf}
FunctionEnd




Function ODownload
	;If file exists do nothing
	IfFileExists "$INSTDIR\$OFile" +2
	nsexec::exectolog `"$EXEDIR\App\wget" --passive-ftp "$OMirror/$OSource/$OFile"`  
FunctionEnd

Function OInstall
	${Select} $pbatch
	${Case} "true"
		StrCmp $debug "false" +2
		MessageBox MB_OK "batch"
		ExecWait `"$INSTDIR\$OFile" /DESTINATION="$PORTABLEAPPSROOTPATH\" /S` 
	${CaseElse}
		StrCmp $debug "false" +2
		MessageBox MB_OK "normal"
		ExecWait `"$INSTDIR\$OFile" /DESTINATION="$PORTABLEAPPSROOTPATH\"` 
	${EndSelect}
	StrCmp $pdel "false" +3
	Sleep 2000
	Delete "$INSTDIR\$OFile"
	BringToFront
FunctionEnd

Function OExtract
	${Select} $pbatch
	${Case} "true"
		StrCmp $debug "false" +2
		MessageBox MB_OK "Batch"
		ExecWait `"$INSTDIR\$OFile" -y -o"$PORTABLEAPPSROOTPATH\"`
	${CaseElse}
		StrCmp $debug "false" +2
		MessageBox MB_OK "Normal"
		ExecWait `"$INSTDIR\$OFile" -o"$PORTABLEAPPSROOTPATH\"` 
	${EndSelect}
	StrCmp $pdel "false" +3
	Sleep 2000
	Delete "$INSTDIR\$OFile"
	BringToFront
FunctionEnd


Function read_update_ini_mirror
	ReadINIStr $0 "$UFile" "$mversion" "001"
	StrCpy $mirror_001 $0

	ReadINIStr $0 "$UFile" "$mversion" "002"
	StrCpy $mirror_002 $0

	ReadINIStr $0 "$UFile" "$mversion" "003"
	StrCpy $mirror_003 $0

	ReadINIStr $0 "$UFile" "$mversion" "004"
	StrCpy $mirror_004 $0

	ReadINIStr $0 "$UFile" "$mversion" "005"
	StrCpy $mirror_005 $0

	ReadINIStr $0 "$UFile" "$mversion" "006"
	StrCpy $mirror_006 $0

	ReadINIStr $0 "$UFile" "$mversion" "007"
	StrCpy $mirror_007 $0

	ReadINIStr $0 "$UFile" "$mversion" "008"
	StrCpy $mirror_008 $0

	ReadINIStr $0 "$UFile" "$mversion" "009"
	StrCpy $mirror_009 $0
FunctionEnd


Function read_update_ini_OName
	;reset $pselect
	StrCpy "$pselect" "false"

	ReadINIStr $0 "$UFile" $OName "PackageVersion"
	StrCpy "$pversion" $0	

	ReadINIStr $0 "$UFile" $OName "Source"
	StrCpy "$OSource" $0

	ReadINIStr $0 "$UFile" $OName "imod"
	StrCpy "$imod" $0
	
	ReadINIStr $0 "$UFile" $OName "mversion"
	StrCpy "$mversion" $0

	ReadINIStr $0 "$UFile" $OName "size"
	StrCpy "$OSize" $0

	ReadINIStr $0 "$UFile" $OName "caption"
	StrCpy "$OCaption" $0

	ReadINIStr $0 "$UFile" $OName "description$LANGUAGE"
	${Select} $0 
	${Case} "" 
		ReadINIStr $0 "$UFile" $OName "description"
	${EndSelect}
	StrCpy "$ODescription" $0

	ReadINIStr $0 "$UFile" $OName "pselect"
	StrCmp $0 "" +2
	StrCpy "$pselect" $0

	ReadINIStr $0 "$UFile" $OName "md5sum"
	StrCmp $0 "" +2
	StrCpy "$md5" $0

	call read_update_ini_OFile
FunctionEnd

Function read_settings_ini
	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Update" "ofile"
	StrCmp $0 "" +2
	StrCpy "$OFile" $0

	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Update" "batch"
	StrCmp $0 "" +2
	StrCpy "$pbatch" $0

	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Update" "pselect"
	StrCmp $0 "" +2
	StrCpy "$pselect" $0

	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Update" "ufile"
	StrCmp $0 "" +2
	StrCpy "$UFile" $0

	;ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Update" "tempdir"
	;StrCmp $0 "" +2
	
	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Cleanup" "pdel"
	StrCmp $0 "" +2
	StrCpy "$pdel" $0

	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Proxy" "Proxy_Adr"
	StrCmp $0 "" +2
	StrCpy "$Proxy_Adr" $0

	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Show" "Welcome"
	StrCmp $0 "" +2
	StrCpy "$wpage" $0

	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Show" "License"
	StrCmp $0 "" +2
	StrCpy "$lpage" $0

	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Show" "Components"
	StrCmp $0 "" +2
	StrCpy "$cpage" $0
	
	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Show" "Directory"
	StrCmp $0 "" +2
	StrCpy "$dpage" $0

	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Show" "Finish"
	StrCmp $0 "" +2
	StrCpy "$fpage" $0

	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Show" "Debug"
	StrCmp $0 "" +2
	StrCpy "$debug" $0

	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Show" "NOOK"
	StrCmp $0 "" +2
	StrCpy "$no_ok" $0
	
	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "General" "Language"
	StrCmp $0 "" +2
	SetEnv::SetEnvVar "PortableApps.comLocaleID" "$0"
	
FunctionEnd


Function read_proxy_settings
	;Check for proxy settings in ini
	${Select} $Proxy_Adr 
	${Case} "" 
		;no proxy wanted
		StrCmp $debug "false" +2
		MessageBox MB_OK "no proxy"
		GoTo end_proxy
	${Case} "auto"
		;Check for Proxy in user registry
		;If proxy disabled don't use it
		${registry::Read} "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings" "ProxyEnable" $R0 $R1
		StrCmp $R0 "0" end_proxy
		;if Proxyserver empty don't use it
		${registry::Read} "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings" "ProxyServer" $R0 $R1
		StrCmp $R0 "" end_proxy
		${registry::Unload}
		;set proxy to registry proxy
		StrCpy $Proxy_Adr $R0	
	${EndSelect}

	;Check if ftp proxy environment is allready set
	ReadEnvStr $R0 "ftp_proxy"
	StrCmp $R0 "" set_ftp_proxy
	GoTo http_proxy

	;set ftp proxy environment
	set_ftp_proxy:
	SetEnv::SetEnvVar "ftp_proxy" $Proxy_Adr


	http_proxy:
	;Ckeck if ftp proxy environment is allready set
	ReadEnvStr $R0 "http_proxy"
	
	StrCmp $R0 "" set_http_proxy
	GoTo end_proxy
	;set http proxy environment
	set_http_proxy:
	SetEnv::SetEnvVar "http_proxy" $Proxy_Adr

	end_proxy:
	ReadEnvStr $R0 "http_proxy"
	StrCmp $debug "false" +2
	MessageBox MB_OK "function readproxy proxy:$R0"
FunctionEnd

Function read_update_ini_OFile
	StrCmp $debug "false" +2
	MessageBox MB_OK "function read_update_ini_OFile Language: $LANGUAGE"
	ReadINIStr $0 "$UFile" $OName "$LANGUAGE"
	${Select} "$0"
	${Case} ""
		;No langcode set, use US English
		ReadINIStr $0 "$UFile" $OName "file"
		StrCpy "$OFile" $0
		ReadINIStr $0 "$UFile" $OName "md5sum"
		StrCpy "$md5" $0
	${CaseElse}
		;use langcode from ini
		StrCpy "$OFile" $0
		ReadINIStr $0 "$UFile" $OName "md5sum$LANGUAGE"
		StrCpy "$md5" $0
	${EndSelect}
	
	
	StrCmp $debug "false" +2
	MessageBox MB_OK "function read_update_ini_OFile OFile: $OFile md5:$md5 Odescription:$ODescription"
FunctionEnd

Function OI_select
	BringToFront
	SetOutPath "$INSTDIR"
	call DirectoryLeave
	call read_update_ini_OName
	call read_update_ini_mirror
	call ORandom
	StrCpy $OMirror $Mirror 
	call ODownload
	
	# generate MD5sum of file
	StrCpy $0 "$INSTDIR\$OFile"
	md5dll::GetMD5File "$0"
	Pop $1
	${Select} $1
	${Case} "$md5"
		${Select} "$imod"
		${Case} "e"
			call OExtract
		${CaseElse}
			call OInstall
		${EndSelect}
		;n_ee:
		BringToFront
	${CaseElse}
		MessageBox MB_OK|MB_ICONEXCLAMATION "The MD5 checksums of $OFile do not match. Your download may have been corrupted. Package $INSTDIR\$OFile deleted."
		Delete "$INSTDIR\$OFile"
		
	${EndSelect}
FunctionEnd

; Section descriptions

; Section descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
;!insertmacro MUI_DESCRIPTION_TEXT ${SEC00} $var_0
!insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $var_1
!insertmacro MUI_DESCRIPTION_TEXT ${SEC02} $var_2
!insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $var_3
!insertmacro MUI_DESCRIPTION_TEXT ${SEC04} $var_4
!insertmacro MUI_DESCRIPTION_TEXT ${SEC05} $var_5
!insertmacro MUI_DESCRIPTION_TEXT ${SEC06} $var_6
!insertmacro MUI_DESCRIPTION_TEXT ${SEC07} $var_7
!insertmacro MUI_DESCRIPTION_TEXT ${SEC08} $var_8
!insertmacro MUI_DESCRIPTION_TEXT ${SEC09} $var_9
!insertmacro MUI_DESCRIPTION_TEXT ${SEC10} $var_10
!insertmacro MUI_DESCRIPTION_TEXT ${SEC11} $var_11
!insertmacro MUI_DESCRIPTION_TEXT ${SEC12} $var_12
!insertmacro MUI_DESCRIPTION_TEXT ${SEC13} $var_13
!insertmacro MUI_DESCRIPTION_TEXT ${SEC14} $var_14
!insertmacro MUI_DESCRIPTION_TEXT ${SEC15} $var_15
!insertmacro MUI_DESCRIPTION_TEXT ${SEC16} $var_16
!insertmacro MUI_DESCRIPTION_TEXT ${SEC17} $var_17
!insertmacro MUI_DESCRIPTION_TEXT ${SEC18} $var_18
!insertmacro MUI_DESCRIPTION_TEXT ${SEC19} $var_19
!insertmacro MUI_DESCRIPTION_TEXT ${SEC20} $var_20
!insertmacro MUI_DESCRIPTION_TEXT ${SEC21} $var_21
!insertmacro MUI_DESCRIPTION_TEXT ${SEC22} $var_22
!insertmacro MUI_DESCRIPTION_TEXT ${SEC23} $var_23
!insertmacro MUI_DESCRIPTION_TEXT ${SEC24} $var_24
!insertmacro MUI_DESCRIPTION_TEXT ${SEC25} $var_25
!insertmacro MUI_DESCRIPTION_TEXT ${SEC26} $var_26
!insertmacro MUI_DESCRIPTION_TEXT ${SEC27} $var_27
!insertmacro MUI_DESCRIPTION_TEXT ${SEC28} $var_28
!insertmacro MUI_DESCRIPTION_TEXT ${SEC29} $var_29
!insertmacro MUI_DESCRIPTION_TEXT ${SEC30} $var_30
!insertmacro MUI_DESCRIPTION_TEXT ${SEC31} $var_31
!insertmacro MUI_DESCRIPTION_TEXT ${SEC32} $var_32
!insertmacro MUI_DESCRIPTION_TEXT ${SEC33} $var_33
!insertmacro MUI_DESCRIPTION_TEXT ${SEC34} $var_34
!insertmacro MUI_DESCRIPTION_TEXT ${SEC35} $var_35
!insertmacro MUI_DESCRIPTION_TEXT ${SEC36} $var_36
!insertmacro MUI_DESCRIPTION_TEXT ${SEC37} $var_37
!insertmacro MUI_DESCRIPTION_TEXT ${SEC38} $var_38
!insertmacro MUI_DESCRIPTION_TEXT ${SEC39} $var_39
!insertmacro MUI_DESCRIPTION_TEXT ${SEC40} $var_40
!insertmacro MUI_DESCRIPTION_TEXT ${SEC41} $var_41
!insertmacro MUI_DESCRIPTION_TEXT ${SEC42} $var_42
!insertmacro MUI_DESCRIPTION_TEXT ${SEC43} $var_43
!insertmacro MUI_DESCRIPTION_TEXT ${SEC44} $var_44
!insertmacro MUI_DESCRIPTION_TEXT ${SEC45} $var_45
!insertmacro MUI_DESCRIPTION_TEXT ${SEC46} $var_46
!insertmacro MUI_DESCRIPTION_TEXT ${SEC47} $var_47
!insertmacro MUI_DESCRIPTION_TEXT ${SEC48} $var_48
!insertmacro MUI_DESCRIPTION_TEXT ${SEC49} $var_49
!insertmacro MUI_DESCRIPTION_TEXT ${SEC50} $var_50
!insertmacro MUI_FUNCTION_DESCRIPTION_END

"If you're not part of the solution, you're part of the precipitate."

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 2 months ago
Joined: 2006-01-06 21:27
INI format

The INI format needs to be changed to something like this:

[Item 0]
Name=WinMerge Portable
PackageVersion=2.6.14.0
File=WinMerge_Portable_2.6.14.paf.exe
Size=3.3
Description=compare files on the go
MD5=85c0f15ccb64c33d6dd4f8f18454c206

"If you're not part of the solution, you're part of the precipitate."

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
INI format ...

... was born as child of the only way I found to create the components entries dynamic. It works and I know loops and arrays will be much better than a lot of static definitions, but I found no way to get it work Sad

As I sais before, every help is welcome...

Paid for Software more or less?
What You need is OSS!

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 2 months ago
Joined: 2006-01-06 21:27
More notes.
  • Moving it to my own server until we can get it actually uploaded to here. Having all that HTML in the INI is not good and is prone to break any second
  • We don't need to load balance the servers, you can simply use the http://download.sf.net/ address, I've done so before
  • I'll see if I can find my own code which I wrote before to do the same thing. I'm sure some code from that can be used.

"If you're not part of the solution, you're part of the precipitate."

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
Thank You for the feedback

Your absolutly right...
... this tool starts as a little helper (for my own) an gets more and more complex.
New task/issue - looking for a solution - reusing existing code. At the moment its more an muli than a good horse...

Every help or modification is welcome Smile

The ini was on ftp.ooodev before as plain text (then ther a no issues with UTF like Ö etc.) We could upload it to Your server or another place but it should one with upload rights for a team (in order to keep it up to date).

Load balance was established before SF mirrors could be used. At the moment there a only proofed SF mirrors. With some automaticly offered servers are problems nearly every time and the balancing gives a way to use other mirror networks too.

If You'll find Your code, perhaps we could make a new version with the best of both versions Wink

I'll comment the code a little bit more an update it with Your modification, but I'm packed with work at the moment so this will not be done soon.

But perhaps we should discuss if there is any way to publish a NSIS based final of the updater. John said that a delphi solution will be better...

Marko

Paid for Software more or less?
What You need is OSS!

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 2 months ago
Joined: 2006-01-06 21:27
I'm working on it.

I'm working on your code at the moment and adding things.

John, I've written the Delphi code to do the same thing, have a quick search for it.

"If you're not part of the solution, you're part of the precipitate."

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
Great!

Thank You!

Smile

Paid for Software more or less?
What You need is OSS!

LOGAN-Portable
LOGAN-Portable's picture
Offline
Last seen: 11 years 11 months ago
Developer
Joined: 2007-09-11 12:24
If you use save the ini as

If you use save the ini as UTF-8 there should be no problem with unsupported characters...

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
No problems with the ini ...

...it is a problem to use a drupal page an call it ini Smile
If the ini saved as a real utf-8 file on a server (ftp/http) there are no problems.

Paid for Software more or less?
What You need is OSS!

cjwprostar
Offline
Last seen: 16 years 5 months ago
Joined: 2006-09-11 17:29
Bugs

Just a few bugs I think I've found. Don't know if these are tied to NSIS or your code. Nice work so far though!
1) On some items, such as DOSBox, the description won't fit in its area.
2) When deciding where to save the installation files, if I choose a directory with spaces, it won't let me continue.
3) If 2 happens, and I hit back, then next, I get the error from 2 and then it attempts to proceed anyways.

Feature Request - Allow the user to save the installation files. I tend to keep them on my desktop, just in case anything happens to my thumb drive.

Really like the app so far!

The #1 programmer excuse for legitimately slacking off: "My code's compiling." --xkcd

Simeon
Simeon's picture
Offline
Last seen: 10 years 2 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
keep settings

You can set it to keep the settings. Take a look at the sample settings file linked to from the help file.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 6 months 5 days ago
Joined: 2006-11-18 10:26
I think he wants an option

I think he wants an option to save the actual .paf.exe (installer) files that are downloaded from sourceforge to a directory somewhere as a "backup" and not save actual "settings" files or whatever.

I can relate because I have a stash of all the PortableApps. When a new version comes out I delete the old installer so I always have the most current version.

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
There is an option!

Take a look at the settings.ini (pdel=false) will save all downloaded Apps.
If the actual installer is present, updater will not download it again.

Marko

Paid for Software more or less?
What You need is OSS!

mecki77
Offline
Last seen: 2 years 11 months ago
Joined: 2008-03-03 02:54
Great... !!!

Hello Marko,
it's still an ALPHA Version,.... but what I see is great, great, great - I like it,... It will fit perfekt in the Portable Apps suite when it is ready for release,...
I wish i were a programmer, so i could help you Wink but i can still read the scripts and translations for typos or other errors and test the App and Post it if i find anything or when I have any suggestions....

By the way: Your App remembers me on a programm, that i had a long time ago - it was called "Portable App Installer" - but it was a little bit different, to your App: it was installed in the Programs Dir and when it was startet, it downloaded a list of Portable apps, you could choose which ones you would like to install on the stick and the Program downloaded them and installed on the stick, or whereever, that was all,...
I don't know if anyone knows it - or maybe what John thinks about it. But i take a look on my HDD, and - it is still installed with the sources and one of the last apps.ini lists, that it downloaded.
I don't know who the Author was, I can't find anything in the sources, or the program itself,... but the apps.ini list was hosted on mi3soft.info where John Bentley's XenonPortable is hosted, too,... Maybe he knows more about it,...
if you want, i could send you the programfiles and the sources of the "Portable App Installer" - maybe there is something what could help you with this project?!
But there is only one prob: the Programm was written in AutoIt3 Sad
but maybe there could be although something useful,...?!

Edit: It was John Bentley - i took a look in the forum and found the thread, where he posted about the Portable App Installer, but it seems if he isn't working on the Installer anymore - but maybe he could help you with the Updater a little bit,... Here's the link to the forum entry Portable App Installer

José Pedro Arvela
Offline
Last seen: 5 years 12 months ago
Joined: 2007-07-10 07:29
Made an icon

I made some prototype icons. They are nothing special, made on Inkscape in 5 minutes. But they are clean and understandable at small sizes.

As I have no lodging, I can't have them available on the web. But if you give me your e-mail, I can send them to you. (maybe I make them available at my ImageShack account for seeing only)

Blue is everything.

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 11 years 3 months ago
Developer
Joined: 2005-12-10 15:22
You

could always drop them here:

http://www.drop.io/portableappsbeta

José Pedro Arvela
Offline
Last seen: 5 years 12 months ago
Joined: 2007-07-10 07:29
Good Idea

It is a good idea, I will do it in a minute.

------------------------------

EDIT:

Done

Screenshot
PortableApps.com Updater Icons Draft v. 1.0 to 4.0 [35.5kb download]
(MD5: 721a0a6b5b3b9f8e5a3cd009287204cd)

The files include the SVG source and some PNGs beside the actual icons already PAFed (in PAF conformance I mean). It also includes some initial ideas that I didn't like a lot and didn't went on. I made them from scratch by the way, nothing was copied besides the original shape of the icon.

Blue is everything.

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
Thank You for the icon

but the link delivers only:500 - Your link has timed out or is invalid Sad
Send it to please to markomlm[at]openoffice.org.

Marko

Paid for Software more or less?
What You need is OSS!

José Pedro Arvela
Offline
Last seen: 5 years 12 months ago
Joined: 2007-07-10 07:29
Right Link

Ok, here is the right link (maybe it got corrupt while editing the comment).
But anyway I will send it.

(link)

Blue is everything.

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 11 years 3 months ago
Developer
Joined: 2005-12-10 15:22
Timed

out again, you need to just head to this page and download from there.

Mr Magical
Mr Magical's picture
Offline
Last seen: 15 years 2 weeks ago
Joined: 2008-02-15 19:18
Metaphors

We need a metaphor for the icon. This would make it easier for end users. The most common metaphor for updating is 2 arrows pointing in a circle.
The best looking thing would be using a modified portableapps.com logo with 2 arrows as described above (But this might cause problems with copyright and trademarks :().

Signature automatically removed for containing links

mecki77
Offline
Last seen: 2 years 11 months ago
Joined: 2008-03-03 02:54
not at all,...

Great idea with the logo Wink but you're right - it would cause problems with the copyright and the trademark of the Portable Apps logo, so John's permission would be needed to use the logo - if the licence of copyright and trademark allow to use it in a modified way,... Maybe when the app is ready for release he would give his permission to use it.... But i don't know.

José Pedro Arvela
Offline
Last seen: 5 years 12 months ago
Joined: 2007-07-10 07:29
True

It is true that the PortableApps.com icon would be nice in the updater... it is also true that would bring legal issues...

Some updaters have the arrows pointing to a ball icon, but most of the ones I saw have a globe with curved arrows around.

That gives me an idea: A gray globe with curved arrows around (don't know about the color of the arrows, maybe red). What do you think?

Blue is everything.

mecki77
Offline
Last seen: 2 years 11 months ago
Joined: 2008-03-03 02:54
A test of the Updater

yesterday i found my Treksor 2GB LE USB-Stick in the drawer of my desk, containing all official APPs installed with a pack, downloaded from OpenOffice.org, but not used for a half year - alright for a extensive test of the Portable Apps Updater Smile
Okay, here we go: First of all it worked great no troubles with the App itself, but the updater.ini it downloaded seems to contain some errors - I know it's still an Alpha.Version and so it is not very important, but I thought i should tell you about it:

1. Inkscape breaks up with a download Error download Error

 Zielverzeichnis: 
Zielverzeichnis: C:\DOKUME~1\Marc\LOKALE~1\Temp\Data\setup
--2008-03-16 13:27:25--  ftp://mirror.switch.ch/mirror/ooodev/oooportable-plus/new/Inkscape_Portable_0.45.1.0_RC1.paf.exe
           => `Inkscape_Portable_0.45.1.0_RC1.paf.exe'
Resolving mirror.switch.ch... 130.59.10.35, 130.59.10.34
Connecting to mirror.switch.ch|130.59.10.35|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /mirror/ooodev/oooportable-plus/new ... done.
==> SIZE Inkscape_Portable_0.45.1.0_RC1.paf.exe ... done.
==> PASV ... done.    ==> RETR Inkscape_Portable_0.45.1.0_RC1.paf.exe ... 
No such file `Inkscape_Portable_0.45.1.0_RC1.paf.exe'. 

The RC1 is on the SourceForge Server of Portable Apps I think

2. Miranda is only updated to 0.6.8 -> current Version is 0.7.3
3. Onscreen Keyboard Prtable will be updated to Version 1.0 (even if 1.1 is already installed!!!)
4. Eraser Portable is updated to the bug containig Version 5.86a not to the recommended 5.82 Rev3

That was all I've detected so far.
Annother problem: if the Sourceforge Server the Updater has choosen is temporary unreachable (like the SF-Server always can be) the download fails and the updater goes on with the next app, so you have to restart the Updater, to get the Update(s) with failed downloads, too.
Is it possible, that the Updater retrys the download then from annother SF server in his list and if the download failes again goes on withe next Update?

And every time the Updater is started it creates a folder nsf*** in the User temp folder and annother one (data\setup) for downloading the Apps. Isn't it possible to call the nsf***-folder PortableAppsUpdater or somthing like this, and create the data-folder in that folder two?
It's not important for me, cause i don't care if an installer or updater creates one or hundred folders - if they are all when it is ready of course Wink But so is all in one place and it would be more transparent, what happens, for not so experienced Users too.

For every new update that is downloaded my firewall always ask if ns***.tmp may use wget.exe to access the internet. ns***.tmp seems to be a script with the download information for wget, right?
It's okay how it is cause wget is a very good downloader - but i think about users, that can not deactivate their firewall (no admin rights, etc.) or who are not so experienced, that they are know, that the ***.tmp belongs to the updater. Is their a way that the firewall only have to ask once for the whole update process? or maybe to give the ns***.tmp a name like FirefoxUpdate.tmp or something like that - that even not so experienced user know for what it is.
Or the updater first downloads all Updated files, that wget get's a whole download list and has to be started only once and then the installation of each Update starts after the download Part. so you don't have to wait for the downloads between the update installations. I think wget can handle download lists in a txt.file or something like this.
And the installation of all Updates could be startet and executed as a batch process.

Can't the setup process not be automated for Apps, that show no licence informations?

And at least a hint for the download size for all updates: you have the size in the size= line, so you have only to get that values for all checked Apps and let the updater add them - it must be a simple add function - but soory, i don't how far it is possible with NSIS or how to make it. Was only a thought of a simple way to get the full download size.

That was all for now - and i don't wanted to critisize you only a few thoughts and some (i hope useful) hints of me to your App Smile The Updater is a great App, for Portable App Users keep up the good work, if the updater.ini will be corrected and updated it is almost perfect like it is now in it's functions. By the way: i love it how the updater shows the download prgress and the time left - very nice Smile

Simeon
Simeon's picture
Offline
Last seen: 10 years 2 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
A good suggestion

I think is to have the updater continue while I install the Apps so it reduces the overall time needed.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

digitxp
digitxp's picture
Offline
Last seen: 13 years 3 months ago
Joined: 2007-11-03 18:33
Called

progressive download.

Insert original signature here with Greasemonkey Script.

mecki77
Offline
Last seen: 2 years 11 months ago
Joined: 2008-03-03 02:54
What i meant,..

I don't know if it is possible, to start a new download of annother app, while the updater waits for the installation of the prvious app,...
What i meant was to do it in the way, the M$ Windows Update does - first step download all updates and then in the second step install all. so if you click finish, The installer for the next app pops on your screen and you can go one with the next install, without waiting for downloading it first.
And you have two main parts of the Update, the download of all Updates and the intall of all updates - instead of many smll parts.
Would be easier to handle - and maybe easier for the programmer too,...

Simeon
Simeon's picture
Offline
Last seen: 10 years 2 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
yep

I see.

Another idea I just head is that it downloads all updates and then pops up and asks "Do you want to install all Updates to their standard location" And if you say yes it does that so you don't have to click on every installer 5 times. But maybe that would require rewriting the installers so maybe that's not a good idea.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

mecki77
Offline
Last seen: 2 years 11 months ago
Joined: 2008-03-03 02:54
fine idea too

your idea is fine too - i don't think, that the installers must be rewritten for that,... i think a batch or something like that can hit the buttons too.
And in the end all installers base on the same script and the OK_Buttons will have the same functions too, so there may be other ways to automize the button clickings from outside the installers - except for the mozilla based application where the user is required to accept the licence, but these apps could be installed at the begin or the end of the whole process, that the installation not stops, while f.e. Thunderbird waits for accepting the licence and five updates later firefox, and so on...

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 11 years 3 months ago
Developer
Joined: 2005-12-10 15:22
All

NSIS installers, AFAIK, can be passed a /S which puts them in silent mode, you can then pass a filepath to them and they will install into that dir, so this would be possible.

Simeon
Simeon's picture
Offline
Last seen: 10 years 2 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
cool

So maybe its doable Smile

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
This mode is supported by the updater...

... but it is only for advanced usage (not supported, not recomended) cause there will install with the installers defaults (no way to change the dir, no optional components, no way to stop the installer).

Set batch=true

Marko

Paid for Software more or less?
What You need is OSS!

rab040ma
Offline
Last seen: 6 months 1 day ago
Joined: 2007-08-27 13:35
John says that the next

John says that the next PAM/PAP will "manage" the TEMP directory, which I take to mean that it will clean up any files left behind.

One thing you could do until then is set the TEMP environment variable to a folder inside the $TEMP directory, e.g. $TEMP\PortableAppsUpdater. Then just before the Updater exits, have it delete that folder and everything inside it. Most programs will "inherit" and use the revised TEMP variable, so when you delete everything at the end, there won't be any question about what is in the folder and which application created it.

If you are going to download first and install later, you might want to put files in a less volatile place, so they don't have to be downloaded a second time.

MC

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
No temp files left by the updater!

... this files are results of the installers of the packages!
If the installer don't delete the temps, the updater is not responsible for that.
The only issue could be that the updater leaves the empty directory Data/setup but this is result of the change the default package directory to temp.

The Updater job is downloading and starting the installers of the Apps not more.

So it is an issue of the App installer not for the updater.

Marko

Paid for Software more or less?
What You need is OSS!

rab040ma
Offline
Last seen: 6 months 1 day ago
Joined: 2007-08-27 13:35
Reservations

While I agree with your sentiment that each program or installer should clean up after itself, I think PortableApps advertises itself as not leaving things behind. So it shouldn't leave stuff behind.

Apps can be sloppy, or their temp file removal can fail, or they can crash before doing any cleanup.

It is just a couple of lines of code to redirect TEMP to a unique directory and then delete that directory when finished.

Of course this is moot if/when John incorporates TEMP file management.

MC

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
The updater leaves nothing behind ...

... and the entries in the temp folder are not the result of the apps, they are the results of the different installers.

The updater could not redirect the temp files for the installers, cause every installer could handle it his own way and the updater knows nothing about it. The only task the updater could do is deleting all temps and thats not the way!

As I said it before ... if installers left stuff behind that is an issue, but not for the updater.

Paid for Software more or less?
What You need is OSS!

mecki77
Offline
Last seen: 2 years 11 months ago
Joined: 2008-03-03 02:54
Errors in the updater.ini (as far as i can see)

Here are some Errors in the updater.ini (as far as can i see - but i will go on searching) and some thing I've expected after my "Test"

- GIMP is labeled as [InfraRecorderPortable]

- for Eraser Portable is the given Option "PackageVersion=5.86.1.1" but the Option "file" contains the filename of the current (recommended bug-free) Version "file=Eraser_Portable_5.82_Rev_3.paf.exe"

- for Inkscape is given the wrong mirrortype, i think with the Source Forge Servers it should work fine.

- Miranda is not the currentr version 0.7.3 -> it's 0.6.8 instead

- OnscreenKeyboard is not the current version 1.1 it's 1.0 instead

and somewhere in the list must be annother error, cause i have a checkbox in the first window, with a blank app name, when i activate this checkbox, this happens at the point, when the "blank" app is updated

Zielverzeichnis: C:\DOKUME~1\Marc\LOKALE~1\Temp\Data\setup
//: Unsupported scheme.
Starte: "C:\DOKUME~1\Marc\LOKALE~1\Temp\Data\setup\" /DESTINATION="S:\PORTAB~1\"

Error: Unsupported scheme - and a installation call for the app, that points to nowhere - i have not expected, which app it could be that has this buggy entry in the update.ini that causes the error, but i continue searching,...

And at least: Gimp Portable, Eraser Portable and the "Blank" App (and Inkscape because the download failes every time) are suggested for Udate on every run of the Portable App Updater, even if I install them them in the second, third,... run again - there must be something wrong with them in the .ini - maybe the Version-Numbers,...

Ah, and at very least: the Updater has not detected that OpenOffice was aready installed in "OpenOfficeorgPortable" (maybe the old foldername for the german version or the OOo in the Portable Apps Pack from OpenOffice). Instead the Updater installed it in a new Folder named "OpenOfficePortable"

José Pedro Arvela
Offline
Last seen: 5 years 12 months ago
Joined: 2007-07-10 07:29
New Icons

Application: PortableApps.com Updater Icon Draft v5.0
Description: Icon for PortableApps.com Updater which is easy to identify and use.

The new icons draft have landed. This one includes a globe and uses even more the colors of the site.

Screenshot
Download [25.4kb Download / 47.6kb Installed]
(MD5: c1cb02172dc9b542b4025b0a8fff1a2a)

Releases Notes:

Version 5.0 (2008-03-16):

  • The ball is now a grey globe
  • Nice wine colored arrows added

Version 1.0/2.0/3.0/4.0 (2008-03-15): Initial Release

Blue is everything.

BuddhaChu
BuddhaChu's picture
Offline
Last seen: 6 months 5 days ago
Joined: 2006-11-18 10:26
2 much 2 read

This thread is up to 70+ posts so I'm just gonna post what I've found so go ahead and ignore my babbling if it's mentioned above.

Directories in Temp dir need to be removed on program termination.

The App's icon only has one icon in it. It needs five more. Reference

EDIT: I see the icon issue is being worked in the thread above now. Nice job guys!

Cancer Survivors -- Remember the fight, celebrate the victory!
Help control the rugrat population -- have yourself spayed or neutered!

José Pedro Arvela
Offline
Last seen: 5 years 12 months ago
Joined: 2007-07-10 07:29
Ironically...

Ironically I think that TrueColor with 1-bit transparency should also be added to the specs, but I won't screw up anybody just because I don't agree with the specs (although it would look better on W2k).

Blue is everything.

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 2 months ago
Joined: 2006-01-06 21:27
Half-Done

This is half-way towards where I'm taking it.

;Copyright 2008 Marko Moeller
;Copyright 2008 Ryan McCue

;Website: http://PortableApps.com/

;This software is OSI Certified Open Source Software.
;OSI Certified is a certification mark of the Open Source Initiative.

;This program is free software; you can redistribute it and/or
;modify it under the terms of the GNU General Public License
;as published by the Free Software Foundation; either version 2
;of the License, or (at your option) any later version.

;This program is distributed in the hope that it will be useful,
;but WITHOUT ANY WARRANTY; without even the implied warranty of
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;GNU General Public License for more details.

;You should have received a copy of the GNU General Public License
;along with this program; if not, write to the Free Software
;Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

; === Defines ===
!define SHORTNAME "PortableAppsUpdater"
!define VERSION "1.0.0.2"
!define FILENAME "PortableAppsUpdater"
!define PRODUCT_NAME "PortableApps"
!define PRODUCT_VERSION "1.0.0"
!define NAME "${PRODUCT_NAME} ${PRODUCT_VERSION}"
!define PRODUCT_PUBLISHER "PortableApps.com"
!define PRODUCT_WEB_SITE "https://portableapps.com/"

; === App info ===
Name "${PRODUCT_NAME}"
OutFile "..\..\${FILENAME}.exe"

; === NSIS options ===
SetCompressor /SOLID lzma
CRCCheck on
AutoCloseWindow True
RequestExecutionLevel user
AllowRootDirInstall true

; === MUI start ===
!include MUI.nsh
!include nsDialogs.nsh
!include FileFunc.nsh
!include LogicLib.nsh
;!insertmacro DriveSpace
!insertmacro GetOptions
;!insertmacro GetDrives
;!insertmacro GetRoot
;!insertmacro GetSize
!insertmacro GetParent
!include "Time.nsh"
!include "Sections.nsh"
!include "Registry.nsh"
!include "TextFunc.nsh"



; MUI Settings
!define MUI_ABORTWARNING
;!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
!define MUI_ICON "..\..\App\AppInfo\appicon.ico"
BrandingText "PortableApps.com - Your Digital Life, Anywhere™"

; Language Selection Dialog Settings
!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"
!define MUI_COMPONENTSPAGE_SMALLDESC

; == Welcome page ==
!define MUI_WELCOMEFINISHPAGE_BITMAP "PortableApps.comInstaller.bmp"
!define MUI_WELCOMEPAGE_TITLE "${NAME}"
!define MUI_WELCOMEPAGE_TEXT "$(welcome)"
!define MUI_PAGE_CUSTOMFUNCTION_PRE Pre-Welcome
!insertmacro MUI_PAGE_WELCOME

; == License page ==
!define MUI_PAGE_CUSTOMFUNCTION_PRE Pre-License
!insertmacro MUI_PAGE_LICENSE "..\..\Other\Source\License.txt"

; == Components page ==
!define MUI_PAGE_CUSTOMFUNCTION_PRE Pre-Components
!define MUI_PAGE_COMPONENTS_TITLE "Title"
!define MUI_PAGE_COMPONENTS_TEXT "Text"
!insertmacro MUI_PAGE_COMPONENTS

; == Directory page ==
!define MUI_PAGE_CUSTOMFUNCTION_PRE Pre-Directory
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE DirectoryLeave
Page custom ShowAppList
!define MUI_PAGE_DIRECTORY_TITLE "Title Dir"
!insertmacro MUI_PAGE_DIRECTORY

; == Instfiles page ==
!define MUI_PAGE_CUSTOMFUNCTION_PRE Pre-Install
!insertmacro MUI_PAGE_INSTFILES

; == Finish page ==
!define MUI_PAGE_CUSTOMFUNCTION_PRE Pre-Finish
;!define MUI_FINISHPAGE_RUN "$INSTDIR\StartPortableApps.exe"
!define MUI_FINISHPAGE_TEXT "$(finish)"
!insertmacro MUI_PAGE_FINISH

; === Localisations ===
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Italian"
!insertmacro MUI_LANGUAGE "Portuguese"
!insertmacro MUI_LANGUAGE "Spanish"

!insertmacro MUI_RESERVEFILE_LANGDLL

; == German translations ==
LangString welcome ${LANG_GERMAN} "Dieser Assistent wird Sie durch die Online Installation\rbzw. das Online-Update Ihrer PortableApps führen.\r\n\r\nBitte beachten Sie, dass dafür eine Internetverbindung erforderlich ist.\r\n\r\nWenn Sie ein Upgrade von existierenden Installationen Ihrer Anwendungen durchführen, schliessen Sie diese bitte, bevor Sie fortfahren.\r\n\r\nKlicken Sie auf 'Weiter', um fortzufahren."
LangString finish ${LANG_GERMAN} "${NAME} wurde auf Ihrem Laufwerk installiert/aktualisiert.\r\n\r\nBitte Klicken Sie auf 'Beenden', um diesen Assistenten zu schliessen."
LangString plok ${LANG_GERMAN} "ist aktuell!"
LangString checkforplatform ${LANG_GERMAN} "PortableApps.com Platform überprüfen"
LangString refreshmenu ${LANG_GERMAN} "PortableApps.com Menü neu laden"
LangString components ${LANG_GERMAN} "Wählen Sie die Komponenten aus, die Sie installieren/aktualisieren möchten."
LangString c_subtext ${LANG_GERMAN} "Achtung!"
LangString c_subtext2 ${LANG_GERMAN} "Wählen Sie die Komponenten aus, die Sie installieren/aktualisieren möchten und wählen Sie diejenigen ab, die Sie nicht installieren wollen. Die Speicherangaben stimmen nicht!"
LangString d_subtext ${LANG_GERMAN} "Die heruntergeladenen Installationspakete für ${NAME} (je nach Auswahl bis zu 200 MB) werden in dem unten angegebene Verzeichnis gespeichert. Falls Sie in ein anderes Verzeichnis installieren möchten, klicken Sie auf Suchen und wählen Sie ein anderes Verzeichnis aus."
LangString d_label ${LANG_GERMAN} "Speicherort für heruntergeladene Installationspakete von ${NAME}"
LangString d_button ${LANG_GERMAN} "Suchen"
LangString allok ${LANG_GERMAN} "Keine Aktualisierung erforderlich!"
LangString wrongdir ${LANG_GERMAN} "Fehler: Das gewählte Verzeichnis hat $R0 Leerzeichen.$\nBitte wählen Sie ein anderes Verzeichnis."
LangString deleteok ${LANG_GERMAN} "Wollen Sie wirklich alle Dateien in $INSTDIR/setup löschen?"

; == English translations ==
LangString welcome ${LANG_ENGLISH} "This wizard will guide you through the installation and upgrade of your PortableApps.\r\n\r\nIf you are upgrading existing PortableApps, please close them before proceeding.\r\n\r\nPlease ensure you have an active network connection and that the PortableApps Updater is not blocked by your firewall.\r\n\r\nClick Next to continue."
LangString finish ${LANG_ENGLISH} "${NAME} has been installed on your device.\r\n\r\nClick Finish to close this wizard."
LangString runwarning ${LANG_ENGLISH} "Please close all instances of ${CLOSENAME} and then click OK.  The portable app can not be upgraded while it is running."
LangString invaliddirectory ${LANG_ENGLISH} "The destination folder you selected is invalid.  Please choose a valid folder."
LangString notenoughspace ${LANG_ENGLISH} "The device you have selected to install to does not have enough free space for this app."
LangString checkforplatform ${LANG_ENGLISH} "Checking for PortableApps.com Platform"
LangString refreshmenu ${LANG_ENGLISH} "Refreshing PortableApps.com Menu"
LangString plok ${LANG_ENGLISH} "is up to date!"
LangString components ${LANG_ENGLISH} "Select the components to install/update."
LangString c_subtext ${LANG_ENGLISH} "Attention!"
LangString c_subtext2 ${LANG_ENGLISH} "Select the components to install/update and unselect unwanted packages. Don't trust the needed space count, it is wrong!"
LangString d_subtext ${LANG_ENGLISH} "Downloaded install packages of ${NAME} (up to 200 MB depending on your selection) will be stored in this folder. If you want to use another folder, please click Browse and select another one."
LangString d_label ${LANG_ENGLISH} "Place for downloaded install packages of ${NAME}"
LangString d_button ${LANG_ENGLISH} "Browse"
LangString allok ${LANG_ENGLISH} "No actualization needed" ; What is this?
LangString wrongdir ${LANG_ENGLISH} "Error: The installation directory has $R0 space$R1.$\nPlease select another directory."
LangString deleteok ${LANG_ENGLISH} "Do you really want to delete all files in $INSTDIR?"

; == French translations ==
LangString welcome ${LANG_FRENCH} "Cet assistant vous guidera tout au long de l'installation de ${NAME}.\r\n\r\nSi vous mettez à jour une installation existante de PortableApps, veuillez l'arrêter avant de continuer.\r\n\r\nCliquez sur Next pour continuer."
LangString finish ${LANG_FRENCH} "${NAME} a été installé sur votre disque.\r\n\r\nCliquez sur Finish pour fermer cet assistant."
LangString runwarning ${LANG_FRENCH} "Veuillez fermer toutes les instances de ${CLOSENAME} et cliquez ensuite sur OK. L'application portable ne peut pas être mise à jour tant qu'il fonctionne."
LangString invaliddirectory ${LANG_FRENCH} "Le dossier de destination que vous avez sélectionné est invalide. Veuillez choisir un dossier valide."
LangString notenoughspace ${LANG_FRENCH} "Le disque que vous avez sélectionné pour l'installation, ne contient pas assez d'espace libre pour cette application."
LangString checkforplatform ${LANG_FRENCH} "Recherche de la Plateforme PortableApps.com"
LangString refreshmenu ${LANG_FRENCH} "Actualisation du Menu PortableApps.com"
;thanks to whibo
LangString plok ${LANG_FRENCH} "est à jour!"
LangString components ${LANG_FRENCH} "Sélectionnez les composantes à installer/mettre à jour."
LangString c_subtext ${LANG_FRENCH} "Attention!"
LangString c_subtext2 ${LANG_FRENCH} "Sélectionnez les composantes à installer/mettre à jour et ne sélectionnez pas les composantes que vous ne voulez pas. Ne croyez pas que l'espace nécessaire à l'installation compte, c'est faux!"
LangString d_subtext ${LANG_FRENCH} "Composantes téléchargées de ${NAME} (plus de 200 MO dépendamment de Votre sélection) vont être enregistrer dans ce dossier. Si vous voulez les enregistrer dans un autre dossier, S.V.P cliquez sur Sélectionner et choisissez-en un autre."
LangString d_label ${LANG_FRENCH} "Endroit pour enregister les fichiers d'installation des composantes de ${NAME}"
LangString d_button ${LANG_FRENCH} "Sélectionner"
LangString allok ${LANG_FRENCH} "Aucune actualisation nécessaire"
LangString wrongdir ${LANG_FRENCH} "Erreur: Le dossier d'installation a $R0 space$R1.$\nS.V.P veuillez choisir un autre dossier."
LangString deleteok ${LANG_FRENCH} "Voulez-vous vraiment effacer tout les fichiers dans $INSTDIR?"

LangString welcome ${LANG_ITALIAN} "Questa procedura vi guiderà durante l'installazione di PortableApps.\r\n\r\nSe state aggiornando una installazione già esistente di PortableApss, vi invitiamo a chiuderla prima di procedere.\r\n\r\nPremere  su Continua per proseguire."
LangString finish ${LANG_ITALIAN} "${NAME} è stato installato sulla vostra periferica.\r\n\r\nPremere Fine per terminare questa procedura."
LangString runwarning ${LANG_ITALIAN} "Vi invitiamo a chiudere tutte le sessioni aperte di ${CLOSENAME} e quindi premere su OK.  L'applicazione portatile non può essere aggiornata mentre è in esecuzione."
LangString invaliddirectory ${LANG_ITALIAN} "La cartella di destinazione selezionata non è valida.  Vi preghiamo di selezionarne una valida."
LangString notenoughspace ${LANG_ITALIAN} "La periferica che avete selezionato per l'installazione non ha spazio libero sufficiente per questa applicazione."
LangString checkforplatform ${LANG_ITALIAN} "Controllo della Piattaforma PortableApps.com"
LangString refreshmenu ${LANG_ITALIAN} "Aggiornamento del Menù PortableApps.com"
; Needs to be translated
LangString plok ${LANG_ITALIAN} "is up to date!"
LangString components ${LANG_ITALIAN} "Select the components to install/update."
LangString c_subtext ${LANG_ITALIAN} "Attention!"
LangString c_subtext2 ${LANG_ITALIAN} "Select the components to install/update and unselect unwanted packages. Don't trust the needed space count, it is wrong!"
LangString d_subtext ${LANG_ITALIAN} "Downloaded install packages of ${NAME} (up to 200 MB depending on Your selection) will be stored in this directory. If You want another directory, please click Search and select another one."
LangString d_label ${LANG_ITALIAN} "Place for downloaded install packages of ${NAME}"
LangString d_button ${LANG_ITALIAN} "Search"
LangString allok ${LANG_ITALIAN} "No actualization needed"
LangString wrongdir ${LANG_ITALIAN} "Error: The Installaton directory has $R0 space$R1.$\nPlease select another directory."
LangString deleteok ${LANG_ITALIAN} "do You really want to delete all files in  $INSTDIR ?"
;End of section needing translation

;thanks to ptm/lflcorreia
LangString welcome ${LANG_PORTUGUESE} "Este assistente irá guiá-lo na instalação da aplicação ${NAME}.\r\n\r\nSe está a actualizar uma instalação existente de ${NAME}, por favor feche-a antes de continuar.\r\n\r\nClique em Seguinte para continuar."
LangString finish ${LANG_PORTUGUESE} "${NAME} foi instalado no seu dispositivo.\r\n\r\nClique em Terminar para fechar este assistente."
LangString runwarning ${LANG_PORTUGUESE} "Por favor feche todas as instâncias de ${CLOSENAME} e depois clique em OK. A aplicação portátil não pode ser actualizada enquanto está a ser executada."
LangString invaliddirectory ${LANG_PORTUGUESE} "A pasta de destino que seleccionou é inválida. Por favor escolha uma pasta válida."
LangString notenoughspace ${LANG_PORTUGUESE} "O dispositivo que seleccionou para a instalação não tem espaço livre suficiente para esta aplicação."
LangString checkforplatform ${LANG_PORTUGUESE} "A localizar a Plataforma PortableApps.com"
LangString refreshmenu ${LANG_PORTUGUESE} "A recarregar o Menu PortableApps.com"
LangString plok ${LANG_PORTUGUESE} "é a versão mais recente!"
LangString components ${LANG_PORTUGUESE} "Seleccione os componentes para instalar/actualizar."
LangString c_subtext ${LANG_PORTUGUESE} "Atenção!"
LangString c_subtext2 ${LANG_PORTUGUESE} "Seleccione os componentes para instalar/actualizar e desmarque pacotes não desejados. Não confie na contagem do espaço necessário, está errada!"
LangString d_subtext ${LANG_PORTUGUESE} "O download dos pacotes de instalação de ${NAME} (até 200 MB dependendo da sua selecção) irão ser armazenados nesta pasta. Se quer outra pasta, por favor carregue em Procurar e seleccione outra pasta."
LangString d_label ${LANG_PORTUGUESE} "Pasta para o download dos pacotes de instalação de ${NAME}"
LangString d_button ${LANG_PORTUGUESE} "Navegar"
LangString allok ${LANG_PORTUGUESE} "Não são necessárias actualizações"
LangString wrongdir ${LANG_PORTUGUESE} "Erro: A pasta da instalação tem $R0 de espaço$R1.$\nPor favor escolha outra pasta."
LangString deleteok ${LANG_PORTUGUESE} "Tem a certeza que quer apagar todos os ficheiros em $INSTDIR?"

;thanks to Aciago/Spanish team on pa.com
LangString welcome ${LANG_SPANISH} "Este asistente lo guiará en la instalación de ${NAME}.\r\n\r\nSi Usted está actualizando una versión ya existente de ${NAME}, por favor, ciérrela antes de proseguir.\r\n\r\nHaga clic en Siguiente para continuar."
LangString finish ${LANG_SPANISH} "${NAME} ha sido instalado en su dispositivo.\r\n\r\nPresione Finalizar para cerrar este asistente."
LangString runwarning ${LANG_SPANISH} "Por favor, cierre todos las instancias de ${CLOSENAME} y luego haga clic en OK. No se puede actualizar dicho programa portátil mientras se está en ejecución."
LangString invaliddirectory ${LANG_SPANISH} "La carpeta de destino no es válida. Por favor, escoja otra carpeta."
LangString notenoughspace ${LANG_SPANISH} "No hay suficiente espacio libre en el dispositivo seleccionado para instalar la aplicación."
LangString checkforplatform ${LANG_SPANISH} "Buscando la Plataforma de PortableApps.com"
LangString refreshmenu ${LANG_SPANISH} "Recargando el Menú de PortableApps.com"
LangString plok ${LANG_SPANISH} "¡Está actualizado!"
LangString components ${LANG_SPANISH} "Seleccione los componentes a instalar/actualizar."
LangString c_subtext ${LANG_SPANISH} "¡Atención!"
LangString c_subtext2 ${LANG_SPANISH} "Seleccione los componentes a instalar/actualizar y deseleccione los paquetes indeseados. ¡No confíe en la cuenta de espacio necesario, es incorrecta!"
LangString d_subtext ${LANG_SPANISH} "Los paquetes de instalación de ${NAME} descargados (más de 200 MB dependiendo de su selección) serán almacenados en esta carpeta. Si desea usar otro directorio, por favor presione en Buscar y seleccione otro."
LangString d_label ${LANG_SPANISH} "Lugar para los paquetes de instalación de ${NAME} descargados"
LangString d_button ${LANG_SPANISH} "Navegar"
LangString allok ${LANG_SPANISH} "No se necesita actualización"
LangString wrongdir ${LANG_SPANISH} "Error: El directorio de instalación tiene $R0 de espacio$R1.$\nPor favor seleccione otro directorio."
LangString deleteok ${LANG_SPANISH} "¿Realmente desea eliminar todos los archivos en $INSTDIR?"


; Reserve files
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
; === MUI end ===

ComponentText "$(components)" "$(c_subtext)"  "$(c_subtext2)"
DirText "$(d_subtext)" "$(d_label)" "$(d_button)"
InstallButtonText "Start"

var Mirror
var mirror_001
var mirror_002
var mirror_003
var mirror_004
var mirror_005
var mirror_006
var mirror_007
var mirror_008
var mirror_009
var debug
var OMirror
var OName
var OFile
var UFile
var OSource
var OSize
var pversion
var pdel
var lversion
var imod
var mversion
var mcount
var APP_SET
var Proxy_Adr
var wpage
var lpage
var cpage
var dpage
var fpage
var var1
var var2
var var3
var var4
var var5
var var6
var var7
var var8
var var9
var var10
var var11
var var12
var var13
var var14
var var15
var var16
var var17
var var18
var var19
var var20
var var21
var var22
var var23
var var24
var var25
var var26
var var27
var var28
var var29
var var30
var var31
var var32
var var33
var var34
var var35
var var36
var var37
var var38
var var39
var var40
var var41
var var42
var var43
var var44
var var45
var var46
var var47
var var48
var var49
var var50
var var_1
var var_2
var var_3
var var_4
var var_5
var var_6
var var_7
var var_8
var var_9
var var_10
var var_11
var var_12
var var_13
var var_14
var var_15
var var_16
var var_17
var var_18
var var_19
var var_20
var var_21
var var_22
var var_23
var var_24
var var_25
var var_26
var var_27
var var_28
var var_29
var var_30
var var_31
var var_32
var var_33
var var_34
var var_35
var var_36
var var_37
var var_38
var var_39
var var_40
var var_41
var var_42
var var_43
var var_44
var var_45
var var_46
var var_47
var var_48
var var_49
var var_50
var tvar1
var tvar2
var tvar3
var tvar4
var tvar5
var tvar6
var varn
var varb
var vart
var varc
var vard
var no_ok
var pbatch
var pselect
var PortableApps.comLocaleID
var PORTABLEAPPSROOTPATH
var OCaption
var ODescription
var md5
;InstallDir "$EXEDIR\Data\setup"
InstallDir "$TEMP\Data\setup"







Section "-setup (erforderlich)" SEC00
	;SectionGetText {SEC00} $R2
	;MessageBox MB_OK "R0 $R0 R2 $R2"
	;StrCpy $OName $R2
	;Call OI_select
SectionEnd

Section /o "$var1" SEC01
	StrCpy $OName $var1
	Call OI_select
SectionEnd

Section /o "$var2" SEC02
	StrCpy $OName $var2
	Call OI_select
SectionEnd

Section /o "$var3" SEC03
	StrCpy $OName $var3
	Call OI_select
SectionEnd

Section /o "$var4" SEC04
	StrCpy $OName $var4
	Call OI_select
SectionEnd

Section /o "$var5" SEC05
	StrCpy $OName $var5
	Call OI_select
SectionEnd

Section /o "$var6" SEC06
	StrCpy $OName $var6
	Call OI_select
SectionEnd

Section /o "$var7" SEC07
	StrCpy $OName $var7
	Call OI_select
SectionEnd

Section /o "$var8" SEC08
	StrCpy $OName $var8
	Call OI_select
SectionEnd

Section /o "$var9" SEC09
	StrCpy $OName $var9
	Call OI_select
SectionEnd

Section /o "$var10" SEC10
	StrCpy $OName $var10
	Call OI_select
SectionEnd

Section /o "$var11" SEC11
	StrCpy $OName $var11
	Call OI_select
SectionEnd

Section /o "$var12" SEC12
	StrCpy $OName $var12
	Call OI_select
SectionEnd

Section /o "$var13" SEC13
	StrCpy $OName $var13
	Call OI_select
SectionEnd

Section /o "$var14" SEC14
	StrCpy $OName $var14
	Call OI_select
SectionEnd

Section /o "$var15" SEC15
	StrCpy $OName $var15
	Call OI_select
SectionEnd

Section /o "$var16" SEC16
	StrCpy $OName $var16
	Call OI_select
SectionEnd

Section /o "$var17" SEC17
	StrCpy $OName $var17
	Call OI_select
SectionEnd

Section /o "$var18" SEC18
	StrCpy $OName $var18
	Call OI_select
SectionEnd

Section /o "$var19" SEC19
	StrCpy $OName $var19
	Call OI_select
SectionEnd

Section /o "$var20" SEC20
	StrCpy $OName $var20
	Call OI_select
SectionEnd

Section /o "$var21" SEC21
	StrCpy $OName $var21
	Call OI_select
SectionEnd

Section /o "$var22" SEC22
	StrCpy $OName $var22
	Call OI_select
SectionEnd

Section /o "$var23" SEC23
	StrCpy $OName $var23
	Call OI_select
SectionEnd

Section /o "$var24" SEC24
	StrCpy $OName $var24
	Call OI_select
SectionEnd

Section /o "$var25" SEC25
	StrCpy $OName $var25
	Call OI_select
SectionEnd

Section /o "$var26" SEC26
	StrCpy $OName $var26
	Call OI_select
SectionEnd

Section /o "$var27" SEC27
	StrCpy $OName $var27
	Call OI_select
SectionEnd

Section /o "$var28" SEC28
	StrCpy $OName $var28
	Call OI_select
SectionEnd

Section /o "$var29" SEC29
	StrCpy $OName $var29
	Call OI_select
SectionEnd

Section /o "$var30" SEC30
	StrCpy $OName $var30
	Call OI_select
SectionEnd

Section /o "$var31" SEC31
	StrCpy $OName $var31
	Call OI_select
SectionEnd

Section /o "$var32" SEC32
	StrCpy $OName $var32
	Call OI_select
SectionEnd

Section /o "$var33" SEC33
	StrCpy $OName $var33
	Call OI_select
SectionEnd

Section /o "$var34" SEC34
	StrCpy $OName $var34
	Call OI_select
SectionEnd

Section /o "$var35" SEC35
	StrCpy $OName $var35
	Call OI_select
SectionEnd

Section /o "$var36" SEC36
	StrCpy $OName $var36
	Call OI_select
SectionEnd

Section /o "$var37" SEC37
	StrCpy $OName $var37
	Call OI_select
SectionEnd

Section /o "$var38" SEC38
	StrCpy $OName $var38
	Call OI_select
SectionEnd

Section /o "$var39" SEC39
	StrCpy $OName $var39
	Call OI_select
SectionEnd

Section /o "$var40" SEC40
	StrCpy $OName $var40
	Call OI_select
SectionEnd

Section /o "$var41" SEC41
	StrCpy $OName $var41
	Call OI_select
SectionEnd

Section /o "$var42" SEC42
	StrCpy $OName $var42
	Call OI_select
SectionEnd

Section /o "$var43" SEC43
	StrCpy $OName $var43
	Call OI_select
SectionEnd

Section /o "$var44" SEC44
	StrCpy $OName $var44
	Call OI_select
SectionEnd

Section /o "$var45" SEC45
	StrCpy $OName $var45
	Call OI_select
SectionEnd

Section /o "$var46" SEC46
	StrCpy $OName $var46
	Call OI_select
SectionEnd

Section /o "$var47" SEC47
	StrCpy $OName $var47
	Call OI_select
SectionEnd

Section /o "$var48" SEC48
	StrCpy $OName $var48
	Call OI_select
SectionEnd

Section /o "$var49" SEC49
	StrCpy $OName $var49
	Call OI_select
SectionEnd

Section /o "$var50" SEC50
	StrCpy $OName $var50
	Call OI_select
SectionEnd

Section "-Cleanup" sec_cu


SectionEnd


Section -Post
	Sleep 2000
	Delete "$EXEDIR\Data\updater.ini"
	${registry::Unload}
	${time::Unload}
	;=== Refresh PortableApps.com Menu (not final version)
	${GetParent} `$INSTDIR` $0
	;=== Check that it exists at the right location
	DetailPrint '$(checkforplatform)'
	IfFileExists `$0\PortableApps.com\App\PortableAppsPlatform.exe` "" TheEnd
		;=== Check that it's the real deal so we aren't hanging with no response
		MoreInfo::GetProductName `$0\PortableApps.com\App\PortableAppsPlatform.exe`
		Pop $1
		StrCmp $1 "PortableApps.com Platform" "" TheEnd
		MoreInfo::GetCompanyName `$0\PortableApps.com\App\PortableAppsPlatform.exe`
		Pop $1
		StrCmp $1 "PortableApps.com" "" TheEnd
		;StrCmp $debug "false" +2
		;MessageBox MB_OK "POST PA found!"
		

		;=== Check that it's running
		FindProcDLL::FindProc "PortableAppsPlatform.exe"
		StrCmp $R0 "1" "" TheEnd
		
		;=== Send message for the Menu to refresh
		StrCpy $2 'PortableApps.comPlatformWindowMessageToRefresh$0\PortableApps.com\App\PortableAppsPlatform.exe'
		System::Call "user32::RegisterWindowMessage(t r2) i .r3"
		DetailPrint '$(refreshmenu)'
		SendMessage 65535 $3 0 0
	TheEnd:
SectionEnd

ShowInstDetails show

Function .onInit
	Call default_settings
	Push $EXEDIR
	Call GetParent
	Pop $PORTABLEAPPSROOTPATH
	;MessageBox MB_OK $PORTABLEAPPSROOTPATH
	Call GET_COMMAND_LINE_PARAMETERS
	Call CheckProxySettings
	Call LanguageInit
	Call sstart
	Call PrepareAppList
FunctionEnd

Function LanguageInit

	;BEGIN: Init Language Detection Code
	ReadEnvStr $PortableApps.comLocaleID "PortableApps.comLocaleID"
	StrCmp $PortableApps.comLocaleID "1031" SetLanguageFromEnvironment ;German
	StrCmp $PortableApps.comLocaleID "1034" SetLanguageFromEnvironment ;Spanish
	StrCmp $PortableApps.comLocaleID "1036" SetLanguageFromEnvironment ;French
	StrCmp $PortableApps.comLocaleID "1040" SetLanguageFromEnvironment ;Italian
	StrCmp $PortableApps.comLocaleID "2070" SetLanguageFromEnvironment ;Portuguese
	StrCmp $PortableApps.comLocaleID "1033" SetLanguageFromEnvironment ShowLanguageSelector ;English

	;END: Init Language Detection Code
	
	SetLanguageFromEnvironment:

		StrCpy $LANGUAGE $PortableApps.comLocaleID
		Goto No_LANG_SELECT

	ShowLanguageSelector:
		!insertmacro MUI_LANGDLL_DISPLAY
	No_LANG_SELECT:
FunctionEnd

Function GET_COMMAND_LINE_PARAMETERS
	IfFileExists "$EXEDIR/Data/settings.ini" use_ini
	;MessageBox MB_OK "keine INI"


	${GetOptions} "$CMDLINE" "/CFG=" $R0
	IfErrors step0
		StrCpy $UFile $R0
	
	step0:
	${GetOptions} "$CMDLINE" "/NOWP" $R0
	IfErrors noskip1
		StrCpy "$wpage" "false"
	noskip1:

	;Inst Page must be shown if APP is set
	;${GetOptions} "$CMDLINE" "/APP=" $R0
	;IfErrors noskip2

	
	${GetOptions} "$CMDLINE" "/NOIP" $R0
	IfErrors noskip2
		;StrCpy "$ipage" "false"
	noskip2:
	${GetOptions} "$CMDLINE" "/NOFP" $R0
	IfErrors noskip3
		StrCpy "$fpage" "false"
	noskip3:
	${GetOptions} "$CMDLINE" "/APP=" $R0
	IfErrors noskip4
		StrCpy $APP_SET "TRUE"
	
	noskip4:
	${GetOptions} "$CMDLINE" "/NODIR" $R0
	IfErrors noskip5
		StrCpy "$dpage" "false"
	noskip5:
	${GetOptions} "$CMDLINE" "/NOL" $R0
	IfErrors noskip6
		StrCpy "$lpage" "false"
	noskip6:
	${GetOptions} "$CMDLINE" "/PDEL" $R0
	IfErrors nodelete
		MessageBox MB_YESNO|MB_ICONEXCLAMATION "$(deleteok)" IDNO nodelete
		StrCpy "$pdel" "false"
	;RMDir /r "$INSTDIR\setup\*.*" 
	;RMDir "$INSTDIR\setup"
	;RMDir /r "$INSTDIR" 
	nodelete:
	${GetOptions} "$CMDLINE" "/DEBUG" $R0
	IfErrors nodebug
		StrCpy "$debug" "true"
		ClearErrors
	nodebug:
	${GetOptions} "$CMDLINE" "/LANG=" $R0
	IfErrors nolang
		SetEnv::SetEnvVar "PortableApps.comLocaleID" "$R0"
	nolang:
	${GetOptions} "$CMDLINE" "/NOOK" $R0	
	IfErrors mno_ok
		StrCpy "$no_ok" "true"
	mno_ok:
	GoTo Exit
	
	use_ini:
	;MessageBox MB_OK "INI gefunden"
	Call read_settings_ini
	
	
	Exit:

FunctionEnd

Function ShowAppList
	nsDialogs::Show
FunctionEnd

Var AppList
Var AppListBox
; This *must* be cleaned up before release
Function PrepareAppList
	; Create our dialog page
	nsDialogs::Create /NOUNLOAD 1018
	Pop $0
	
	; Make the list box
	${NSD_CreateListBox} 0 0 100% 100% ""
	Pop $AppListBox
	SendMessage $AppListBox ${LB_ADDSTRING} 0 "STR:Simple entry"
	SendMessage $AppListBox ${LB_ADDSTRING} 0 "STR:Another entry"
	SendMessage $AppListBox ${LB_ADDSTRING} 0 "STR:Blah"



	StrCpy $mcount $0
	step1:
	intOp $varn $varn + 1
	Call OU_select
	;MessageBox MB_OK "VARN ist $varn VARB ist $varb Caption $OCaption version $pversion"
	${Select} $varn

	${Case} "$mcount"
		Goto step2
	${Case} "1"
		StrCmp $varb "1" step1
		StrCpy $var1 $vart
		StrCpy $var_1 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC01} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC01}
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC01} 17
		Goto step1
	${Case} "2"
		StrCmp $varb "1" step1
		StrCpy $var2 $vart
		StrCpy $var_2 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC02} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC02}
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC02} 17
		Goto step1
	${Case} "3"
		StrCmp $varb "1" step1
		StrCpy $var3 $vart
		StrCpy $var_3 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC03} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC03}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC03} 17
		Goto step1
	${Case} "4"
		StrCmp $varb "1" step1
		StrCpy $var4 $vart
		StrCpy $var_4 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC04} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC04}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC04} 17
		Goto step1
	${Case} "5"
		StrCmp $varb "1" step1
		StrCpy $var5 $vart
		StrCpy $var_5 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC05} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC05}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC05} 17
		Goto step1
	${Case} "6"
		StrCmp $varb "1" step1
		StrCpy $var6 $vart
		StrCpy $var_6 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC06} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC06}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC06} 17
		Goto step1
	${Case} "7"
		StrCmp $varb "1" step1
		StrCpy $var7 $vart
		StrCpy $var_7 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC07} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC07}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC07} 17
		Goto step1
	${Case} "8"
		StrCmp $varb "1" step1
		StrCpy $var8 $vart
		StrCpy $var_8 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC08} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC08}
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC08} 17
		Goto step1
	${Case} "9"
		StrCmp $varb "1" step1
		StrCpy $var9 $vart
		StrCpy $var_9 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC09} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC09}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC09} 17
		Goto step1
	${Case} "10"
		StrCmp $varb "1" step1
		StrCpy $var10 $vart
		StrCpy $var_10 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC10} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC10}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC10} 17
		Goto step1
	${Case} "11"
		StrCmp $varb "1" step1
		StrCpy $var11 $vart
		StrCpy $var_11 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC11} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC11}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC11} 17
		Goto step1
	${Case} "12"
		StrCmp $varb "1" step1
		StrCpy $var12 $vart
		StrCpy $var_12 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC12} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC12}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC12} 17
		Goto step1
	${Case} "13"
		StrCmp $varb "1" step1
		StrCpy $var13 $vart
		StrCpy $var_13 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC13} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC13}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC13} 17
		Goto step1
	${Case} "14"
		StrCmp $varb "1" step1
		StrCpy $var14 $vart
		StrCpy $var_14 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC14} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC14}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC14} 17
		Goto step1
	${Case} "15"
		StrCmp $varb "1" step1
		StrCpy $var15 $vart
		StrCpy $var_15 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC15} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC15}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC15} 17
		Goto step1
	${Case} "16"
		StrCmp $varb "1" step1
		StrCpy $var16 $vart
		StrCpy $var_16 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC16} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC16}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC16} 17
		Goto step1
	${Case} "17"
		StrCmp $varb "1" step1
		StrCpy $var17 $vart
		StrCpy $var_17 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC17} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC17}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC17} 17
		Goto step1
	${Case} "18"
		StrCmp $varb "1" step1
		StrCpy $var18 $vart
		StrCpy $var_18 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC18} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC18}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC18} 17
		Goto step1
	${Case} "19"
		StrCmp $varb "1" step1
		StrCpy $var19 $vart
		StrCpy $var_19 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC19} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC19}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC19} 17
		Goto step1
	${Case} "20"
		StrCmp $varb "1" step1
		StrCpy $var20 $vart
		StrCpy $var_20 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC20} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC20}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC20} 17
		Goto step1
	${Case} "21"
		StrCmp $varb "1" step1
		StrCpy $var21 $vart
		StrCpy $var_21 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC21} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC21}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC21} 17
		Goto step1
	${Case} "22"
		StrCmp $varb "1" step1
		StrCpy $var22 $vart
		StrCpy $var_22 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC22} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC22}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC22} 17
		Goto step1
	${Case} "23"
		StrCmp $varb "1" step1
		StrCpy $var23 $vart
		StrCpy $var_23 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC23} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC23}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC23} 17
		Goto step1
	${Case} "24"
		StrCmp $varb "1" step1
		StrCpy $var24 $vart
		StrCpy $var_24 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC24} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC24}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC24} 17
		Goto step1
	${Case} "25"
		StrCmp $varb "1" step1
		StrCpy $var25 $vart
		StrCpy $var_25 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC25} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC25}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC25} 17
		Goto step1
	${Case} "26"
		StrCmp $varb "1" step1
		StrCpy $var26 $vart
		StrCpy $var_26 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC26} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC26}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC26} 17
		Goto step1
	${Case} "27"
		StrCmp $varb "1" step1
		StrCpy $var27 $vart
		StrCpy $var_27 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC27} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC27}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC27} 17
		Goto step1
	${Case} "28"
		StrCmp $varb "1" step1
		StrCpy $var28 $vart
		StrCpy $var_28 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC28} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC28}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC28} 17
		Goto step1
	${Case} "29"
		StrCmp $varb "1" step1
		StrCpy $var29 $vart
		StrCpy $var_29 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC29} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC29}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC29} 17
		Goto step1
	${Case} "30"
		StrCmp $varb "1" step1
		StrCpy $var30 $vart
		StrCpy $var_30 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC30} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC30}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC30} 17
		Goto step1
	${Case} "31"
		StrCmp $varb "1" step1
		StrCpy $var31 $vart
		StrCpy $var_31 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC31} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC31}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC31} 17
		Goto step1
	${Case} "32"
		StrCmp $varb "1" step1
		StrCpy $var32 $vart
		StrCpy $var_32 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC32} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC32}
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC32} 17
		Goto step1
	${Case} "33"
		StrCmp $varb "1" step1
		StrCpy $var33 $vart
		StrCpy $var_33 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC33} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC33}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC33} 17
		Goto step1
	${Case} "34"
		StrCmp $varb "1" step1
		StrCpy $var34 $vart
		StrCpy $var_34 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC34} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC34}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC34} 17
		Goto step1
	${Case} "35"
		StrCmp $varb "1" step1
		StrCpy $var35 $vart
		StrCpy $var_35 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC35} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC35}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC35} 17
		Goto step1
	${Case} "36"
		StrCmp $varb "1" step1
		StrCpy $var36 $vart
		StrCpy $var_36 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC36} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC36}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC36} 17
		Goto step1
	${Case} "37"
		StrCmp $varb "1" step1
		StrCpy $var37 $vart
		StrCpy $var_37 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC37} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC37}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC37} 17
		Goto step1
	${Case} "38"
		StrCmp $varb "1" step1
		StrCpy $var38 $vart
		StrCpy $var_38 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC38} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC38}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC38} 17
		Goto step1
	${Case} "39"
		StrCmp $varb "1" step1
		StrCpy $var39 $vart
		StrCpy $var_39 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC39} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC39}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC39} 17
		Goto step1
	${Case} "40"
		StrCmp $varb "1" step1
		StrCpy $var40 $vart
		StrCpy $var_40 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC40} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC40}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC40} 17
		Goto step1
	${Case} "41"
		StrCmp $varb "1" step1
		StrCpy $var41 $vart
		StrCpy $var_41 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC41} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC41}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC41} 17
		Goto step1
	${Case} "42"
		StrCmp $varb "1" step1
		StrCpy $var42 $vart
		StrCpy $var_42 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC42} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC42}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC42} 17
		Goto step1
	${Case} "43"
		StrCmp $varb "1" step1
		StrCpy $var43 $vart
		StrCpy $var_43 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC43} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC43}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC43} 17
		Goto step1
	${Case} "44"
		StrCmp $varb "1" step1
		StrCpy $var44 $vart
		StrCpy $var_44 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC44} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC44}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC44} 17
		Goto step1
	${Case} "45"
		StrCmp $varb "1" step1
		StrCpy $var45 $vart
		StrCpy $var_45 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC45} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC45}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC45} 17
		Goto step1
	${Case} "46"
		StrCmp $varb "1" step1
		StrCpy $var46 $vart
		StrCpy $var_46 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC46} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC46}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC46} 17
		Goto step1
	${Case} "47"
		StrCmp $varb "1" step1
		StrCpy $var47 $vart
		StrCpy $var_47 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC47} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC47}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC47} 17
		Goto step1
	${Case} "48"
		StrCmp $varb "1" step1
		StrCpy $var48 $vart
		StrCpy $var_48 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC48} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC48}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC48} 17
		Goto step1
	${Case} "49"
		StrCmp $varb "1" step1
		StrCpy $var49 $vart
		StrCpy $var_49 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC49} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC49}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC49} 17
		Goto step1
	${Case} "50"
		StrCmp $varb "1" step1
		StrCpy $var50 $vart
		StrCpy $var_50 "$ODescription $OSize"
		StrCpy "$varc" "1"
		SectionSetText ${SEC50} "$OCaption $pversion"
		StrCmp $pselect "false" step1
		!insertmacro SelectSection ${SEC50}
		StrCpy "$varc" "1"
		StrCmp $pselect "true" step1
		SectionSetFlags ${SEC50} 17
		Goto step1
        ${CaseElse}
		;Goto step1
	${EndSelect}

	step2:
	StrCmp $vard "1" step4
	StrCmp $varc "1" step4
	StrCmp $no_ok "true" +2
	MessageBox MB_OK "$(allok)"
	Delete "$EXEDIR\Data\updater.ini"
	Quit
	step4:
FunctionEnd


Function OU_select
	StrCpy "$varb" "0"
	${Select} $varn
	${Case} "batch"
		;MessageBox MB_OK "Batchmode"
	${CaseElse}
		ReadINIStr $0 "$UFile" "Hosted_Apps" $varn
		StrCpy $vart $0
		StrCpy $OName $vart
		;MessageBox MB_OK "Vart:$vart"
	${EndSelect}
	call read_update_ini_OName
	
	ReadINIStr $0 "$PORTABLEAPPSROOTPATH\$OName\App\AppInfo\appinfo.ini" "Version" "PackageVersion"
	StrCpy "$lversion" $0
	${Select} $lversion
	${Case} $pversion
		StrCpy "$varb" "1"
		;MessageBox MB_OK "$OName: $(plok) (server:$pversion/suite:$lversion)"
	${Case} ""
		;check if this app on the useres blacklist
		ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Blacklist" "$OName"
		StrCmp $0 "true" +3
		StrCpy "$vard" "1"
		Goto +2
		StrCpy "$varb" "1"
	${CaseElse}	

	${EndSelect}
FunctionEnd

Function sstart
	
	Delete "$EXEDIR\Data\updater.ini"
	;SetOutPath "$EXEDIR\setup"
	;SetOverwrite ifnewer

	${Select} $UFile

	${Case} "$EXEDIR\Data\updater.ini"
		;MessageBox MB_OK "Netz"
		SetOutPath "$EXEDIR\Data\"
		nsexec::exectolog `"$EXEDIR\App\wget" --passive-ftp "$OFile"` 
		;Call ODownload
	${CaseElse}
		;MessageBox MB_OK "Lokal"
	${EndSelect}
	SetOutPath "$INSTDIR"
	StrCmp $debug "false" +2
	MessageBox MB_OK "$INSTDIR"

	${GetOptions} "$CMDLINE" "/APP=" $R0
	IfErrors raus
	StrCpy $OName $R0
	;Call OStart
	MessageBox MB_OK "Geprüft wird: $OName. Wenn eine Aktualisierung erforderlich ist, wird der Installer nach der Prüfung herunter geladen und danach aufgerufen (kann etwas dauern)." ; #nt
	StrCpy $varn "batch"
	Call OU_select
	StrCmp $vard "1" step5
	StrCmp $varc "1" step5
    	StrCmp $no_ok "true" +2
	MessageBox MB_OK "$(allok)"

	Delete "$EXEDIR\Data\updater.ini"
	Quit

	step5:
	Call OI_select
	Quit

	raus:
 	Call read_update_ini_OName
	BringToFront
FunctionEnd

Function DirectoryLeave
 
  # Call the CheckForSpaces function.
  Push $INSTDIR # Input string (install path).
   Call CheckForSpaces
  Pop $R0 # The function returns the number of spaces found in the input string.
 
  # Check if any spaces exist in $INSTDIR.
  StrCmp $R0 0 NoSpaces
 
    # Plural if more than 1 space in $INSTDIR.
    StrCmp $R0 1 0 +3
      StrCpy $R1 ""
    Goto +2
      StrCpy $R1 "s"
 
    # Show message box then take the user back to the Directory page.
    MessageBox MB_OK|MB_ICONEXCLAMATION "$(wrongdir)"
    Abort
 
  NoSpaces:
 
FunctionEnd

Function CheckForSpaces
 Exch $R0
 Push $R1
 Push $R2
 Push $R3
 StrCpy $R1 -1
 StrCpy $R3 $R0
 StrCpy $R0 0
 loop:
   StrCpy $R2 $R3 1 $R1
   IntOp $R1 $R1 - 1
   StrCmp $R2 "" done
   StrCmp $R2 " " 0 loop
   IntOp $R0 $R0 + 1
 Goto loop
 done:
 Pop $R3
 Pop $R2
 Pop $R1
 Exch $R0
FunctionEnd


Function Pre-Welcome
StrCmp $wpage "true" +2
	Abort
FunctionEnd

Function Pre-Install
;StrCmp $ipage "true" +2
	;Abort
FunctionEnd
 
Function Pre-Finish
StrCmp $fpage "true" +2
	Abort
FunctionEnd

Function Pre-Components
${GetOptions} "$CMDLINE" "/APP=" $R0
IfErrors noskip04
	StrCpy $APP_SET "TRUE"
	Abort
noskip04:
FunctionEnd

Function Pre-Directory
StrCmp $dpage "true" noskip05
	Abort
noskip05:
call DirectoryLeave
FunctionEnd

Function Pre-License
StrCmp $lpage "true" +2
	Abort
FunctionEnd

Function default_settings
	StrCpy "$Proxy_Adr" ""
	StrCpy "$wpage" "true"
	StrCpy "$lpage" "true"
	StrCpy "$cpage" "true"
	StrCpy "$dpage" "true"
	StrCpy "$fpage" "true"
	StrCpy "$pdel" "true"
	StrCpy $UFile "$EXEDIR\Data\updater.ini"
	StrCpy $OFile "http://cubegames.net/code/portableapps-updater/application_list.ini"
	StrCpy $varn "0"
	StrCpy $debug "false"
	StrCpy $no_ok "false"
	StrCpy $pbatch "false"
	StrCpy $pselect "false"

FunctionEnd




Function ORandom
 ${time::GetLocalTime} $0
 ${time::TimeString} "$0" $tvar1 $tvar2 $tvar3 $tvar4 $tvar5 $tvar6

 ${If} $tvar6 = 5
    StrCpy $Mirror $mirror_001
 ${EndIf}
 ${If} $tvar6 >= 10
    StrCpy $Mirror $mirror_002
 ${EndIf}
 ${If} $tvar6 >= 15
    StrCpy $Mirror $mirror_003
 ${EndIf}
 ${If} $tvar6 >= 20
    StrCpy $Mirror $mirror_004
 ${EndIf}
 ${If} $tvar6 >= 30
    StrCpy $Mirror $mirror_005
 ${EndIf}
 ${If} $tvar6 >= 40
    StrCpy $Mirror $mirror_006
 ${EndIf}
 ${If} $tvar6 >= 45
    StrCpy $Mirror $mirror_007
 ${EndIf}
 ${If} $tvar6 >= 50
    StrCpy $Mirror $mirror_008
 ${EndIf}
FunctionEnd




Function ODownload
	;If file exists do nothing
	IfFileExists "$INSTDIR\$OFile" +2
	nsexec::exectolog `"$EXEDIR\App\wget" --passive-ftp "$OMirror/$OSource/$OFile"`  
FunctionEnd

Function OInstall
	${Select} $pbatch
	${Case} "true"
		StrCmp $debug "false" +2
		MessageBox MB_OK "batch"
		ExecWait `"$INSTDIR\$OFile" /DESTINATION="$PORTABLEAPPSROOTPATH\" /S` 
	${CaseElse}
		StrCmp $debug "false" +2
		MessageBox MB_OK "normal"
		ExecWait `"$INSTDIR\$OFile" /DESTINATION="$PORTABLEAPPSROOTPATH\"` 
	${EndSelect}
	StrCmp $pdel "false" +3
	Sleep 2000
	Delete "$INSTDIR\$OFile"
	BringToFront
FunctionEnd

Function OExtract
	${Select} $pbatch
	${Case} "true"
		StrCmp $debug "false" +2
		MessageBox MB_OK "Batch"
		ExecWait `"$INSTDIR\$OFile" -y -o"$PORTABLEAPPSROOTPATH\"`
	${CaseElse}
		StrCmp $debug "false" +2
		MessageBox MB_OK "Normal"
		ExecWait `"$INSTDIR\$OFile" -o"$PORTABLEAPPSROOTPATH\"` 
	${EndSelect}
	StrCmp $pdel "false" +3
	Sleep 2000
	Delete "$INSTDIR\$OFile"
	BringToFront
FunctionEnd


Function read_update_ini_mirror
	ReadINIStr $0 "$UFile" "$mversion" "001"
	StrCpy $mirror_001 $0

	ReadINIStr $0 "$UFile" "$mversion" "002"
	StrCpy $mirror_002 $0

	ReadINIStr $0 "$UFile" "$mversion" "003"
	StrCpy $mirror_003 $0

	ReadINIStr $0 "$UFile" "$mversion" "004"
	StrCpy $mirror_004 $0

	ReadINIStr $0 "$UFile" "$mversion" "005"
	StrCpy $mirror_005 $0

	ReadINIStr $0 "$UFile" "$mversion" "006"
	StrCpy $mirror_006 $0

	ReadINIStr $0 "$UFile" "$mversion" "007"
	StrCpy $mirror_007 $0

	ReadINIStr $0 "$UFile" "$mversion" "008"
	StrCpy $mirror_008 $0

	ReadINIStr $0 "$UFile" "$mversion" "009"
	StrCpy $mirror_009 $0
FunctionEnd


Function read_update_ini_OName
	;reset $pselect
	StrCpy "$pselect" "false"

	ReadINIStr $0 "$UFile" $OName "PackageVersion"
	StrCpy "$pversion" $0	

	ReadINIStr $0 "$UFile" $OName "Source"
	StrCpy "$OSource" $0

	ReadINIStr $0 "$UFile" $OName "imod"
	StrCpy "$imod" $0
	
	ReadINIStr $0 "$UFile" $OName "mversion"
	StrCpy "$mversion" $0

	ReadINIStr $0 "$UFile" $OName "size"
	StrCpy "$OSize" $0

	ReadINIStr $0 "$UFile" $OName "caption"
	StrCpy "$OCaption" $0

	ReadINIStr $0 "$UFile" $OName "description$LANGUAGE"
	${Select} $0 
	${Case} "" 
		ReadINIStr $0 "$UFile" $OName "description"
	${EndSelect}
	StrCpy "$ODescription" $0

	ReadINIStr $0 "$UFile" $OName "pselect"
	StrCmp $0 "" +2
	StrCpy "$pselect" $0

	ReadINIStr $0 "$UFile" $OName "md5sum"
	StrCmp $0 "" +2
	StrCpy "$md5" $0

	call read_update_ini_OFile
FunctionEnd

Function read_settings_ini
	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Update" "ofile"
	StrCmp $0 "" +2
	StrCpy "$OFile" $0

	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Update" "batch"
	StrCmp $0 "" +2
	StrCpy "$pbatch" $0

	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Update" "pselect"
	StrCmp $0 "" +2
	StrCpy "$pselect" $0

	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Update" "ufile"
	StrCmp $0 "" +2
	StrCpy "$UFile" $0

	;ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Update" "tempdir"
	;StrCmp $0 "" +2
	
	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Cleanup" "pdel"
	StrCmp $0 "" +2
	StrCpy "$pdel" $0

	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Proxy" "Proxy_Adr"
	StrCmp $0 "" +2
	StrCpy "$Proxy_Adr" $0

	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Show" "Welcome"
	StrCmp $0 "" +2
	StrCpy "$wpage" $0

	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Show" "License"
	StrCmp $0 "" +2
	StrCpy "$lpage" $0

	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Show" "Components"
	StrCmp $0 "" +2
	StrCpy "$cpage" $0
	
	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Show" "Directory"
	StrCmp $0 "" +2
	StrCpy "$dpage" $0

	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Show" "Finish"
	StrCmp $0 "" +2
	StrCpy "$fpage" $0

	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Show" "Debug"
	StrCmp $0 "" +2
	StrCpy "$debug" $0

	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "Show" "NOOK"
	StrCmp $0 "" +2
	StrCpy "$no_ok" $0
	
	ReadINIStr $0 "$EXEDIR\Data\settings.ini" "General" "Language"
	StrCmp $0 "" +2
	SetEnv::SetEnvVar "PortableApps.comLocaleID" "$0"
	
FunctionEnd


Function CheckProxySettings
	;Check for proxy settings in ini
	${Select} $Proxy_Adr 
	${Case} "" 
		;no proxy wanted
		StrCmp $debug "false" +2
		MessageBox MB_OK "no proxy"
		GoTo end_proxy
	${Case} "auto"
		;Check for Proxy in user registry
		;If proxy disabled don't use it
		${registry::Read} "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings" "ProxyEnable" $R0 $R1
		StrCmp $R0 "0" end_proxy
		;if Proxyserver empty don't use it
		${registry::Read} "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings" "ProxyServer" $R0 $R1
		StrCmp $R0 "" end_proxy
		${registry::Unload}
		;set proxy to registry proxy
		StrCpy $Proxy_Adr $R0	
	${EndSelect}

	;Check if ftp proxy environment is allready set
	ReadEnvStr $R0 "ftp_proxy"
	StrCmp $R0 "" set_ftp_proxy
	GoTo http_proxy

	;set ftp proxy environment
	set_ftp_proxy:
	SetEnv::SetEnvVar "ftp_proxy" $Proxy_Adr


	http_proxy:
	;Ckeck if ftp proxy environment is allready set
	ReadEnvStr $R0 "http_proxy"
	
	StrCmp $R0 "" set_http_proxy
	GoTo end_proxy
	;set http proxy environment
	set_http_proxy:
	SetEnv::SetEnvVar "http_proxy" $Proxy_Adr

	end_proxy:
	ReadEnvStr $R0 "http_proxy"
	StrCmp $debug "false" +2
	MessageBox MB_OK "function readproxy proxy:$R0"
FunctionEnd

Function read_update_ini_OFile
	StrCmp $debug "false" +2
	MessageBox MB_OK "function read_update_ini_OFile Language: $LANGUAGE"
	ReadINIStr $0 "$UFile" $OName "$LANGUAGE"
	${Select} "$0"
	${Case} ""
		;No langcode set, use US English
		ReadINIStr $0 "$UFile" $OName "file"
		StrCpy "$OFile" $0
		ReadINIStr $0 "$UFile" $OName "md5sum"
		StrCpy "$md5" $0
	${CaseElse}
		;use langcode from ini
		StrCpy "$OFile" $0
		ReadINIStr $0 "$UFile" $OName "md5sum$LANGUAGE"
		StrCpy "$md5" $0
	${EndSelect}
	
	
	StrCmp $debug "false" +2
	MessageBox MB_OK "function read_update_ini_OFile OFile: $OFile md5:$md5 Odescription:$ODescription"
FunctionEnd

Function OI_select
	BringToFront
	SetOutPath "$INSTDIR"
	call DirectoryLeave
	call read_update_ini_OName
	call read_update_ini_mirror
	call ORandom
	StrCpy $OMirror $Mirror 
	call ODownload
	
	# generate MD5sum of file
	StrCpy $0 "$INSTDIR\$OFile"
	md5dll::GetMD5File "$0"
	Pop $1
	${Select} $1
	${Case} "$md5"
		${Select} "$imod"
		${Case} "e"
			call OExtract
		${CaseElse}
			call OInstall
		${EndSelect}
		;n_ee:
		BringToFront
	${CaseElse}
		MessageBox MB_OK|MB_ICONEXCLAMATION "The MD5 checksums of $OFile do not match. Your download may have been corrupted. Package $INSTDIR\$OFile deleted."
		Delete "$INSTDIR\$OFile"
		
	${EndSelect}
FunctionEnd

; Section descriptions

; Section descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
;!insertmacro MUI_DESCRIPTION_TEXT ${SEC00} $var_0
!insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $var_1
!insertmacro MUI_DESCRIPTION_TEXT ${SEC02} $var_2
!insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $var_3
!insertmacro MUI_DESCRIPTION_TEXT ${SEC04} $var_4
!insertmacro MUI_DESCRIPTION_TEXT ${SEC05} $var_5
!insertmacro MUI_DESCRIPTION_TEXT ${SEC06} $var_6
!insertmacro MUI_DESCRIPTION_TEXT ${SEC07} $var_7
!insertmacro MUI_DESCRIPTION_TEXT ${SEC08} $var_8
!insertmacro MUI_DESCRIPTION_TEXT ${SEC09} $var_9
!insertmacro MUI_DESCRIPTION_TEXT ${SEC10} $var_10
!insertmacro MUI_DESCRIPTION_TEXT ${SEC11} $var_11
!insertmacro MUI_DESCRIPTION_TEXT ${SEC12} $var_12
!insertmacro MUI_DESCRIPTION_TEXT ${SEC13} $var_13
!insertmacro MUI_DESCRIPTION_TEXT ${SEC14} $var_14
!insertmacro MUI_DESCRIPTION_TEXT ${SEC15} $var_15
!insertmacro MUI_DESCRIPTION_TEXT ${SEC16} $var_16
!insertmacro MUI_DESCRIPTION_TEXT ${SEC17} $var_17
!insertmacro MUI_DESCRIPTION_TEXT ${SEC18} $var_18
!insertmacro MUI_DESCRIPTION_TEXT ${SEC19} $var_19
!insertmacro MUI_DESCRIPTION_TEXT ${SEC20} $var_20
!insertmacro MUI_DESCRIPTION_TEXT ${SEC21} $var_21
!insertmacro MUI_DESCRIPTION_TEXT ${SEC22} $var_22
!insertmacro MUI_DESCRIPTION_TEXT ${SEC23} $var_23
!insertmacro MUI_DESCRIPTION_TEXT ${SEC24} $var_24
!insertmacro MUI_DESCRIPTION_TEXT ${SEC25} $var_25
!insertmacro MUI_DESCRIPTION_TEXT ${SEC26} $var_26
!insertmacro MUI_DESCRIPTION_TEXT ${SEC27} $var_27
!insertmacro MUI_DESCRIPTION_TEXT ${SEC28} $var_28
!insertmacro MUI_DESCRIPTION_TEXT ${SEC29} $var_29
!insertmacro MUI_DESCRIPTION_TEXT ${SEC30} $var_30
!insertmacro MUI_DESCRIPTION_TEXT ${SEC31} $var_31
!insertmacro MUI_DESCRIPTION_TEXT ${SEC32} $var_32
!insertmacro MUI_DESCRIPTION_TEXT ${SEC33} $var_33
!insertmacro MUI_DESCRIPTION_TEXT ${SEC34} $var_34
!insertmacro MUI_DESCRIPTION_TEXT ${SEC35} $var_35
!insertmacro MUI_DESCRIPTION_TEXT ${SEC36} $var_36
!insertmacro MUI_DESCRIPTION_TEXT ${SEC37} $var_37
!insertmacro MUI_DESCRIPTION_TEXT ${SEC38} $var_38
!insertmacro MUI_DESCRIPTION_TEXT ${SEC39} $var_39
!insertmacro MUI_DESCRIPTION_TEXT ${SEC40} $var_40
!insertmacro MUI_DESCRIPTION_TEXT ${SEC41} $var_41
!insertmacro MUI_DESCRIPTION_TEXT ${SEC42} $var_42
!insertmacro MUI_DESCRIPTION_TEXT ${SEC43} $var_43
!insertmacro MUI_DESCRIPTION_TEXT ${SEC44} $var_44
!insertmacro MUI_DESCRIPTION_TEXT ${SEC45} $var_45
!insertmacro MUI_DESCRIPTION_TEXT ${SEC46} $var_46
!insertmacro MUI_DESCRIPTION_TEXT ${SEC47} $var_47
!insertmacro MUI_DESCRIPTION_TEXT ${SEC48} $var_48
!insertmacro MUI_DESCRIPTION_TEXT ${SEC49} $var_49
!insertmacro MUI_DESCRIPTION_TEXT ${SEC50} $var_50
!insertmacro MUI_FUNCTION_DESCRIPTION_END

"If you're not part of the solution, you're part of the precipitate."

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
Thank You!

I'm working on it.

At the moment I've got an "0x100018dd" / "0x00000004" error running the updater
(compiled without errord with NSIS 2.35 and all Plugins) Sad

Edit: Error occured when:
${NSD_CreateListBox} 0 0 100% 100% ""
is performed Sad
Any idea?

BTW: Listbox makes IMHO no sense if there is no way for multiselect all wanted options.

Marko

Paid for Software more or less?
What You need is OSS!

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 2 months ago
Joined: 2006-01-06 21:27
Hmm

I'll take a look at that later. It *should* be working Blum

Multiple selections will be enabled when I work out the right SendMessage code Blum

"If you're not part of the solution, you're part of the precipitate."

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
Great!

Take You all the time You need Smile I have to work (and to test two OOo RCs) too.
In the meantime I'll comment the code a little bit more, clean up and fix some minor issues. Untill we don't have the ftp server up for pa.com I'll host die ini on OOoDeV.org (next Alpha).

Regards

Paid for Software more or less?
What You need is OSS!

Stevoisiak
Stevoisiak's picture
Offline
Last seen: 5 years 4 months ago
Joined: 2008-02-05 11:22
Error

I tried to run the application on it's own, (Not on my flashdrive) and it says,

No actualization needed.

Simplifying daily life through technology

Zach Thibeau
Zach Thibeau's picture
Offline
Last seen: 2 years 2 months ago
Developer
Joined: 2006-05-26 12:08
Funny

Funny, I get the samething but it's installed on my flash drive, I've only successfully ran it once

your friendly neighbourhood moderator Zach Thibeau

Stevoisiak
Stevoisiak's picture
Offline
Last seen: 5 years 4 months ago
Joined: 2008-02-05 11:22
Actually

It would be the same for me, but if you run it from the Portable Apps Menu, it's ok. I'm talking about running it as a standalone. The flashdrive has nothing to do with it. Also, not all the apps are on the list, and I think I actually saw 2 gversions of the same app on the list.

Simplifying daily life through technology

MarkoMLM
MarkoMLM's picture
Offline
Last seen: 9 years 1 month ago
DeveloperTranslator
Joined: 2006-01-16 04:08
Wich version of the updater?

Alpha1 and Alpha2 works as standalone too (if You'll use it with the complete folder, not only the exe).

At the moment the message comes if alls Apps up to date or if the download of the updater.ini fails (why? version=emty is equal version=emty ... this will be fixed in the next alpha.

Wich App did You miss, wich are double?

Marko

Paid for Software more or less?
What You need is OSS!

Stevoisiak
Stevoisiak's picture
Offline
Last seen: 5 years 4 months ago
Joined: 2008-02-05 11:22
Wait a sec

It working again. Except, it doesn't work on a school PC. I'm trying to install it into a folder in my documents, (to directory \\fpm_server\hd\2013\2013svascellaro01\My Documents\Copy of Portable apps\setup) And it will not work. It says

Error: The instalation has 4 spaces.
Please select another directory.

Simplifying daily life through technology

sysadmn
Offline
Last seen: 7 years 11 months ago
Joined: 2007-12-13 11:17
Still broken?

I've gotten the "No Actualization Required" message with Alpha2 installed on USB and Hard drives. I have never seen any other dialog from the App.

After the first time, I RTFM, and fixed the ini to use "Auto" proxy. I still get that message.

My proxy requires authentication - does the App understand that? wget should.

At a minimum, could future versions provide better feedback on failures? I can't tell if it has connected and decided all apps are up to date, can't connect, or some other error.

PS - Great Idea, I've wanted this since John's first updates Smile

Stevoisiak
Stevoisiak's picture
Offline
Last seen: 5 years 4 months ago
Joined: 2008-02-05 11:22
Hmmmmm

So, you need to use a proxy? Why? Actually, it might be nice feature if regular web connection doesn't work, it will automatically try to detect a proxy. And if that STILL doesn't work, then it will ask you if you'd like to set proxy settings. Also, changing settings while using the application is always a good feature. And I think I get whats wrong with my updater. The space in "My Documents" is setting it off. I can fix this by manually replacing it with "My_Documents", but it would be nice if you didn't have to. Also, if the PC you use has websence, you may get an error for a blank download. Thats why I have to use this program at home

Simplifying daily life through technology

Pages

Topic locked