+ Reply to Thread
Results 1 to 4 of 4

Thread: How to use Compiler directives

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default How to use Compiler directives

    Here is another question that I was told could be accomplished.

    SB5 apparently supports compiler directives now. One script can compile different versions. Again, I'd like to see some example code of this. It will clear things up quickly for me.

    Thanks.

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: How to use Compiler directives

    Dough,

    Something like this:

    #def DEMOVERSION = 1

    #ifdef DEMOVERSION Equals "1" Then
    Message Box "Add this if DEMOVERSION = 1" -- "Demo"
    #else
    Message Box "Add this if DEMOVERSION = 0" -- "Demo"
    #end

    Does this help?

  3. #3

    Default Re: How to use Compiler directives

    Ok. I was able to get a compiler directive to work . However, I think I need to use the #def Value Option "Get Value From Compiler Command Line", but don't know how to call the compiler via command line to pass the value itself.

    I am hoping to accomplish the following:
    A. Create one master script that can create multiple Installer versions of my app.
    B. Be able to run the script by simply typing a command line prompt or clicking on a desktop shortcut that contains something like "sbuilder.exe /script=app_script.sb5 /defvalue=1".

    I want to be able to have a non-technical person click on an shortcut icon and have my single-file image created shortly thereafter.

    Am I heading in the right direction here with Compiler Directives?

  4. #4
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: How to use Compiler directives

    Dough,

    Aha, I see. I thought we are talking about passing variable values to the "installer". The command line compiler (by the way, both command line and IDE use the same compiler) will be part of the Gold version (Developer Edition only). You can then use "sbuilder.exe app_script.sb5 defvalue=1"

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Displaying a variable in Compiler Output window
    By NewsArchive in forum SetupBuilder - NNTP
    Replies: 3
    Last Post: 05-05-2006, 05:57 AM
  2. #include and compiler variable
    By LoboMgr in forum SetupBuilder 'How Do I' Questions
    Replies: 1
    Last Post: 02-09-2006, 12:07 AM
  3. Compiler question
    By Unregistered in forum SetupBuilder
    Replies: 1
    Last Post: 07-13-2005, 07:52 AM
  4. Compiler error
    By NewsArchive in forum SetupBuilder - NNTP
    Replies: 2
    Last Post: 07-08-2005, 07:36 AM
  5. Feature Request: Script File Name and Line Number Compiler Variables
    By NewsArchive in forum SetupBuilder - NNTP
    Replies: 4
    Last Post: 05-27-2005, 02:21 AM

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •