Skip to content

How to Build

Sarah Haynes edited this page Aug 10, 2020 · 3 revisions

Philosopher was entirely written in GO if you wish to build the project locally, follow the instructions below:

The project was designed and developed on a computer running Linux Mint, but the binaries can be compiled in any type of system that can have the GO compiler installed. We use VSCodium as a developing platform with the latest version of the Go plugin.

  1. Download and install the GO programming language. You can find the instructions on how to do that on the official project page. Philosopher was also configured as a Module.

  2. Clone Philosopher locally.

  3. Install gox. This library allows you to build binaries to dozens of different architectures and systems.

  4. Deploy the assets. Assets are the third-party tools included in Philosopher, they are shipped as compacted code files written in machine-language. You can run the commands manually or copy & paste them from below into a makefile (only need to run make once).

deploy:
	unzip -o lib/dat/bindata.go.zip -d  lib/dat/

	unzip -o lib/ext/cdhit/unix/bindata.go.zip -d  lib/ext/cdhit/unix/
	unzip -o lib/ext/cdhit/win/bindata.go.zip -d  lib/ext/cdhit/win/

	unzip -o lib/ext/comet/unix/bindata.go.zip -d  lib/ext/comet/unix/
	unzip -o lib/ext/comet/win/bindata.go.zip -d  lib/ext/comet/win/

	unzip -o lib/ext/interprophet/unix/bindata.go.zip -d  lib/ext/interprophet/unix/
	unzip -o lib/ext/interprophet/win/bindata.go.zip -d  lib/ext/interprophet/win/

	unzip -o lib/ext/peptideprophet/unix/bindata.go.zip -d  lib/ext/peptideprophet/unix/
	unzip -o lib/ext/peptideprophet/win/bindata.go.zip -d  lib/ext/peptideprophet/win/

	unzip -o lib/ext/ptmprophet/unix/bindata.go.zip -d  lib/ext/ptmprophet/unix/
	unzip -o lib/ext/ptmprophet/win/bindata.go.zip -d  lib/ext/ptmprophet/win/

	unzip -o lib/ext/proteinprophet/unix/bindata.go.zip -d  lib/ext/proteinprophet/unix/
	unzip -o lib/ext/proteinprophet/win/bindata.go.zip -d  lib/ext/proteinprophet/win/

	unzip -o lib/pip/bindata.go.zip -d  lib/pip/

	unzip -o lib/dat/bindata.go.zip -d  lib/dat/

	unzip -o lib/obo/unimod/bindata.go.zip -d  lib/obo/unimod/
  1. Build with Go or with gox (the version and build numbers below are just examples)

go build -o philosopher

gox -os="linux" -ldflags "-w -s -X main.version=4.00 -X main.build=2020-07-A"

gox -os="windows" -ldflags "-w -s -X main.version=v4.00 -X main.build=2020-07-A"