PDA

View Full Version : _ISCRIPT_VER in IS dev 7.04



graven
07-24-2002, 05:59 AM
The preprocessor constant _ISCRIPT_VER was defined in InstallShield Professional 6.x as 0x600 and was undefined and evaluated as zero in InstallShield Professional 5.x. In InstallShield Developer, _ISCRIPT_VER is defined as 0xVVM, where VV is the major version of the product and M is the maintenance pack release number. For example, 0x701 evaluates as InstallShield Developer version 7.0 and maintenance pack number 1.

well, i'm using IS dev 7.04 and the following code inside a basic MSI project reports i was using IS 6.x:


#if _ISCRIPT_VER >= 0x700
// #warning **OK** Developer 7.x or above detected
#elif _ISCRIPT_VER >= 0x600
// IS 6.x compiler:
#warning **CAUTION** You are currently using IS 6.x ... Use 7.x instead!
#else
// IS5.x and below:
#error **ERROR** You are currently using IS 5.x ... Use 7.x instead!
#endif


when compiling the script the output starts up with "InstallShield (R) Script Compiler Version 7.3.0.131".

in the official IS shipped files i found only two references, so far:

1.) compiler.dll:

file version: 7.3.0.131
product version: 7.03
binary contains something like "0x600 _ISCRIPT_VER" around offset 05E1F4


2.) iswi.h (which is #included, frequently and as default) contains:
#undef _ISCRIPT_VER
#define _ISCRIPT_VER 0x702

so, when compiling the script the compiler seems to use the superseded 0x600 version information out of the "compiler.dll"??

but during runtime the following code will report "0x702" which seems to originate from the "iswi.h" file!


SprintfBox (INFORMATION, "VER", "#lx %#lx", _ISCRIPT_VER);


the whole issue seems to be quite prone to error because of the multiply defined / overridden definitions of the constant.

could someone please tell me:
a) are my assumptions right?
b) where to get a reliable version info?

cheers, graven (IS dev 7.04)

graven
07-24-2002, 07:22 AM
ok, i temporarily commented out the #undef - #define section inside "iswi.h".
during runtime i get version "0x600" now, as well.
this seems to be a proof that the value inside the dll is superannuated, indeed.


as a hotfix i did:

a) comment out the stuff in "iswi.h". what the heck is this for, anyway?

additionally:

b) hex edit "compile.dll" to replace "0x600" with "0x704"

now the correct version 7.04 is displayed both, during compilation and runtime.

but this is just a quick and dirty workaround. are there any official statements?

cheers, graven (IS dev 7.04)


PS: there's another interesting thread covering bugs regarding #if and #elif preprocessor directives: http://community.installshield.com/showthread.php?s=&threadid=99608

graven
11-25-2002, 05:54 AM
somehow my build system is setting the following property:
ISSCRIPT_ENGINE_VERSION = 7.7.0.262

my setups fail.

i'll sum up the references i found:

1.) compiler.dll:
file version: 7.3.0.131
product version: 7.03
binary contains something like "0x600 _ISCRIPT_VER" around offset 05E1F4

2.) iswi.h (which is #included, frequently and as default) contains:
#undef _ISCRIPT_VER
#define _ISCRIPT_VER 0x702

3.) "Property" table (in direct editor): ISSCRIPT_ENGINE_VERSION=***Set by build***


until recently the ISSCRIPT_ENGINE_VERSION was set to 7.6.0.262 - as i could see in the log files. everything worked fine, back then.
recently, it is set to 7.7.0.262 and setups fail.

so where do all those different version numbers originate from?


graven