pascalscript

Basic email validation within Inno Setup script

寵の児 提交于 2019-12-06 11:38:18
I'm wanting to do a basic string validation within an Inno Setup script to be relatively certain the string is an email address. I just want to see that there is a '@' character followed by a '.' character and that there is at least one character on either side of these. Something similar to this regular expression: [^@]+@.+\.[^\.] The lack of regular expressions and limited string functions available in object pascal are causing me grief. It would be simple enough to reverse the string, find the first '.' and '@' and then do some comparisons, but there's no Reverse(string) function available.

Inno Setup FileExists unable to find existing file

橙三吉。 提交于 2019-12-06 10:32:50
In my script I am checking whether a directory and two files in this directory exist. While the first returns the correct value, the second check does not. I've checked it multiple times that these files exist in the designated directory but Inno Setup will always tell me that they do not exist. This is happening on a virtual Windows Server, and can't be reproduced on my local machine. There it always returns the correct Value. UpdatePath := ExpandConstant('{app}'); if DirExists(UpdatePath) then begin ExePath := UpdatePath+'\Application.exe'; ConfigFilePath := UpdatePath+'\Application.exe

Is PascalScript compatible with Delphi XE5 to create Android/iOS/Windows applications?

不打扰是莪最后的温柔 提交于 2019-12-06 07:42:14
I want to create an application that will draw simple forms based on JSON data. I need to have a script to put intelligence on that. Is Pascal Script from RemObjects a solution for that? Is is compatible to generate application with the same source code for Android, iOS and Windows? EDIT: Extending to better understand the need: I have a delphi program that draws a form (pretty much like a dfm file, as a descriptor) and fill it with data from a database. However there is a need for inteligence to validate the data entered. Since the form and data and the validation rules are done by the user

Check for existence of a shortcut pointing to a specific target in Inno Setup

左心房为你撑大大i 提交于 2019-12-06 07:32:06
In my Inno Setup installer I need to make sure a shortcut to a certain file is present in a folder. The name of the shortcut is arbitrary and not under my control. I only know which file it needs to point to. If the shortcut is missing, I need to generate the shortcut. If it is already present, it must not be created again. I guess that it is somehow possible to iterate through all shortcut files in the relevant folder and check which file they point to. In a comment to an answer to Shared Shortcuts/Icons , a IShellLink interface is mentioned, but I don’t know how to make it available in the

How to disable Next button if no component is selected in Inno Setup?

笑着哭i 提交于 2019-12-06 06:06:37
I have three components and if the user select any component it will do installations. Now I want to disable the Next button if the user don't select any components. I am trying if not IsComponentSelected('xxx') , but it is not working. Can anyone please help me?? Martin Prikryl There's no easy way to update the Next button state on component selection change. A way easier is to display a message when the Next button is clicked: function NextButtonClick(CurPageID: Integer): Boolean; begin Result := True; if CurPageID = wpSelectComponents then begin if WizardSelectedComponents(False) = '' then

Validate data on custom page when Next button is clicked in Inno Setup

与世无争的帅哥 提交于 2019-12-06 05:21:15
I have managed to get a basic script working to display a wizard (using CreateInputFilePage ) for a user to identify a file location that I use to update some settings in an XML file. However, I would like to perform some basic checking of the input to the file selected rather than simply accepting whatever the user provides. For example displaying a message box if the user attempts to press **Next"* when the content is invalid. I am not entirely sure how to handle events arising from the wizard and how to apply any kind of validation rules to the data before proceeding to the next task.

Inno Setup: How to handle progress bar on [UninstallDelete] section?

时光怂恿深爱的人放手 提交于 2019-12-06 04:12:26
I use Inno Setup to make installer for my app. When user uninstall the app I want to delete my custom folder in Program Data folder, my folder is large (about 15 GB) so I use [UninstallDelete] section to delete this folder: [UninstallDelete] Type: filesandordirs; Name: "{commonappdata}\testFolder" But when the Inno Setup gets to the [UninstallDelete] section, the progress bar is show at 20% and stop in this position for a long time, then it "jumpy" to 100%. So how to make progress bar increase steadily when uninstall the app? Thanks! I do not think it's really possible. There's no way to

Can you define a function prototype in Inno Setup

为君一笑 提交于 2019-12-06 00:40:56
I would like to be able to structure my code for my Inno Setup project but I am forced to move code around because you can't call a function unless it is defined first. Is there a way to declare a prototype at the top so that I don't get the "Unknown identifier" error and so that I can structure my code in logical blocks. In Pascal (including a Pascal Script used in Inno Setup), you can define a function prototype (aka forward declaration) using a forward keyword: procedure ProcA(ParamA: Integer); forward; procedure ProcB; begin ProcA(1); end; procedure ProcA(ParamA: Integer); begin { some

Multi-line edit in Inno Setup on page created by CreateInputQueryPage

六月ゝ 毕业季﹏ 提交于 2019-12-05 22:54:49
By default, when you add a TEdit to a page in Inno Setup, the height is one line. How do I increase the height of the edit? Here is the relevant part of the ISS file ContractConfigPage := CreateInputQueryPage(ServerConfigPage.ID, 'Map contract as JSON', 'Please enter the map contract to use in JSON format', ''); ContractConfigPage.Add('JSON', False); ContractConfigPage.Edits[0].Height := 100; { does not have any effect } Edit: I am now able to have a bigger edit but I can not have multiple lines ContractConfigPage := CreateInputQueryPage(ServerConfigPage.ID, 'Map contract as JSON', 'Please

How to include single quotes in Inno Setup while passing to function?

◇◆丶佛笑我妖孽 提交于 2019-12-05 22:51:31
I have used string in a function as follow. I'm passing a string to a particular function, if that string has single quotes inside middle it's breaking. How to include single quotes in Inno Setup Pascal scripting? TempReadValue(StrArray, 'log4j.appender.testing.File=INSERT INTO emp select Eid,'%K','%L'from DistributionTable whereEname = 'Nails:chino'', LogFileName); When passing to function its taking till %K , after that its breaking. Can anybody guide me how to read/pass entire string till Nils:chino ? Thanks for your help. Try this one: TempReadValue(StrArray, 'log4j.appender.testing.File