PDA

View Full Version : Release question and



NewsArchive
08-23-2007, 11:49 PM
I am now to the point of adding compiler if statements and using the Release
area .... Please excuse me because I'm a little spooked as this all seems
way to easy...

Anyway, I created a compiler variable in the compiler variable area ... then
I set it in the release area and am using the compiler IF statement and it
seems to be working great.

But my question is this... I added a compiler variable in the release area
and it doesn't show up in the main compiler variable area.... does that mean
I have to declare it in the main compiler area as well? Or are these a
separate set of variables? My variable I defined in the release area does
not show up on the lookup when you are creating a compiler if statement.

It would be nice to have a lookup to the compiler variables from the release
properties screen.

Also, I hate to be a stickler here but I'm sure you want to know about it
..... in the release properties screen... the tab should say General not
gereral. I found another small typo but forgot where it was.

Thanks,


--
Ray Rippey
VMT Software - http://www.vmtsoft.com

NewsArchive
08-27-2007, 02:37 AM
Ray,

> I am now to the point of adding compiler if statements and using the
> Release area .... Please excuse me because I'm a little spooked as this
> all seems way to easy...
>
> Anyway, I created a compiler variable in the compiler variable area ...
> then I set it in the release area and am using the compiler IF statement
> and it seems to be working great.
>
> But my question is this... I added a compiler variable in the release area
> and it doesn't show up in the main compiler variable area.... does that
> mean I have to declare it in the main compiler area as well? Or are these
> a separate set of variables? My variable I defined in the release area
> does not show up on the lookup when you are creating a compiler if
> statement.
>
> It would be nice to have a lookup to the compiler variables from the
> release properties screen.

You can create a new compiler variable in the Releases Properties, but it is
suboptimal and *not* recommended. If you try to compile a Release that does
not have access to a specific compiler variable, the compile will fail
("unknown compiler variable"). The idea behind compiler variables in the
Release feature is that you can assign different values to a compiler
variable (based on the selected Release).

For example, you have defined a "Trial with Help" and a "Trial without Help"
Release. You define a "global" [INCLUDE_HELP] compiler variable, by default
set to 0. The "Trial with Help" Release sets a [INCLUDE_HELP] compiler
variable to 1.

In your Script you can have:

#ifcompvar [INCLUDE_HELP] Equals "1" Then
! Include Help File here
#end

If you define [INCLUDE_HELP] only as a "local" compiler variable in the
"Trial with Help" Release and you compile the "Trial without Help" Release,
the compile will fail.

I would suggest to always create a new compiler variable in the "global"
Compiler Variables Visualizer.

Does this help?

> Also, I hate to be a stickler here but I'm sure you want to know about it
> ..... in the release properties screen... the tab should say General not
> gereral. I found another small typo but forgot where it was.

Oops! Fixed, thank you.

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.5
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
08-27-2007, 02:38 AM
Friedrich, is this the only way for the script to detect which Release you are
compiling? This is what I do because I couldn't find anything like #if Release
script function.

Peter Gysegem
Beaver Creek Software

NewsArchive
08-27-2007, 02:39 AM
Peter,

To detect the Release, just use (as an example):

#ifcompvar [SB_RELEASEID] Equals "New Release 1" Then
yadayada

Does this help?

Friedrich

NewsArchive
08-27-2007, 02:39 AM
Thanks Friedrich,

Yes that helps. I guess I didn't know about [SB_RELEASEID]. I just checked
the case where If I defined a Release called Demo. When not compiling the Demo
release, [SB_RELEASEID] is blank. I guess this means that it is best to define
a "standard" release even if you don't change anything about it.

Peter Gysegem
Beaver Creek Software

NewsArchive
08-27-2007, 02:40 AM
Using the information you gave me, I just added a "Standard" release. When I
tried to check for a blank [SB_RELEASEID] using #ifcompvar, it wouldn't let me
leave the value blank. I wanted to make sure that a specific release was
selected otherwise stop the compile with a message. Alas, no-go. I suspect
this is a bug with #ifcompvar. It also happens with #ifconst and #ifdef.

Peter Gysegem
Beaver Creek Software

NewsArchive
08-27-2007, 02:41 AM
Hi Peter,

> Using the information you gave me, I just added a "Standard" release.
> When I tried to check for a blank [SB_RELEASEID] using #ifcompvar, it
> wouldn't let me leave the value blank. I wanted to make sure that a
> specific release was selected otherwise stop the compile with a
> message. Alas, no-go. I suspect this is a bug with #ifcompvar. It
> also happens with #ifconst and #ifdef.

No, it's not a bug ;-)

Try the following:

#ifcompvar [SB_RELEASEID] Length Equal To "0" Then
#msg "This is a "default" compile"
#else
#msg "This is a "release" compile"
#end

BTW, there is no need to add a "standard" release. If you compile the
project (without selecting a Release) this is the default "release".

Hope this helps!

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.5
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
08-28-2007, 01:45 AM
That does it, thanks Friedrich.

Peter Gysegem
Beaver Creek Software

NewsArchive
08-28-2007, 01:46 AM
Understood... create a compiler variable in the global area and just set it
in the release area... will do... that's kind of what I figured.

Thanks,

Ray