I want to nest include files inside include files. Why cant I do that in Inno Setup?
So lets say I have a Inno Setup file (let's call it master.iss) with a files section like this: [Files] #include PathToIncludeFile\IncludeFile.iss That works beautiful and fine. The content of IncludeFile.iss is effectively inserted into the master.iss file where the #include exists. So now I want the content of the #include file to me nested in more includes. So the IncludeFile.iss looks like this: #include C:\PathToFile\FileWithRealFilesDataForProject1.iss #include C:\PathToFile\FileWithRealFilesDataForProject2.iss #include C:\PathToFile\FileWithRealFilesDataForProject3.iss #include C:\PathToFile\FileWithRealFilesDataForProject4.iss #include C:\PathToFile\FileWithRealFilesDataForProject5.iss #include C:\PathToFile\FileWithRealFilesDataForProject6.iss The compiler for Inno Setup compiling Master.iss will say (File: PathToIncludeFile\IncludeFile.iss \n Line 1: \n Column 11:) [ISSP] Undeclaired Identifier C" I suppose I could achieve what I want with a batch file or something, but it would be a lot more straight forward if I could just do this with nested #includes. BTW: My current Inno Setup Compiler is 5.5.6 (u)
You can nest include files. Your problem is that in Inno Setup preprocessor the string literals must be enclosed in double-quotes (or single-quotes), like: #include "C:\PathToFile\FileWithRealFilesDataForProject1.iss" When you omit the quotes, the preprocessor tries to interpret the #include argument as an expression. Hence it treats the C (leading alphanumeric sequence) as an identifier. See these topics in Inno Setup Preprocessor documetation: Expression Syntax. #include directive For the same reason, your primary include, the way you have it in your post, won't compile either. You must have enclosed it in double quotes. For this: #include PathToIncludeFile\IncludeFile.iss I'm getting [ISPP] Undeclared identifier: "PathToIncludeFile". (as expected)
Preprocessor, Postprocessor, Geometric Processor and NC processor
Gfortran pre-processor directives for Different Operating systems
Good data set for Pre-processing
IDE inserts incorrect #include statement
Save string in C preprocessor
Fortran preprocessing with Portland compiler
Making a macro expansion dependent on its arguments
How to set ISPP defines based on default Inno Setup variables?
standalone C++ preprocessor
Annotations in OCaml
Obtaining the include paths cpp searches
Test for empty macro definition
m4 does not obey expansion?
Detect compilation on Bada OS
Which of the C-family languages have a preprocessor?
Generic preprocessor: How to use for any kind of file?