Ncharbonneau Posted March 17, 2011 Share Posted March 17, 2011 (edited) 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 0If ($evaluation =1 ) FileInstall(....)endBut all files are included in the executable even if $evaluation = 0I 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??ThanksNicolas Edited March 17, 2011 by Ncharbonneau Link to comment Share on other sites More sharing options...
iamtheky Posted March 17, 2011 Share Posted March 17, 2011 all-in-1 = all files are included in the executable even if $evaluation = 0It just may not need to deploy them depending on the configuration. At least in my head. ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
Chimaera Posted March 17, 2011 Share Posted March 17, 2011 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 If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Zedna Posted March 18, 2011 Share Posted March 18, 2011 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. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
willichan Posted March 18, 2011 Share Posted March 18, 2011 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. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
Ncharbonneau Posted March 18, 2011 Author Share Posted March 18, 2011 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, efficientThanks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now