PDA

View Full Version : SB10 - error GEN1007: Reference to constant $IDCANCEL$ has not been previously define



NewsArchive
09-29-2015, 09:38 AM
Use new version 10 (from About Window)

Product: SetupBuilder Developer Edition 2016
Version: 10.0.4920

I was able to run one script fine but a second which is basically a
copy of the first gives the following error.

gemini_v2016.sb8(190): error GEN1007: Reference to constant
$IDCANCEL$ has not been previously defined.

Following is the section of script where problem occurs.

================== Script segment ==================================
! Check to see if EXECUTABLE is in use but only if installing program.
Loop
! If file does not exist, then it can not be in use.
If %_SB_INSTALLDIR%\GEMINI.EXE File or Folder doesn't exist Then
Break Loop
End
! Start by checking to see if executable is in use.
Set Variable %PSI_INUSE% to FUNCTION:Check In-use File
"%_SB_INSTALLDIR%\gemini.exe"
! If not is use, then break loop to continue.
If %PSI_INUSE% Does Not Equal "1" Then
Break Loop
End
! Show message box to user and get response.
Display Message Box "Sorry, but the [PRODUCTNAME] program is
currently ..." -- "Program is in use!"
If %_SB_RETURN% Equals "$IDCANCEL$" Then
Exit Installation()
End
End



Barton Whisler
Prosoft Inc.
Tampa, Florida

NewsArchive
09-29-2015, 09:39 AM
Barton,

Do you have the following line BEFORE the line that bombs?

#include script "Common Definitions.sbi"

If yes, could you please send the script to support@lindersoft.com?

Thank you!

Friedrich

NewsArchive
09-29-2015, 09:40 AM
Yes, the include is there. Also this works fine in SB8. I have sent
you the script via email.

As noted in prior message, the strange part is that another one that
this script was copied from works fine in SB10. The only change is a
few minor text changes for new version number in our program.

Note that there is no hurry on this. I have compiled and got the
program out using SB8.


Barton

Barton Whisler
Prosoft Inc.
Tampa, Florida

NewsArchive
09-29-2015, 09:40 AM
> Yes, the include is there. Also this works fine in SB8. I have sent
> you the script via email.
>
> As noted in prior message, the strange part is that another one that
> this script was copied from works fine in SB10. The only change is a
> few minor text changes for new version number in our program.
>
> Note that there is no hurry on this. I have compiled and got the
> program out using SB8.

Thank you for the script, Barton. I commented out your Install File and
compiler directive commands (embed manifest and code-sign) and it compiles
fine here :-( This is very weird...

Friedrich

NewsArchive
09-29-2015, 12:21 PM
Friedrich, see my email reply to you but for the rest of the
group<bg>.

Problem is being caused by the use of the "#create folder" when that
folder already exist. If the folder does not exist or that line is
commented out, all is good!

Barton

Barton Whisler
Prosoft Inc.
Tampa, Florida

NewsArchive
09-29-2015, 12:21 PM
Hi Barton,

Amazing!!! Thanks so much for your help. It's caused by a compiler "fix"
in SB10 that handles preprocessor errors (e.g. #create folder...) and
terminates the script compilation. In your script it reports the following
if the folder already exists and the directive is called before the #include
script "Common Definitions.sbi" line:

Create Folder... c:\yada
Create Folder process failed.
test.sbp(30): error GEN1007: Reference to constant $IDCANCEL$ has not been
previously defined.

The "2nd" error code is misleading.

I have changed the compiler behavior now.

Thanks again for your help !!!

Friedrich

NewsArchive
09-29-2015, 12:22 PM
Glad to get the mystery solved.

In playing, found that I did not even need the create folder as the
"Copy Files" creates it if not already there. So all of my scripts are
good to go.

Barton

Barton Whisler
Prosoft Inc.
Tampa, Florida