Website Building » Wix » What Is SourceDir in WiX?

What Is SourceDir in WiX?

Last updated on September 30, 2022 @ 9:30 pm

SourceDir is a WiX variable that specifies the directory of the source files. This is used by the compiler to find the files needed to compile the project.

By default, the value of SourceDir is set to the directory of the project file. However, you can override this by setting the value in the project file.

GREAT NEWS:

Exciting update! We've collaborated with Wix to offer WBI users with a free plan for all website creation needs - Explore the details here.

The value of SourceDir is used by the compiler to find the source files needed to compile the project. The default value of SourceDir is set to the directory of the project file.

You can override this default by setting the value in your project file.

When you set SourceDir in your project file, you need to use a full path name. For example, if your source files are located in c:\MyProject\src, you would set SourceDir as follows:

SourceDir=”c:\MyProject\src”

If you don’t use a full path name, WiX will look for the source files relative to the location of your project file. So if your project file is located in c:\MyProject and your source files are located in c:\MyProject\src, you would set SourceDir as follows:

PRO TIP: SourceDir is a special folder in WiX that contains the files that will be used to create the installation. It is important to note that the files in SourceDir will be copied to the output directory when the installation is created, so it is important to make sure that only the necessary files are included in this folder.

SourceDir=”src”

The value of SourceDir can be a relative path or an absolute path. If you use a relative path, WiX will look for the source files relative to the location of your project file.

Conclusion: SourceDir is a WiX variable that specifies the directory of where the source files are located. The compiler uses this information to find what it needs to compile The default location is set to where everthe .wxs file is but it can be overriden by changing it in Project file.

Madison Geldart

Madison Geldart

Cloud infrastructure engineer and tech mess solver.