-
-
Notifications
You must be signed in to change notification settings - Fork 51
Building & Compiling
- LDC2 (DMD >= v2.80) - https://github.com/ldc-developers/ldc/releases
- Python 3.7 - https://www.python.org/downloads/windows/
- Visual Studio Build Tools - https://visualstudio.microsoft.com/downloads/#vs-2017
- ISCC (Inno Setup 5 Compiler) - http://www.jrsoftware.org/isdl.php
- rcedit - https://github.com/electron/rcedit/releases
You must have the following on your system path:
ldc2.exe
, python.exe
or py.exe
(Python Launcher), iscc.exe
, and rcedit.exe
.
You will additionally need makeappx.exe
if you plan to build the store version. That is distributed with the VS Build Tools, but is not on your path by default.
The easiest way to use it is to run this script from the "Developer Command Prompt for VS 2017".
Wherever you have the VS Build Tools installed I'm sure is fine, LDC2 is pretty good about finding it.
By default, you are expected to have the repository cloned and the source
, pack
, assets
, and libs
folders exactly where they are.
When you compile, you will end up with a directory structure somewhat like the following.
build
├── bin
│ ├── deflector.exe
│ ├── libcurl.dll
│ ├── setup.exe
│ └── updater.exe
├── dist
│ └── SearchDeflector-Installer.exe
└── vars
├── engines.txt
├── issue.txt
├── license.txt
└── version.txt
For testing, using the --debug
option is recommended. It's faster to compile, and it generates debug files (*.pdb
) to make stack traces a little easier to understand.
For release, use --mode classic
. This will compile the installer to build/dist
.
The --mode store
option copies icons, executables, and adds information to the manifest file in pack/appxmanifest.xml
, and builds the (*.appx
) package. This output will be in build/store
, the package will be in build/dist
.
For more expansive documentation, see the source of the build script. The --help
argument should get you started though.
$ python build.py -h
usage: build.py [-h] [-m {classic,store}]
[-b {setup,updater,deflector,installer,package}] [-d] [-c]
[-v VERSION] [-s]
Search Deflector Build Script
optional arguments:
-h, --help show this help message and exit
-m {classic,store}, --mode {classic,store}
preset of things to build
-b {setup,updater,deflector,installer,package}, --build {setup,updater,deflector,installer,package}
parts of the program to build
-d, --debug enable compiler debug flags
-c, --clean clean up temporary files
-v VERSION, --version VERSION
version string to use in build
-s, --silent only print errors to console
Note that if you're testing the executables in build/dist
, your registry will not be set up properly to handle the microsoft-edge
protocol.
You can either do it manually by looking here, or run the installer once and set the install location to build/bins
. Then rebuild with your changes.
Copyright © 2020 Jacob Birkett.
Search Deflector is open source under the MIT License.
Get it from the Microsoft Store or on GitHub.
If you find this software useful and would like to show your appreciation, please consider making a small donation!