Can ISPP macros call emit and expr?
I have code as follows:
#if oemid == "company1"
;Company 1
#define OEMName "Company 1"
#define OEMDir "..\Customisation\Company1\"
#Include "P:\Common\Setups\Japanese.iss"
#define bannerpath OEMDir+"Setup.bmp"
#elif oemid == "company2"
;Company 2
#define OEMName "Company 2"
#define OEMDir "..\Customisation\Company2\"
#define bannerpath OEMDir+"Setup.bmp"
#define OEMIcon "{app}\OEMIcon.ico"
#elif oemid == "Company 3"
;Company 3
#define OEMDir "..\Customisation\Company3\"
etc...
with each custom setup built with a stub ISS script that sets the id and includes the main ISS script.
I'm trying to convert this to a generic call which is implemented in the stub script:
#expr OEMInit1()
and:
#define OEMInit1() \
emit ";Company 1" \
define OEMDir "..\Customisation\Company1\" \
define bannerpath OEMDir+"Setup.bmp"
This is failing开发者_开发知识库 with:
[ISPP] Error at 3:23 in macro OEMInit1:
Undeclared identifier: "emit".
How do I convince ISPP that it's another directive instead of an identifier?
If I have completely the wrong end of the stick, fell free to hit me with it :)
Thanks
Thank to Gavin on the Inno newsgroup who pointed me to #sub
#sub OEMInit1
;company 1"
#define public OEMDir "..\Customisation\Company1\"
#define public bannerpath OEMDir+"Setup.bmp"
#endsub
Note the "public" so it can be access in the calling code.
精彩评论