Sign in to follow this  
Followers 0
WorkingMan

VS2005 Custom Build using aut2exe compiler problem

2 posts in this topic

I am trying to include a step to build .au3 into .exe in our build system. The best way to make this maintainable , I think, is to create an empty visual studio project and then use "Custom Build" to build all the .au3 files.

I have one problems right now.

1) How to compile on a machine where AutoIt3 is not installed? Is there a way to specify the default autoit include path (the one in the autoit3 installation folder that includes misc.au3) without having to install AutoIt3 (any registry entry to modify for that?)?

Currently I have this command in "$(SolutionDir)..\aut2exe\aut2exe /in [inputs]" and it works great except the above problem

Thanks in advance.

Share this post


Link to post
Share on other sites



[sOLVED]

So what I did is to put the "include" folder to where I saved a copy of the aut2exe folder (inside of the folder). Create your .rule file inside of your solution (this option is given during the creation of the custom build rule - it can only be changed directly in the .vcproj file) so it can be compiled stand alone by any build system (or person).

you can change .rule file location in .vcproj (dot means your $(ProjectDir)) only (UI disables path edit after rule is created):

<ToolFiles>
    <ToolFile
        RelativePath=".\Autoit3.rules"
    />
</ToolFiles>

AutoIt3.rule (created by visual studio) that worked for me:

<?xml version="1.0" encoding="utf-8"?>
<VisualStudioToolFile
    Name="Autoit3b"
    Version="8.00"
    >
    <Rules>
        <CustomBuildRule
            Name="aut2exe"
            DisplayName="Autoit3"
            CommandLine="$(SolutionDir)..\Aut2Exe\aut2exe /in [inputs] /out $(OutDir)\$(InputName).exe"
            Outputs="$(OutDir)\$(InputName).exe"
            FileExtensions="*.au3"
            ExecutionDescription="autoit to exe"
            >
            <Properties>
            </Properties>
        </CustomBuildRule>
    </Rules>
</VisualStudioToolFile>

Note: "Outputs" is not actually used but you have to supply something so VS2005 doesn't complain. /out is what you need to output to where you want. $(OutDir) is defined in your solution.

So if you have a defined directory structure for your scripts and then you add them in your solution (optionally use filders to simulate hard disk structure) all files should still be compiled according to their original location (no include problem). You should only include files you want to convert to .exe in the solution (i.e.: everything in the solution will be turned into an .exe when you compile; unless your include files don't have .au3 extention, I am not sure if that's possible).

This is perfect for CVS + Automatic build system. Put this into the FAQ:b

Share this post


Link to post
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
Sign in to follow this  
Followers 0