how is the safest way to discovery (inside of a project script) IS version used to build another setup.
Now I check setup.ins/setup.inx presence:
...browsing filesystem (CDROM, Hard disk, ...)
svSetupDir = setup directory
Code Sample |
svSetupPath = svSetupDir ^ "setup.inx"; if (Is(FILE_EXISTS, svSetupPath)) then // IS6.x setup bisIS6x = TRUE; bisIS55 = FALSE; #ifdef DEBUG_LEVEL_1 SprintfBox(INFORMATION, "Setup type", "We have detected a IS6.x setup"); #endif else svSetupPath = svSetupDir ^ "setup.ins"; if (Is(FILE_EXISTS, svSetupPath)) then // IS5.5 setup bisIS6x = FALSE; bisIS55 = TRUE; #ifdef DEBUG_LEVEL_1 SprintfBox(INFORMATION, "Setup type", "We have detected a IS5.5 setup"); #endif else // Unable to detect IS setup version bResult = FALSE; #ifdef DEBUG_LEVEL_1 SprintfBox(INFORMATION, "Setup type", "Unable to detect IS setup version"); #endif endif; endif; |
Is this a good way?
Are there others?
Thanks.
Ciao, Giuseppe