The Fife Windows SDK is a collection of software development tools for working with Fifengine.
The Fife SDK installer build scripts fetch all required packages for working with fifengine, including build-tools and dependencies, prepares them for packaging and finally builds the "SDK" installer on Appveyor.
This chapter documents these build scripts and tasks, including fetching and extracting components and compiling the InnoSetup installers.
Let’s start with an overview of the files and folders in the fife-windows-sdk
repository:
├──build-scripts
│ ├── 1-download.bat
│ ├── 2-extract.bat
│ ├── 3-copy.bat
│ ├── 3-stripdown.bat
├──build-tools
│ ├── 7zip
│ ├── aria2
│ ├── innosetup
├──download-lists
│ ├── fifengine.txt
│ ├── fifengine-build-tools.txt
├──installer
│ ├── images
│ │ ├── fife.ico
│ │ ├── WizardImage.bmp
│ │ ├── WizardImage.xcf
│ │ ├── WizardSmallImage.bmp
│ │ ├── WizardSmallImage.xcf
│ ├── includes
│ ├── envpath.iss
├── appveyor.yml
├── CHANGELOG.md
├── LICENSE
├── README.md
We are using Appveyor to continuously build and publish the installer.
The file appveyor.yml
is Appveyor’s configuration file.
Important are the sections before_build
, build_script
, artifact
, deploy
.
Before we can build the installer, we need to download and extract the software components, which we later want to include in the installer. After the extraction, we copy and move some files and folders around. Then we delete several unnecessary files and folders in a stripdown run.
At the end of the before_build
step, we have a proper folder structure
with all the components we want to ship, ready for inclusion into the installer.
The installer is build using the InnoSetup Compiler (iscc
).
The property APP_VERSION
is set from the APPVEYOR environment as %APPVEYOR_BUILD_VERSION%
,
so that the installer is dynamically versionized from the outside.
build-tools\innosetup\iscc /DAPP_VERSION=%APPVEYOR_BUILD_VERSION% installer\fife-sdk.iss
The target location for installer is: fife-windows-sdk\_build
.
The compiled setup executable has the following naming scheme: {#APP_NAME}-{#APP_VERSION}-Setup-{#APP_COMPILER}-x86
,
for example: _build\FifeSDK-0.4.0-Setup-VC14-x86.exe"
When the installer was successfully build, it is automatically published on Appveyor’s artifact storage.
When a new release version of the installer is tagged, then the installer is automatically published on Github Releases.