Jump to content

how to avoid including file with FileInstall


Recommended Posts

Hello,

I know that it is the purpose of FileInstall to include in the compile file the referenced file.

I use a script to install company software. This has 2 functions: create a download evaluation executable for company website and an evaluation CD-ROM.

Basically, the 2 functions are really similar, but in the case of:

- evaluation.exe : all files are included in the executable then unzipped locally using FileInstall

- installation.exe : All files are in a directory of my CD-ROM so doesn't need to be included it the executable.

my first thought was to use a variable in my code when compiling:

dim $evaluation = 1 or 0

If ($evaluation =1 )

FileInstall(....)

end

But all files are included in the executable even if $evaluation = 0

I think I should create 2 scripts..

Do you have another solution, so I won't have to maintain 2 different scripts, so I've got it all-in-1??

Thanks

Nicolas

Edited by Ncharbonneau
Link to comment
Share on other sites

all-in-1

=

all files are included in the executable even if $evaluation = 0

It just may not need to deploy them depending on the configuration. At least in my head.

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

Me personally i would lean towards 2 scripts as i usually find they tend to evolve differently depending on the needs.

At least that way you can simply change things when you need to

C

Link to comment
Share on other sites

Use FileInstall() for anything that you want to be "compiled into" the script, and FileCopy() for anything that will be included on the CD but does not need to be "compiled into" the script.

Link to comment
Share on other sites

My idea for such request is using include files.

So you can create main script and two include files evaluation/install.

When you want to compile one type of EXE just comment one line with include statement and compile.

Zedna,

I'v moved my specific functions to another autoit file and I call then when required using an include statement.

Simple, efficient

Thanks

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...