preprocessor


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)

Related Links

Progress ABL How to Test for WEBSPEED in the PRE-PROCESSOR
I want to nest include files inside include files. Why cant I do that in Inno Setup?
Discriminating between (small) numbers and everything else in C preprocessor
Defining preprocessor symbols for CLion analyzer
Check multiple conditions at once using m4 preprocessor
XC8 warning: (107) illegal # directive “foo”
Compiling with ocamlbuild and camlp5
How not to output comments using the -C operation in mcpp
C++ Builder File Version not correct
How do you a preprocess statement for #include
Does the preprocessor pass environment variables?
YAML preprocessor / macro processor
Pre-Processing using m4
Is there a practical reason for “#if defined(X) && (X != 0)”?
How to check for presence of a directory in Inno Setup preprocessor?
What are analogs of “#ifdef”, “#ifndef”, “#else”, “#elif”, “#define”, “#undef” in D programming lnaguage?

Categories

HOME
microsoftgraph
sublimetext
google-cloud-functions
cakephp-3.4
parameters
tail
bookmarks
spring-session
sendgrid-api-v3
pattern-matching
octave
dkim
heap
appcelerator-studio
windows-ce
flash-player
libusb
aws-sdk
dimensional-modeling
template-engine
imessage
sigma.js
gmm
oledb
solrcloud
ag
kendo-mobile
blade
imagemap
jquery-ias
qliksense
scriptella
highstock
licensing
linked-data
intersystems-cache
cppreference
nsurl
spring-security4
gnat-gps
activexobject
pop3
processwire
cd
connection-pool
typesafe-config
c9.io
setup.py
softmax
claims
chronicle-map
magento-2.0.7
builder
insight
carrot2
boo
sundials
cmp
jtree
sandcastle
atlas
webjars
spring-cloud-feign
uicolor
firebase-security
respondcms
uiactionsheet
aspen
concept-insights
rate-limiting
include-guards
binomial-theorem
ansi
metatrader5
paw
lambda-architecture
cocoalibspotify-2.0
inappsettingskit
cnf
nebula
abstract-data-type
android-loadermanager
onmousemove
qtconcurrent
vfs
relative
entity-attribute-value
role
pylucene
vs-android
application-verifier
sifr
tui
google-wave
leader

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App