pascalscript

InnoSetup: Getting AppName in [Code] section

你说的曾经没有我的故事 提交于 2019-11-28 22:42:59
问题 I'm creating an installer using InnoSetup, and writing some custom handlers in a [Code] section. In one of the handlers, I would like to be able to retrieve the value of the AppName (or, potentially, the value of other parameters) defined in the [Setup] section. Is there a way for me to do this? I've looked though the documentation, but I haven't found anything that would allow me to do this. Our InnoSetup files are actually generated by our build process, which stitches together fragments

Inno Setup - How to localize a string in Pascal Script?

不想你离开。 提交于 2019-11-28 11:47:00
How to change the 'Next' with a language? It is possible? procedure CurPageChanged(CurPageID: Integer); begin if CurPageID = iscustompage1.id then starttimer(WizardForm.Handle,WizardForm.NEXTBUTTON.Handle,'Next',5) else if (CurPageID = wpWelcome) or (CurPageID = wpSelectDir) then begin stoptimer(); end; end; To localize a string for Pascal Script, define a custom message in the language file: [CustomMessages] NextButtonCaption=Next And then use this custom message using the CustomMessage function function in your code: starttimer( WizardForm.Handle, WizardForm.NEXTBUTTON.Handle, CustomMessage(

Replace a text in a file with Inno Setup

久未见 提交于 2019-11-28 07:51:17
Hi I have a problem with replacing a text in a textfile with Inno Setup (Delphi based). My Code: procedure FileReplaceString(const FileName, searchstring, replacestring: string); var fs: TFileStream; S: string; begin fs := TFileStream.Create(FileName, fmOpenread or fmShareDenyNone); try SetLength(S, fs.Size); fs.ReadBuffer(S[1], fs.Size); finally fs.Free; end; { the compiler stops here with: unknown identifier 'StringReplace' } S := StringReplace(S, SearchString, replaceString, [rfReplaceAll, rfIgnoreCase]); fs := TFileStream.Create(FileName, fmCreate); try fs.WriteBuffer(S[1], Length(S));

Are there any good Pascal Script resources/documentation? [closed]

眉间皱痕 提交于 2019-11-28 06:52:31
问题 I started playing around with Pascal Script today and I cannot find any good documentation. I found these (one, two) articles. The are helpful but they are just examples. edit : Separated this into two questions. New question is here. 回答1: I don't know if this will help but last week, I started working with FastScript. The first kinds of errors I ran into were the same as what you are seeing. After studying the slightly helpful documentation and the much more helpful code, I saw that I needed

Implementing event functions InitializeWizard while using ISSI (to add background image) in Inno Setup: Duplicate identifier 'INITIALIZEWIZARD'

谁说我不能喝 提交于 2019-11-28 06:29:42
问题 I'm trying to put a background image to Inno Setup installer using ISSI along with a song using the "BASS audio library", but I can only keep one of them active since I get this compiler error: Duplicate identifier 'INITIALIZEWIZARD' Would I have another way to get a full-screen background image so I can use the BASS audio library? Inno Setup code: ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define ISSI

Inno Setup: Iterate through array of type Variant (from OleObject)

*爱你&永不变心* 提交于 2019-11-28 06:25:34
问题 I'm trying to read and write to the IIS 6 metabase using Inno Setup. I can't figure out how to access arrays though. IIS := CreateOleObject('IISNamespace'); Compr := IIS.GetObject('IIsCompressionScheme', 'localhost/W3SVC/Filters/Compression/deflate'); Arr := Compr.HcScriptFileExtensions; { ... [code to iterate and add items] here ... } Compr.SetInfo(); The metabase editor calls the object type I'm trying to access a "multi-string". VarType(Arr) yields 0x200C as type (see http://www.jrsoftware

Inno Setup LoadStringFromFile fails when file is open in another process

点点圈 提交于 2019-11-28 06:06:20
问题 To check to see when a database (SQL Anywhere) is fired up and ready to receive requests I am outputting the database message window to a log (text) file and then attempting to read this using LoadStringFromFile , which I then search for specific text using Pos . The problem is that this fails (I assume) as the file is in use. Exec(strInstallPath + '\Bin32\dbeng17.exe', '-n ' + strEngineName + ' "' + strInstallPath + '\Database\Olympus.db" -n ' + strDatabaseName + ' -gdall -xtcpip -ti0 -c25p

How do I return a string from DLL to Inno Setup Pascal Script

泄露秘密 提交于 2019-11-28 05:57:40
问题 I have two C functions in a DLL which are defined in the definition file and are exported for using in Inno Setup. char* __stdcall GetName() { return "Kishore"; } void __stdcall getName(char* strName) { strcpy(strName, "Kishore"); } The Inno Setup code will load the custom DLL and call the function/procedure to return the names { Inno Setup script } [Code] procedure getName(MacAddress: String); external 'getName@files:MyDll.dll stdcall setuponly'; function GetName():PAnsiChar; external

“colon (':') expected” compiler error on character range in case statement in Inno Setup Pascal script

。_饼干妹妹 提交于 2019-11-28 05:53:53
问题 I'm getting a "colon (:) expected" syntax error on this code (Line 14; Column 10) and I'm at a loss. This code runs in Inno Setup compiler, it is Delphi-like, but I don't think it is full Delphi. The Inno Setup version is 5.5.9 (a), so Ansi version. procedure HexToBin(const Hex: string; Stream: TStream); var B: Byte; C: Char; Idx, Len: Integer; begin Len := Length(Hex); If Len = 0 then Exit; If (Len mod 2) <> 0 then RaiseException('bad hex length'); Idx := 1; repeat C := Hex[Idx]; case C of

How to build a Treeview design (a task group with tasks nesting hierarchy) using Inno Setup?

安稳与你 提交于 2019-11-28 02:20:27
问题 I'm trying to build a Treeview hierarchy of checkable elements and labels that must be more or less like this: Standalone Controls (label, root) |__Check/Uncheck all controls of all groups (checkbox) | | | |__Controls group 1 (group description label) | | |__Check/Uncheck all these controls (checkbox) | | |__Control name 1 (task) | | |__Control name 2 (task) | | |__Control name 3 (task) | | | |__Controls group 2 (group description label) | | |__Check/Uncheck all these controls (checkbox) | |