Tommyknocker
03-15-2010, 08:29 AM
Hello,
I have a SetupBuilder project that contains some user defined compiler variables to decide which languages should be compiled into the Setup.exe:
_UD_COMPILE_ENGLISH
_UD_COMPILE_FRENCH
...
If one of those compiler variables is set to 1, the Setup.exe will contain the files for that language. By run time the user can select from a list box (filled dynamically due to the compiler variables for the languages).
Depending on the compiler variable I add files to my Setup.exe with the following code. This code handles the setup of the language files during runtime, too:
[Install Files]
! --- Common files ---
Install File "C:\MySetup\Common\*.* to "%_SB_INSTALLDIR%\*.*" (Always Install)
! --- English files ---
! --- check compiler variable to add files to Setup.exe ---
#ifcompvar [_UD_COMPILE_ENGLISH] Equals "1" Then
!--- check user selection during runtime to install the correct language files ---
If %_UD_SELECTED_LANGUAGE% Equals "English" Then
Install File "C:\MySetup\English\*.* to "%_SB_INSTALLDIR%\*.*" (Always Install)
End
#end
! --- French files ---
#ifcompvar [_UD_COMPILE_FRENCH] Equals "1" Then
If %_UD_SELECTED_LANGUAGE% Equals "French" Then
Install File "C:\MySetup\French\*.* to "%_SB_INSTALLDIR%\*.*" (Always Install)
End
#end
That means I only have one Setup.exe, containing all the files for all languages. New languages can be added easily. If some person does not need a language, I can cset the compiler variable for that language to 0 and re-compile the Setup.
Question 1:
Is my approach of creating the compiler variable depending Setup.exe correct?
Problem: When running the install, the required disk size is wrong!
I think the size of all files was accumulated:
Common files' size
+ English files' size
+ French files' size
Question 2:
How can I calculate the correct disk size in this case?
Thank you for your help.
I have a SetupBuilder project that contains some user defined compiler variables to decide which languages should be compiled into the Setup.exe:
_UD_COMPILE_ENGLISH
_UD_COMPILE_FRENCH
...
If one of those compiler variables is set to 1, the Setup.exe will contain the files for that language. By run time the user can select from a list box (filled dynamically due to the compiler variables for the languages).
Depending on the compiler variable I add files to my Setup.exe with the following code. This code handles the setup of the language files during runtime, too:
[Install Files]
! --- Common files ---
Install File "C:\MySetup\Common\*.* to "%_SB_INSTALLDIR%\*.*" (Always Install)
! --- English files ---
! --- check compiler variable to add files to Setup.exe ---
#ifcompvar [_UD_COMPILE_ENGLISH] Equals "1" Then
!--- check user selection during runtime to install the correct language files ---
If %_UD_SELECTED_LANGUAGE% Equals "English" Then
Install File "C:\MySetup\English\*.* to "%_SB_INSTALLDIR%\*.*" (Always Install)
End
#end
! --- French files ---
#ifcompvar [_UD_COMPILE_FRENCH] Equals "1" Then
If %_UD_SELECTED_LANGUAGE% Equals "French" Then
Install File "C:\MySetup\French\*.* to "%_SB_INSTALLDIR%\*.*" (Always Install)
End
#end
That means I only have one Setup.exe, containing all the files for all languages. New languages can be added easily. If some person does not need a language, I can cset the compiler variable for that language to 0 and re-compile the Setup.
Question 1:
Is my approach of creating the compiler variable depending Setup.exe correct?
Problem: When running the install, the required disk size is wrong!
I think the size of all files was accumulated:
Common files' size
+ English files' size
+ French files' size
Question 2:
How can I calculate the correct disk size in this case?
Thank you for your help.