Jump to content

#include and continuous build environment


Recommended Posts

Hello, I have been searching with little success, but I want to build my AutoIT scripts in a CI environment, but have problems regarding paths for #includes. I am using Hudson and can execute the process just fine, but I am having issues with include resolution.

I have the following questions:

1. Can I provide a directory using the registry setting that will parse all sub-directories? (If so, how?)

2. It is my understanding that I cannot parameterize the #include statements, in other words, use a variable in the #include statement, is there a way around this?

3. Has anyone had any success building scripts in a continuous build environment, if so, please let me know how you were successful!

So far, the only way I have been able to make it work is by including every possible relative path for each individual .au3 file. This is very inefficient, was hoping there was a better solution.

Thanks for any help you can provide, I am an experienced software developer, just new to AutoIT.

Link to comment
Share on other sites

Variables don't exist or have values until run-time. Compiler directives like #include are interpreted at compile-time, which is before run-time, so the the script is not being run yet, and the variables and macros don't exist yet.

Consider the unique case of FileInstall(). The source is interpreted at compile-time, so it must not contain variables or macros. Then destination is not interpreted until run-time, so it can contain macros and variables.

An un-compiled AutoIt script (.au3 file) is just plain text, so you could dynamically update the #include paths of the script file with a pre-processor before compiling.

:unsure:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...