#1
|
|||
|
|||
i got a question about variables in inno
hello, i've got a question i'm using the WPI script, but i wanted to add in the
Code:
[Setup] UninstallDisplaySize={#Size2} so can't i just make a variable to calculate it automatically ? i got already a variable called Size that got the file size in MB, so i can't use it like Code:
define Size2 "{#Size}*1024*1024" thanks a lot. |
Sponsored Links |
#2
|
||||
|
||||
It would be better to write a function to do this math and then use the code for the function in UninstallDisplaySize
__________________
Haters gonna hate
|
#3
|
|||
|
|||
well u mean i define first a variable as longint, then do the calculations ?
but if that's how to goes how i can use it in the [Setup] section ? since that section is written before the [Code] section... |
#4
|
||||
|
||||
Well you can use
Code:
UninstallDisplaySize={code:YourCodeName}
__________________
Haters gonna hate
|
#5
|
|||
|
|||
well i don't think that i can really do it since i'm not that experienced in codes stuff, can't you tell me how to do it ?
Code:
[Setup] UninstallDisplaySize={code:Size2} {Code} var Size2: Longint; function UninstallSize Size2={#Size}*1024*1024; end; PS in the code section i wrote it as {Code} cuz it will end the CODE box in the site... i know that it should be [ Code ] Last edited by ahmedwaill; 22-02-2019 at 05:49. |
#6
|
||||
|
||||
The UninstallDisplaySize section is limited to 2GB with Inno Setup 5.5.1
Code:
#define SizeInMB 2047 [Setup] UninstallDisplaySize={#SizeInMB * 1024 * 1024}
__________________
Practice makes perfect. |
#7
|
|||
|
|||
alright , thanks a lot man
|
#8
|
|||
|
|||
well i get this error when i use it
EDIT: well it's cuz of the size i made for it 2048, but idk why it's maximum 2GB , and i managed to do it 5.6GB in the FMX Project by Razor , but when i made in the script.iss Code:
[App] Size2=6100234885 Code:
#define Size2 ReadIni(SourcePath + "\script.iss", "App", "Size2", "0") [Setup] UninstallDisplaySize={#Size2} Last Edit: well the issue is when it's passed to the Uninstall Display Size it goes as STR and it should be LONGINT, so what's the Convert to LONGINT Tag for Define tag ??? Last edited by ahmedwaill; 22-02-2019 at 05:26. |
#9
|
||||
|
||||
Quote:
Quote:
__________________
Practice makes perfect. |
#10
|
|||
|
|||
5.5.1 Enhanced Edition build 121002
i managed to make it write the value i want but i have to calculate it myself so i write the exact value in bytes so it's not about having the maximum size 2GB, you can write whatever you want ... but the values can't be auto calculated i guess for some reason, and i guess that it needs to be type Longint, not only Int ... |
#11
|
||||
|
||||
Quote:
2. The safest way is to create a small program or dll that writes the size of the game in the registry at the end. Like this: Code:
if bAllOK then SetGameSizeInRegisrty('5420m'); HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Uninstall \ GAMENAME_is1 Note: The size is stored in a DWORD value (32BITS), but it is expressed in KB, so we can store values up to 3.99TB
__________________
Practice makes perfect. |
The Following User Says Thank You to JRD! For This Useful Post: | ||
ahmedwaill (24-02-2019) |
#12
|
|||
|
|||
well i got it to work with this way
Code:
UninstallDisplaySize= 2147483648 Code:
ExtraDiskSpaceRequired= 2147483648 thanks bro for your time and effort in trying to help me .. as i said the issue is in the calculations itself. |
#13
|
||||
|
||||
Sorry that I did not use Inno setup anymore, you can do it like this:
Code:
#define GameSize "42803" ; Size of game in MB; [Setup] UninstallDisplaySize="{#GameSize}000000"
__________________
Practice makes perfect. |
#14
|
|||
|
|||
wow interesting one, alright mate will try it once am free cuz am kinda busy today. thanks mate<3
|
Thread Tools | |
Display Modes | |
|
|
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 |
Useful Dll for Inno Setup users | peterf1999 | Conversion Tutorials | 88 | 01-12-2017 16:00 |
Create Dll C++ in VS 2015 compatible with Inno Setup | MCI | Conversion Tutorials | 14 | 08-09-2017 09:07 |
INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup | REV0 | Conversion Tutorials | 51 | 26-03-2015 06:57 |
One question with Inno Setup? | quake4 | PC Games - CD/DVD Conversions | 3 | 22-08-2012 04:30 |