Results 1 to 4 of 4

Thread: #copy file and compiler variables

Hybrid View

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

    Default #copy file and compiler variables

    Hi Friedrich,

    I just noticed something weird. I use a #copy file action in all my scripts
    to copy my installs to a product folder on my server so I can have easy
    access to them from anywhere on the LAN.

    I've recently built a "template" to use with new products and instead of
    hard coding the destination I used:

    T:\Installs\_Icetips\[IT_PRODNAME]\[EXENAME]

    Both IT_PRODNAME and EXENAME come from Build Automator and they work
    perfectly anywhere else in the install as far as I can tell (I use the
    IT_PRODNAME in several places)

    But when I use the compiler variables in the #copy file they don't seem to
    work. No errors are logged and the compile looks like everything is good,
    but it hasn't copied the file. If I set the IT_PRODNAME to the product name
    (which I pass into it from BA) and compile it in SB7, it copies the file.
    I'm not exactly sure where the problem is and I'm not getting any errors
    from SB. It's not a big deal, I just need to set this variable in the
    script but I'd like to be able to figure out what is going wrong.

    I.e. If the product I'm compiling is YYY:

    If IT_PRODNAME contains XXX in the SB script (Compiler Variables section)
    and I pass YYY to it via the command line #copy will not work. Using
    #MsgBox shows that IT_PRODNAME does correctly contain YYY and everything
    else using IT_PRODNAME produces the correct results. It is used in 26
    places in this script and it would completely fall apart if it wasn't
    right<g>

    If IT_PRODNAME contains YYY in the SB script it will work.

    #copy is set to execute at the end of the script.

    Funny thing is that it does NOT copy the files to the (incorrect) XXX folder
    either, I tried that.

    Any ideas?

    --
    Arnór Baldvinsson - Icetips Alta LLC
    Port Angeles, Washington
    www.icetips.com - www.buildautomator.com - www.altawebworks.com
    Icetips product subscriptions at http://www.icetips.com/subscribe.php

  2. #2

    Default Re: #copy file and compiler variables

    Hi Friedrich,

    > If IT_PRODNAME contains XXX in the SB script (Compiler Variables section)
    > and I pass YYY to it via the command line #copy will not work. Using
    > #MsgBox shows that IT_PRODNAME does correctly contain YYY and everything
    > else using IT_PRODNAME produces the correct results. It is used in 26
    > places in this script and it would completely fall apart if it wasn't
    > right<g>

    Further on this: Even with the correct variable value, it ONLY works when I
    compile it in SB7. If I compile it from BA it doesn't work. It's like if
    the compiler var comes in via the command line the #copy sees it as empty.
    I remember we had some similar issue regarding the EXENAME variable if I
    remember correctly.

    Best regards,

    --
    Arnór Baldvinsson - Icetips Alta LLC
    Port Angeles, Washington
    www.icetips.com - www.buildautomator.com - www.altawebworks.com
    Icetips product subscriptions at http://www.icetips.com/subscribe.php

  3. #3

    Default Re: #copy file and compiler variables

    Hi Arnór,

    Unfortunately, I can't reproduce it :-(

    My test project passes the values for [IT_PRODNAME] and [EXENAME] via a .BAT
    file and it seems to work as expected.

    See attached arnor.zip. Please unzip to the root of your C:\ drive and
    preserve the directory structure (see arnor1.png).

    In the "copytest.sb7" project, the [IT_PRODNAME] compiler variable is set
    (by default) to "XXX" and [EXENAME] is set to "copytest.exe". At the end of
    the compilation process, the "#copy file(s)..." compiler directive copies
    the generated executable to "C:\copytest\Arnor2\[IT_PRODNAME]\[EXENAME]"

    Okay, the BATCH.BAT file (located in the "Arnor1" subfolder) passes the
    following to the compiler:

    /CV IT_PRODNAME "YYY" /CV EXENAME "YYY.EXE"

    The batch compiles the project to YYY.EXE and then copies the executable to
    "C:\copytest\Arnor2\YYY\YYY.EXE" (see arnor2.png).

    Does this demo work on your machine?

    Friedrich
    Attached Images Attached Images   
    Attached Files Attached Files

  4. #4

    Default Re: #copy file and compiler variables

    Hi Friedrich,

    > Does this demo work on your machine?

    It does. I will do some more experiments with this over the weekend and see
    if I can nail down exactly what's happening and then see if I can duplicate
    it in a smaller project. Quite possible that I overlooked something.

    Best regards,


    --
    Arnór Baldvinsson - Icetips Alta LLC
    Port Angeles, Washington
    www.icetips.com - www.buildautomator.com - www.altawebworks.com
    Icetips product subscriptions at http://www.icetips.com/subscribe.php

Thread Information

Users Browsing this Thread

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

Posting Permissions

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