![]() |
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] 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. |
It would be better to write a function to do this math and then use the code for the function in UninstallDisplaySize
|
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... |
Well you can use
Code:
UninstallDisplaySize={code:YourCodeName} |
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] 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 ] |
The UninstallDisplaySize section is limited to 2GB with Inno Setup 5.5.1
Code:
#define SizeInMB 2047 |
Quote:
|
well i get this error when i use it
https://i.postimg.cc/sX29JSWZ/Image-10.png 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] Code:
#define Size2 ReadIni(SourcePath + "\script.iss", "App", "Size2", "0") https://i.postimg.cc/MX2mZPGJ/Image-11.png 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 ??? |
Quote:
Quote:
|
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 ... |
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 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 |
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. |
Sorry that I did not use Inno setup anymore, you can do it like this:
Code:
#define GameSize "42803" ; Size of game in MB; |
Quote:
|
All times are GMT -7. The time now is 13:59. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.
Copyright 2000-2020, FileForums @ https://fileforums.com