Skip to content
This repository has been archived by the owner on Apr 3, 2022. It is now read-only.

Building & Compiling

Jacob Birkett edited this page Aug 19, 2019 · 11 revisions

Search Deflector

Build requirements

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.

Directory structure

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

Build script information

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.

Pages


If you find this software useful and would like to show your appreciation, please consider making a small donation!

Donate

Microsoft Store

Clone this wiki locally