HatchKeeper  0.90
The Free Open-Source Egg Incubation Software
Building

Compiling HatchKeeper makes use of simple Makefiles for each platform.

Dependecies

  • G++ and Make
    Linux: Install g++ and make via your package manager
    Mac: Install Command Line Tools For Xcode
    Windows: Install TDM-GCC-5.1.0 Compiler

  • wxWidgets >= 3.1.1 source code.
    See below for info on builing for each platform.

  • wxFreeChart
    You can manually specfiy NO_GRAPH and edit out the wxFreeChart library in the makefile to eliminate the wxFreeChart dependency.

Building Under Linux

Build wxWidgets first. It's highly recommended that you link against gtk2. If you want to use native notifications, install libnotify development files before compiling. Under Linux we build it as a static library.

./configure --disable-shared
make
sudo make install

Next build wxFreeChart. cd into the source and run

./configure

Make sure the summary specifies wx 3.1.1. Then Run

make

Copy the include folder and the /lib/libwxcode*.a file to the root of the HatchKeeper source.

In HatchKeeper source root, rename LinMakefile to Makefile and run:

make

To package as an AppImage you'll need to download the appimagetool. Copy the HatchKeeper executable and the HatchKeeper_Data_* folder to Platforms/Linux/HatchKeeper_v*.AppDir. Cd into Platforms/Linux and run

chmod +x ./HatchKeeper_v*.AppDir/AppRun

then run

<path-to-appimagetool> -n ./HatchKeeper_v*.AppDir.

The AppImage should be found in Platforms/Linux.

Building Under Mac

Follow the Linux section to build wxWidgets and wxFreeChart.

In HatchKeeper source root, rename MacMakefile to Makefile and run:

make

Instead of an AppImage you'll have a file called HatchKeeper.app. Copy this to /Applications to install. You can use Disk Utility to package HatchKeeper.app and a shortcut to /Applications into a .dmg file.

Building Under Windows

Install wxWidgets source to C:\wxWidgets 3.1.1. Next open C:\wxWidgets-3.1.1\build\msw\config.gcc in a text editor and modify some lines to look like this:

# Standard flags for C++
CXXFLAGS ?= "--std=gnu++11"
# What type of library to build? [0,1]
SHARED ?= 1
# Type of compiled binaries [,release]
BUILD ?= release
# Should debugging info be included in the executables? The default value
# "default" means that debug info will be included if BUILD=debug
# and not included if BUILD=release. [0,1,default]
DEBUG_INFO ?= 0
# Value of wxDEBUG_LEVEL. The default value is the same as 1 and means that all
# but expensive assert checks are enabled, use 0 to completely remove debugging
# code. [0,1,default]
DEBUG_FLAG ?= 1
# Version of C runtime library to use. You can change this to
# static if SHARED=0, but it is highly recommended to not do
# it if SHARED=1 unless you know what you are doing. [dynamic,static]
RUNTIME_LIBS ?= dynamic

To build the libs, cd to C:\wxWidgets-3.1.1\build\msw\ and run:

mingw32-make -f makefile.gcc

Copy the following files into the root of HatchKeeper source.

/lib/wxbase311u_gcc_custom.dll
/lib/wxmsw311u_adv_gcc_custom.dll
/lib/wxmsw311u_aui_gcc_custom.dll
/lib/wxmsw311u_core_gcc_custom.dll
/lib/wxmsw311u_html_gcc_custom.dll

To build the wxFreeChart cd into the source/build and run

mingw32-make -f makefile.gcc WX_DIR=C:\wxWidgets-3.1.1 WX_UNICODE=1 WX_DEBUG=0 WX_SHARED=1

Copy the include folder, the /lib/wxcode*.a file and the /lib/wxcode*.dll file to the root of the HatchKeeper source.

Finally build HatchKeeper by cd into the directory. Run:

mingw32-make -f WinMakefile

To build an installer you'll need to install NSIS and the AccessControl plug-in. Copy the HatchInstaller.nsi file from Platforms/Windows to the root of the HatchKeeper source and compile it with the nsis compiler, this will produce an installable .exe installer in the root of the source.