PDA

View Full Version : #pragma problem



NewsArchive
05-09-2012, 01:42 AM
Moin,
Following problem:

I have compiler variable:

#ifcompvar [_PROG_] Equals "Test1" then
#pragma IDEPLOY.CLI = "IDEPLOY1.CLI"
#end

#ifcompvar [_PROG_] Equals "Test2" then
#pragma IDEPLOY.CLI = "IDEPLOY2.CLI"
#end


When i compile the setup and use "Test1" is the IDEPLOY.CLI NOT
IDEPLOY1.CLI but IDEPLOY2.CLI

What´s wrong ?

Dirk Büchel

NewsArchive
05-09-2012, 03:24 AM
A "#pragma" is a very specific SetupBuilder compiler directive. It is
always executed and you can't use conditional statements to control (e.g.
exclude or include) its execution. The pragma is executed before the real
compilation process begins.

Friedrich

NewsArchive
05-09-2012, 03:24 AM
In theory (I haven't tested it), the following code can do what you want
(see attached screenshot).

BTW, I don't know why you have to change the IDEPLOY.CLI name. But please
note that you have to compile your own version of wupdate.exe / wucheck.exe
to support your new file name. You have to change all instances of
"IDEPLOY.CLI" in the wupdate.sb7 and wucheck.sb7 projects and then
distribute your customized clients. You can't use the standard clients!

Hope this helps.

Friedrich

NewsArchive
05-10-2012, 12:39 AM
thank you,

i have make following:
#ifcompvar [_PROG_] Equals "Test1" then
#set comiler variable [_ZAHLEXE_] ="1"
#end

#ifcompvar [_PROG_] Equals "Test2" then
#set comiler variable [_ZAHLEXE_] ="2"
#end

#pragma IDEPLOY.CLI = "IDEPLOY[_ZAHLEXE_].CLI"


i think it´s work :)

Dirk Büchel