Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 24-04-2020, 17:12
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 1,074
Thanks: 1,814
Thanked 2,304 Times in 787 Posts
Cesar82 is on a distinguished road
Code:
[UninstallDelete]
#define i 0
#sub RemoveShortcut
  #emit "Type: Files; Name: ""{userdesktop}" + Trim(ReadIni(SourcePath + "\Settings.ini", "Executable" + Str(i), "ExeName", "")) + ".lnk"";"
  #emit "Type: Files; Name: ""{userprograms}" + Trim(ReadIni(SourcePath + "\Settings.ini", "Settings", "Name", "")) + "" + Trim(ReadIni(SourcePath + "\Settings.ini", "Executable" + Str(i), "ExeName", "")) + ".lnk"";"
#endsub
#for {i = 1; Trim(ReadIni(SourcePath + "\Settings.ini", "Executable" + Str(i), "ExeName", "")) != ""; i++} RemoveShortcut
I attached another example using ISPP and the icons section.
Using ISPP it is not possible to change the name of the shortcuts by changing any external ini after compiling the script
Attached Files
File Type: rar icons_ISPP.rar (745 Bytes, 4 views)
Reply With Quote
The Following User Says Thank You to Cesar82 For This Useful Post:
KaktoR (27-04-2020)
Sponsored Links
  #2  
Old 27-04-2020, 11:50
KaktoR's Avatar
KaktoR KaktoR is offline
Lame User
 
Join Date: Jan 2012
Location: From outer space
Posts: 4,689
Thanks: 1,106
Thanked 7,336 Times in 2,838 Posts
KaktoR is on a distinguished road
Thanks Cesar.

But there seems to be a problem with this ispp code.

I have this

Code:
[Executable1]
ShortcutName=Application
ExePath=bin\Application.exe
ExeParam=-Testparameter
Path is always "C:\bin" (I use {sd}\Games constant as default) and my test archive is like this: Archive.arc\bin\application.exe

The shortcut on desktop and startmenu is always C:\bin\application.exe.
I would like it read from INI: DefaultInstallDir={sd}\Games\{#Name}
__________________
Haters gonna hate
Reply With Quote
  #3  
Old 27-04-2020, 16:31
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 1,074
Thanks: 1,814
Thanked 2,304 Times in 787 Posts
Cesar82 is on a distinguished road
Quote:
Originally Posted by KaktoR View Post
Thanks Cesar.

But there seems to be a problem with this ispp code.

I have this

Code:
[Executable1]
ShortcutName=Application
ExePath=bin\Application.exe
ExeParam=-Testparameter
Path is always "C:\bin" (I use {sd}\Games constant as default) and my test archive is like this: Archive.arc\bin\application.exe

The shortcut on desktop and startmenu is always C:\bin\application.exe.
I would like it read from INI: DefaultInstallDir={sd}\Games\{#Name}
Try as in the attachment...
@KaktoR, I changed the attachment.
If you don't want to use tasks for the desktop shortcut, simply remove the [Tasks] section and also + "Tasks: desktopicon;" the shortcut line.
If you do not want to use a URL, simply do not include the lines referring to the URL shortcut.
Attached Files
File Type: 7z Shortcuts ISPP.7z (1.0 KB, 5 views)

Last edited by Cesar82; 28-04-2020 at 03:23.
Reply With Quote
The Following User Says Thank You to Cesar82 For This Useful Post:
KaktoR (28-04-2020)
  #4  
Old 28-04-2020, 05:26
KaktoR's Avatar
KaktoR KaktoR is offline
Lame User
 
Join Date: Jan 2012
Location: From outer space
Posts: 4,689
Thanks: 1,106
Thanked 7,336 Times in 2,838 Posts
KaktoR is on a distinguished road
Thanks, this works fine.

I just don't understand all of this ispp things... Will read about it some more.
__________________
Haters gonna hate
Reply With Quote
  #5  
Old 28-04-2020, 05:55
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 1,074
Thanks: 1,814
Thanked 2,304 Times in 787 Posts
Cesar82 is on a distinguished road
Quote:
Originally Posted by KaktoR View Post
Thanks, this works fine.

I just don't understand all of this ispp things... Will read about it some more.
The ISPP performs procedures (ISPP Procedures) before compiling the script by changing the script text.

In the example in the above file you are saving a preprocessed script.
This file is used to visualize how the preprocessed code will look.

If using ISPP it is not possible to use an external Settings.ini with settings for shortcuts.
Using ISPP the settings.ini settings are "copied" to script.iss when compiling and cannot be changed afterwards.
Reply With Quote
  #6  
Old 25-05-2020, 10:54
doofoo24 doofoo24 is offline
Registered User
 
Join Date: Nov 2016
Location: canada
Posts: 408
Thanks: 138
Thanked 474 Times in 227 Posts
doofoo24 is on a distinguished road
does the new inno 6.0.5 have Dark theme built-in ?
Reply With Quote
  #7  
Old 02-06-2020, 05:33
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,217
Thanks: 294
Thanked 1,405 Times in 637 Posts
Masquerade is on a distinguished road
Unknown Type: PChar

Hello all, I have been adding the module ITDownload to my installer script, so redist files can be downloaded instead of me having to bundle them into the installer.

I currently have everything integrated, here is an example:

Code:
procedure InstallRedists;
  begin
  itd_init;
  #ifdef directx
  itd_addfile('https://download.microsoft.com/download/1/7/1/1718CCC4-6315-4D8E-9543-8E28A4E18C4C/dxwebsetup.exe',expandconstant('{app}\_Redist\dxwebsetup.exe'));
  #endif

  itd_downloadafter(wpInstalling);

  #ifdef directx
  Exec2(ExpandConstant('{app}\_Redist\dxwebsetup.exe'),'',true);
  #endif 
end;
At the start of the script,
Code:
#define directx
exists so this code does apply.

I integrated into the script the iss file and module:

Code:
#include "Resources\Modules\itd\it_download.iss"
However now when compiling, this error appears:



Does anyone know what this error could mean? The error lies in the iss script for the ITDownlaod module and not in my installer script.

I am using Inno Setup Unicode 6.0.3
Reply With Quote
  #8  
Old 02-06-2020, 06:15
pincoball pincoball is offline
Registered User
 
Join Date: Mar 2020
Location: Italy
Posts: 29
Thanks: 20
Thanked 10 Times in 8 Posts
pincoball is on a distinguished road
Seems like the variable type PChar is not anymore compatible with Inno Setup 6.
https://jrsoftware.org/ishelp/index.php?topic=unicode

Quoting:
Quote:
Its 'PChar' type has been renamed to 'PAnsiChar'
and

Quote:
If you want to compile an existing script that imports ANSI Windows API calls with the Unicode compiler, either upgrade to the 'W' Unicode API call or change the parameters from 'String' or 'PChar' to 'AnsiString'. The 'AnsiString' approach will make your [Code] compatible with both the Unicode and the non Unicode version.
Try replacing in the mentioned script from PChar to either PAnsiChar or AnsiString
Reply With Quote
The Following User Says Thank You to pincoball For This Useful Post:
Masquerade (02-06-2020)
  #9  
Old 20-06-2020, 09:55
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 1,074
Thanks: 1,814
Thanked 2,304 Times in 787 Posts
Cesar82 is on a distinguished road
Hey guys.

Can someone help me with a problem.
I was wondering if you have a way to convert hexadecimal Cyrillic characters (string) to a string using only inno setup functions or just the windows API without including additional libraries.
Summing up: I would like to convert: C := Chr($05E2);

I attached a file with a function that uses this, but I can't get it to work without including an additional library (I don't want to use Libs)
If some of the more knowledgeable users can help me, thank you in advance.
Please look at the attached code.
Attached Files
File Type: rar ChrW.rar (46.6 KB, 5 views)
Reply With Quote
  #10  
Old 21-06-2020, 03:24
Razor12911's Avatar
Razor12911 Razor12911 is offline
Noob
 
Join Date: Jul 2012
Location: South Africa
Posts: 3,751
Thanks: 2,181
Thanked 11,211 Times in 2,309 Posts
Razor12911 is on a distinguished road
Quote:
Originally Posted by Cesar82 View Post
Hey guys.

Can someone help me with a problem.
I was wondering if you have a way to convert hexadecimal Cyrillic characters (string) to a string using only inno setup functions or just the windows API without including additional libraries.
Summing up: I would like to convert: C := Chr($05E2);

I attached a file with a function that uses this, but I can't get it to work without including an additional library (I don't want to use Libs)
If some of the more knowledgeable users can help me, thank you in advance.
Please look at the attached code.
$05E2 is not Cyrillic, it's Hebrew
Chr accepts byte value and returns ASCII value, $0532 is a Word value
You must use #$???? For UTF-8 format, example C := #$05E2

Last edited by Razor12911; 21-06-2020 at 03:28.
Reply With Quote
  #11  
Old 21-06-2020, 05:58
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 1,074
Thanks: 1,814
Thanked 2,304 Times in 787 Posts
Cesar82 is on a distinguished road
Quote:
Originally Posted by Razor12911 View Post
$05E2 is not Cyrillic, it's Hebrew
Chr accepts byte value and returns ASCII value, $0532 is a Word value
You must use #$???? For UTF-8 format, example C := #$05E2
Yes, I ended up putting the non-Cyrillic example, but it has the same meaning.
They are Word values.
I know that chr only supports Byte and these type of characters are word type.
But as in the script example, I need to convert a hexadecimal string read from the inno setup language file and convert it to a string (text).

Code:
S1 := '<0420><0443><0441><0441><043A><0438><0439>';
From this string above I need to return: "Русский"
I want to do this using only API or in the script itself if there is im way to do this without external DLL.
Please take a look at the script.
Reply With Quote
  #12  
Old 21-06-2020, 11:37
bunti_o4u's Avatar
bunti_o4u bunti_o4u is offline
Registered User
 
Join Date: Aug 2017
Location: India
Posts: 162
Thanks: 29
Thanked 172 Times in 61 Posts
bunti_o4u is on a distinguished road
Quote:
Originally Posted by Cesar82 View Post
Code:
S1 := '<0420><0443><0441><0441><043A><0438><0439>';
From this string above I need to return: "Русский"
I hope you want this...

BTW if you are on discord pl add me (discord id: buntionly4u#4466)
Code:
function InitializeSetup(): Boolean;
var
  S1, S2: String;
begin
  S1 := #$0420+#$0443+#$0441+#$0441+#$043A+#$0438+#$0439;
  MsgBox(S1, mbInformation, MB_OK);
end;
Attached Images
File Type: png Untitled.png (1.6 KB, 67 views)

Last edited by bunti_o4u; 21-06-2020 at 11:43.
Reply With Quote
  #13  
Old 21-06-2020, 12:51
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 1,074
Thanks: 1,814
Thanked 2,304 Times in 787 Posts
Cesar82 is on a distinguished road
Quote:
Originally Posted by bunti_o4u View Post
I hope you want this...

BTW if you are on discord pl add me (discord id: buntionly4u#4466)
Code:
function InitializeSetup(): Boolean;
var
  S1, S2: String;
begin
  S1 := #$0420+#$0443+#$0441+#$0441+#$043A+#$0438+#$0439;
  MsgBox(S1, mbInformation, MB_OK);
end;
Thanks for responding, but it's not that simple.
I get the string using the ISPP by calling the ReadIni function.
Check the Russian.isl language language of Inno Setup and try to read the key LanguageName= using GetIniString and try to transform it into text as in your message.
Download the ChrW script that you will understand.
Reply With Quote
  #14  
Old 22-06-2020, 05:27
KaktoR's Avatar
KaktoR KaktoR is offline
Lame User
 
Join Date: Jan 2012
Location: From outer space
Posts: 4,689
Thanks: 1,106
Thanked 7,336 Times in 2,838 Posts
KaktoR is on a distinguished road
Hey guys&girls

I'm looking for a char (preferably) or icon (max 14x14px) to display free/need space, which can be understand in any language (or at least most).

Anyone have ideas?

I already had looked through windows charmap but can't find anything usefull.
__________________
Haters gonna hate

Last edited by KaktoR; 22-06-2020 at 05:32.
Reply With Quote
  #15  
Old 22-06-2020, 12:15
bunti_o4u's Avatar
bunti_o4u bunti_o4u is offline
Registered User
 
Join Date: Aug 2017
Location: India
Posts: 162
Thanks: 29
Thanked 172 Times in 61 Posts
bunti_o4u is on a distinguished road
If we want to run any task during installation we can use below command which run the task or other program in a separate window:
Code:
function Exec(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer): Boolean;
I just want to know - can we add console within wizard page instead of separate windows to show console details to user.

If yes then pl tell how to do it..

Thanks in advance..
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup REV0 Conversion Tutorials 129 21-05-2021 05:51
INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup REV0 Conversion Tutorials 51 26-03-2015 06:57
Frequently Asked Questions Joe Forster/STA PC Games - Frequently Asked Questions 0 29-11-2005 09:48



All times are GMT -7. The time now is 15:34.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com