FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup (https://fileforums.com/showthread.php?t=92407)

REV0 21-11-2011 06:51

INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup
 
Allright, i'm opening this thread because there are people who's asking 'how to ansi version of INNO' to prevent this question here's the tutorial for ya.

A) Unicode Version of INNO Setup

*The version which dominate conversions thanks to yener. The current DVD conversions use Unicode versions of INNO Setup mainly because of the language and foreign character support. Most of the threads have information about the version of INNO. If there's none, better ask in the thread.

1. Go to their page first:

Code:

http://www.jrsoftware.org/isdl.php#stable
2. Download 'isetup-5.5.2-unicode.exe'

3. Install the setup, during the setup, select the language, select the installation folder etc.

4. Installation will complete and you can use INNO Setup directly.

No matter what you'll do, you will use Unicode type of INNO now. TO be sure if it's Unicode or not check the bar:

http://img687.imageshack.us/img687/9312/capturelik.png

Side Notes:

If you get TGUID errors in compiling, this means you're not using Unicode version of INNO.

B) ANSI Version of INNO Setup

*Most of the old INNO Setup conversion uses ANSI version of INNO, if thread didnt say it and if it's old one, it's probably ANSI of INNO Setup.

1. Go to their page first:

Code:

http://www.jrsoftware.org/isdl.php#stable
2. Download the latest version of INNO:

http://img440.imageshack.us/img440/3242/capturecfjh.png

3. Install the setup, during the setup, select the language, select the installation folder etc.

During the install you will see optional install about a ISPP add-on. Install it also.

4. Installation will complete and you can use INNO Setup directly.

No matter what you'll do, you will use ANSI type of INNO now. TO be sure if it's ANSI or not check the bar:

http://img823.imageshack.us/img823/774/wdaw.png

If you see (a) this means it's ANSI version.

Conversion makers can use this info in their conversion threads to prevent ANSI related questions. (Don't copy whole thread just give the link of it)


CHANGELOG:

11.29.12 - Updated Unicode INNO's setup version in it's site.

pakrat2k2 21-11-2011 18:32

Nice job REV0, sure it will lessen alot of questions regarding which version to use, but only IF those who are posting the conversions, mention the fact you need ansi version of isso to properly run the script. We have users from countires that use the Unicode version so their language displays properly for them, but as long as the translation for their language is included, inno will switch to it automatically for them.

REV0 22-11-2011 04:38

english is not my native language however i'm using everything in english much proper and easy work to translate to my language. Well, this is personal choise anyway

pakrat2k2 22-11-2011 19:26

justa point that almost all the conversions posted here use the ANSI version of INNO, and IF you use unicode version it will pop-up errors during compiling of most scripts. The fact is that there are differences in the way things are written for each version, & what works in the ansi version will not work in the unicode version without the code being re-written.

seventhorama 10-12-2011 08:20

any tutorial in getting the registry data from dvd9 installer?

i want to put it (registry data in registry section) in my innosetup, so patcher/updater works fine with my installer (also save my serial key)

pakrat2k2 10-12-2011 20:59

use reg edit to get the entries for your game.. usually under HKLM ( HKEY_LOCAL_MACHINE.SOFTWARE.Gamename) etc ... for some reason my keyboard is not entering backslash, brackets... you get the idea.

seventhorama 11-12-2011 23:44

Quote:

Originally Posted by pakrat2k2 (Post 399772)
use reg edit to get the entries for your game.. usually under HKLM ( HKEY_LOCAL_MACHINE.SOFTWARE.Gamename) etc ... for some reason my keyboard is not entering backslash, brackets... you get the idea.

i've been working with the registry yesterday and still confuse with several things

1. when do we use unisdeletekey and unisdeletekeyifempty?
when i use unisdeletekeyifempty, somehow the registry wont show up (not installed in registry)

2. how do i insert hexadecimal value (binary) in inno? do i need to convert it first? because mine shows different registry in binary section than the original ones.

3. any solution to convert hexadecimal value (binary) easier? like value "0x00000013 (19)" in inno setup? (if i open in notepad, it shows "Language"=dword:00000013)

4. how to make checklist option, so i can choose what i want to install ?(for several games in one installer)

pakrat2k2 12-12-2011 18:18

#1) most of what your asking is in inno program itself, under help.
#2) you dont convert it.. its entered as valuedata binary {{13}} the 2 {{ are necessary, otherwise it gives oput error.
I'll have to look thru a few scripts to see how to enter it exactly, but that will get you started anyways.

#3 NOT needed as above.

#4 that is easier with cdmenucreator, grumpy is the one who'se posted those before look up a few of his topics.

seventhorama 16-12-2011 23:41

Quote:

Originally Posted by pakrat2k2 (Post 399813)
#1) most of what your asking is in inno program itself, under help.
#2) you dont convert it.. its entered as valuedata binary {{13}} the 2 {{ are necessary, otherwise it gives oput error.
I'll have to look thru a few scripts to see how to enter it exactly, but that will get you started anyways.

#3 NOT needed as above.

#4 that is easier with cdmenucreator, grumpy is the one who'se posted those before look up a few of his topics.

thx for the help pakrat :D

i want to ask again, how can i put a command in desktop icon, such as "-window" in target path? so the desktop icon, launch the game in windows mode

pakrat2k2 17-12-2011 10:47

in inno help under setup section [ICONS] read till you see parameters, its in 2 sections but you put the commands together, seperated by ; like below.

[icons]
Name: "{commondesktop}\My Program"; Parameters: "-window"

seventhorama 18-12-2011 21:43

Quote:

Originally Posted by pakrat2k2 (Post 399928)
in inno help under setup section [ICONS] read till you see parameters, its in 2 sections but you put the commands together, seperated by ; like below.

[icons]
Name: "{commondesktop}\My Program"; Parameters: "-window"

thx mate :D

seventhorama 30-12-2011 14:42

1. i have edit some script and try to make install, unsintall button in my autorun installer (and change install button to "play" button after instalation)

how can i make it? the only working button is install (play and uninstall doesnt seem to work)

2. can i add more than 2 sources in inno setup (for example the main installation folder and one in my document folder)?

3. can i make two instalation process in innosetup? 1 in the main folder and 1 again in my document (with my document in silent installation mode) without put the "other" process in run section?

pakrat2k2 30-12-2011 15:22

go look at the witcher 2 use that script as a starting point.

1. you just change the reg entries for your game in the autorun.iss script & game's.iss script. change for the games exe & whatever else you want. the pictures for the game go in the wizard_res folder.

2. again its in the help for inno, under {commondocs}.. that will lead to your my documents folder on your pc.

3. its not 2 install processes, one process that takes the information for the game + {commondocs} / my documents and archives them all into the setup.

seventhorama 30-12-2011 21:59

Quote:

Originally Posted by pakrat2k2 (Post 400074)
go look at the witcher 2 use that script as a starting point.

1. you just change the reg entries for your game in the autorun.iss script & game's.iss script. change for the games exe & whatever else you want. the pictures for the game go in the wizard_res folder.

2. again its in the help for inno, under {commondocs}.. that will lead to your my documents folder on your pc.

3. its not 2 install processes, one process that takes the information for the game + {commondocs} / my documents and archives them all into the setup.

now play and uninstall button shows after installation :D

but it still have some problem

when i click play button in autorun menu, it shows an error "The system cannot find the file specified: game.exe"

i have change the executable in the script, but it still shows this error msg

and when i click uninstall button, nothing happens
but when i click unins000.exe in the main installation folder, the uninstaller works well

any solutions?

pakrat2k2 30-12-2011 22:06

upload the script ( include ALL the files, for the script to run, NOT the game files ) here & i'll take a look thru it, & point out any errors for you to look at.

seventhorama 31-12-2011 21:00

1 Attachment(s)
there it is

pakrat2k2 31-12-2011 22:41

1 Attachment(s)
just a couple things need changing under the [setup] in main iss script

DefaultDirname={pf}..... change to {pf32}..... ( this is so that if using X64 windows it will install in the correct path NOT place it in program files ( like {pf} states. look in help under inno program )

also under [registry] section change the language valuedata en to {code:GetLngID} that way if someone installs in language other then english, the correct value gets written in the registry.

missed changing EXE under #ifdef AddToFireWallList in main iss section.

the autorun.iss also had quite a few changes as you had Install Folder, but game had no Install Folder Registry entry so those were changed to InstallPath ( like the entry in reg setion of main iss script)

The last couple things you need to do is change the images in the wizard_res folder to match your game, and change the autorun.inf in compiled folder(s) to match your game.

I've made the corrections as noted above and added a comment for what was changed ( starts with //, so you should easily spot them ) & reuploaded the corrected files ( ISS script files )

oh... HAPPY NEW YEAR !!!

seventhorama 01-01-2012 07:39

happy new year too :D

play button and uninstall button works now :D

thx mate

seventhorama 07-01-2012 23:57

can i make patcher using innosetup with silent parameter? so it install directly to game installation folder without configure patcher path first

i still havent found a way to do it

pakrat2k2 08-01-2012 08:20

just add the patch to source files, then in run section add the exe and any switches needed to have it run silently

seventhorama 14-01-2012 11:54

i have a problem

the patcher cant automatically detect the game installation folder

i put this in [Setup] section

[Setup]
AppName={#MyAppName}
AppVerName={#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={app}\
DefaultGroupName={#MyAppName}
InfoBeforeFile=ReadMe.txt
OutputDir=E:\Installer
OutputBaseFilename=setup
Compression=none
DiskSpanning=yes
SlicesPerDisk=3
DiskSliceSize=1400000000

when i run it, it shows this error

"internal error: an attempt was made to expand the "app" constant before it was initialized"

do i need something? like registry section or something?

about the patcher, i need it separated from original installer. this one is kind of old games that have 2 disk and needed disk 2 to do the patch, so i get some files in the game installation folder that changes and put them in some folder.

then i try to make this patcher automatically detects the game installation folder and move needed files to replace the old files. and i need it to run silently (without user need to browse game installation folder). is it possible? where do i put silent parameter for this installer?

pakrat2k2 14-01-2012 17:58

the defaultdirname must be set first. then after the [setup] section you use the {app}

try using the help in inno as everything youve asked is in there.

seventhorama 14-01-2012 22:41

1 Attachment(s)
need help to get this install dir thing works

peterf1999 19-01-2012 01:33

Quote:

Originally Posted by seventhorama (Post 400236)
need help to get this install dir thing works

[Files]
Source: D:\TS2_ISOS\The Sims 2 Exp1 University\Patchfiles\*; DestDir: {code:GetAppPath}; Flags: ignoreversion recursesubdirs
Code:

var installDir : string;

function InitializeSetup(): Boolean;

Begin
  // Checking running application
if FindWindowByWindowName('The Sims 2 University') <> 0 then
begin
      MsgBox('The Sims 2 University is running.'#10'Please close the application first.', mbInformation, MB_OK);
      exit;
end;
   
if not RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\EA GAMES\The Sims 2 University', 'Install Dir', installDir)
  then  MsgBox('The Sims 2 University is not installed on this computer..'#10'Cancelling Update.', mbInformation, MB_OK)
else Result := True

End;

function GetAppPath(Param: string): string;
begin
  Result := installDir;
end;


seventhorama 19-01-2012 15:55

Quote:

Originally Posted by peterf1999 (Post 400266)
[Files]
Source: D:\TS2_ISOS\The Sims 2 Exp1 University\Patchfiles\*; DestDir: {code:GetAppPath}; Flags: ignoreversion recursesubdirs
Code:

var installDir : string;

function InitializeSetup(): Boolean;

Begin
  // Checking running application
if FindWindowByWindowName('The Sims 2 University') <> 0 then
begin
      MsgBox('The Sims 2 University is running.'#10'Please close the application first.', mbInformation, MB_OK);
      exit;
end;
   
if not RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\EA GAMES\The Sims 2 University', 'Install Dir', installDir)
  then  MsgBox('The Sims 2 University is not installed on this computer..'#10'Cancelling Update.', mbInformation, MB_OK)
else Result := True

End;

function GetAppPath(Param: string): string;
begin
  Result := installDir;
end;


it works now :D

thx mate :D

HellRazor 08-04-2012 15:28

How can I make Inno install certain files at some other location?

Example: You have files in folder A that need to be installed like anything else,
C:\Program Files\A
But, in folder B, you have files that should go to System32 folder.

How can I set that up?

pakrat2k2 08-04-2012 21:52

while in inno script click on help > constants


but be very careful installing into system fodler as can make a user's system unbootable if writing files into system folder, that are not for that version of windows.

just generally not a good idea to force install those types of files ( usually dll's ), safer to run a main exe ( in run section ) that will install the proper files for that OS.

GlassER 05-05-2012 01:54

Quote:

Originally Posted by REV0 (Post 398974)
Allright, i'm opening this thread because there are people who's asking 'how to ansi version of INNO' to prevent this question here's the tutorial for ya.

1. Go to their page first:

Code:

http://www.jrsoftware.org/isdl.php#stable
2. Download 'isetup-5.4.2.exe' :

http://img440.imageshack.us/img440/3242/capturecfjh.png

3. Install the setup, during the setup, select the language, select the installation folder etc.

During the install you will see optional install about a ISPP add-on. Install it also.

4. Installation will complete and you can use INNO Setup directly.

No matter what you'll do, you will use ANSI type of INNO now. TO be sure if it's ANSI or not check the bar:

http://img823.imageshack.us/img823/774/wdaw.png

If you see (a) this means it's ANSI version.

Conversion makers can use this info in their conversion threads to prevent ANSI related questions. (Don't copy whole thread just give the link of it)

After reading this post to appear at my doubts.
I do not know what Inno Setup Compiler (with the letter (a) or (u) use to
properly ran your language in the installer.
I always thought that Unicode is correct because it has built-in ANSI, according to the author of Inno setup according to this information:
"Unicode Inno Setup
Beginning with Inno Setup 5.3.0, there are two versions of Inno Setup available: Non Unicode Inno Setup and Unicode Inno Setup.

Key features of Unicode Inno Setup are its ability to display any language on any system regardless of the system code page, and its ability to work with Unicode filenames. One could consider Unicode Inno Setup as the new standard Inno Setup and Non Unicode Inno Setup as an old special Inno Setup for those who still need to support NT/9x or who want the very smallest size possible.

If you don't remember which version you installed, click the "Inno Setup Compiler" shortcut created in the Start Menu. If the version number displayed in its title bar says "(a)" you are running Non Unicode Inno Setup. If it says "(u)" you are running Unicode Inno Setup.

For the most part the two versions are used identically, and any differences between them are noted throughout the help file. However, the following overview lists the primary differences:

•Unicode Inno Setup uses the existing ANSI .isl language files and you should not and may not convert these to Unicode or anything similar since it does so automatically during compilation using the LanguageCodePage setting of the language. However, you do need to convert existing [Messages] and [CustomMessages] entries in your .iss files to Unicode if the language used a special LanguageCodePage.
•The automatic conversion is also done for any language specific plain text ANSI LicenseFile, InfoBeforeFile, or InfoAfterFile used so you should not convert these either (but you may do so if you wish anyway, unlike ANSI .isl language files).
•The [Setup] directive ShowUndisplayableLanguages is ignored by Unicode Inno Setup.
•Unicode Inno Setup is compiled with Delphi 2009 instead of Delphi 2 and 3, leading to slightly larger files. The source code however is still compatible with Delphi 2 and 3, and a non Unicode version will remain available.
•Unicode Inno Setup and installers created by it require Windows 2000/XP or newer. The non Unicode version still works on NT/9x.
•Existing installations of your programs done by non Unicode installers can be freely updated by Unicode installers, and vice versa.
•Unicode Pascal Scripting notes:
◦The Unicode compiler sees type 'String' as a Unicode string, and 'Char' as a Unicode character. Its 'AnsiString' type hasn't changed and still is an ANSI string. Its 'PChar' type has been renamed to 'PAnsiChar'.
◦The Unicode compiler is more strict about correct ';' usage: it no longer accepts certain missing ';' characters.
◦The new RemObjects PascalScript version used by the Unicode compiler supports Unicode, but not for its input source. This means it does use Unicode string types as said, but any literal Unicode characters in the script will be converted to ANSI. This doesn't mean you can't display Unicode strings: you can for example instead use encoded Unicode characters to build Unicode strings (like S := #$0100 + #$0101 + 'Aa';), or load the string from a file using LoadStringsFromFile.
◦Some support functions had their prototype changed: some parameters of CreateOutputMsgMemoPage, RegQueryBinaryValue, RegWriteBinaryValue, OemToCharBuff, CharToOemBuff, LoadStringFromfile, SaveStringToFile, and GetMD5OfString are of type AnsiString now instead of String.
◦Added new SaveStringsToUTF8File, and GetMD5OfUnicodeString support functions.
◦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.
•Unicode Inno Setup supports UTF-8 encoded .iss files (but not UTF-16).
•Unicode Inno Setup supports UTF-8 and UTF-16LE encoded .txt files for LicenseFile, InfoBeforeFile, and InfoAfterFile.
Note: Unicode Inno Setup can only create Unicode installers and like wise the non Unicode version can only create non Unicode installers. If you want to be able to create both Unicode and non Unicode installers on one computer, you have to install both versions of Inno Setup into different folders."
http://www.jrsoftware.org/ishelp/ind...?topic=unicode


Please write what version you use, and dispel my doubts ...
Thank you!

REV0 05-05-2012 02:52

Depends the conversion.

a is ANSI and u is Unicode, and you have to use one of them according to conversion.

For example old yener setup bases (which i was using) needed ansi version of INNO setup, however after 1.8 version yener changed the codes and now you have to use Unicode version of INNO setup. Regardless you'll know which one you'll have to use, it'll be described in conversion thread.

GlassER 05-05-2012 03:36

@ REV0

For now, thank you for the information and best regards

REV0 05-08-2012 15:29

I updated thread and added info about Unicode too, too much TGUID errors *facepalm* lol

iMaTriXx 25-10-2012 09:20

need help
 
how can i add 2 and more _issi.isi files in inno plz suggest best way bcz whenever im trying to compile this script its give me an error duplicate identifier in INITIALIZED
:(

REV0 25-10-2012 09:32

Duplicate Identifier ? TGUID ?

iMaTriXx 25-10-2012 09:39

Quote:

Originally Posted by REV0 (Post 408843)
Duplicate Identifier ? TGUID ?

see
http://fileforums.com/attachment.php...1&d=1351181691

REV0 25-10-2012 10:14

Quote:

Originally Posted by iMaTriXx (Post 408845)

Where is the error part ?

iMaTriXx 25-10-2012 10:27

Quote:

Originally Posted by REV0 (Post 408848)
Where is the error part ?

id add this file in this script then im getting this error
#include:"c/issi/about.isi"
#include:"c/issi/music.isi"
when im #include only first cmnd its nt given any error but when i #include another script its give me an error & i cnt resolve this problem
thanks for quick reply....

iMaTriXx 26-10-2012 10:50

Quote:

Originally Posted by Valeron (Post 408867)
don't use issi combined with your script. It's errors. Rather ask professionals for the code section for looking for or to add to your script.

kkkk u mean i cant able to combined issi script with my script there is an alternate way to edit these options in inno bcz im nt professnal.& i d't know much abt delphi & pascal scripting so if u dont mind could u plz help me there bcz i badly want to integreate this options in my script so plz u may suggest how can we resolve these errors..

Cool_Cat 30-10-2012 08:37

IGameExplorer
 
Hi, i want to add a game to the Windows Game Explorer using the IGameExplorer function. The gdf.dll for the game i have here. How can i integrate that function into my inno-script? I hope someone here could help me, maybe with a short example-script. thanks.

iMaTriXx 07-11-2012 02:52

heyy gyus recently i'd make an script in inno it working perfect but when setup finish/failed its nt delete temp. (in ths folder contains images,visual themes,isdone.dll,etc) folder in c drive

buttignol 16-11-2012 04:54

Revo Can you help me with precomp command line to learn zl (zlib_Levels) I use

arc-ap1-r-w. \. \ Files \ Setup-1.bin-mprecomp: NFJ-t + lzma: a1: mfbt4 : d256m: FB128: MC1000: LC8 "Setup-1 \ *"

I read in forun to use precomp without any command you give me an example thanks google translator.


All times are GMT -7. The time now is 12:21.

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