Build edbrowse from source on Ubuntu 20.04 - troyp/edbrowse GitHub Wiki
Commands to type at the terminal begin "$ ". Do not type "$ ". This is only here to help distinguish between commands and comments.
Install packages
Before installing packages, it is a good idea to update the package list:
$ sudo apt update
Install the GCC compiler:
$ sudo apt install gcc -y
Install the git version control system:
$ sudo apt install git -y
Install packages that edbrowse uses:
$ sudo apt install pkg-config-x86-64-linux-gnux32 -y
$ sudo apt install libcurl4-openssl-dev -y
$ sudo apt install libpcre2-dev -y
$ sudo apt install libreadline-dev -y
$ sudo apt install unixodbc-dev -y
Install the packages that we need to build tidy-html5:
$ sudo apt install build-essential -y
$ sudo apt install cmake -y
$ sudo apt install xsltproc -y
Copy the source files for tidy-html5, quickjs, and edbrowse
Create a copy of the files in the tidy-html5 repository:
$ git clone https://github.com/htacg/tidy-html5
Create a copy of the files in the quickjs repository:
$ git clone https://github.com/bellard/quickjs
Create a copy of the files in the edbrowse repository:
$ git clone https://github.com/CMB/edbrowse
Build and install tidy-html5
Change to the tidy-html5/build/cmake subdirectory:
$ cd tidy-html5/build/cmake
Use the cmake command to start building tidy-html5:
$ cmake ../..
Use the make command to continue building tidy-html5:
$ make
Install the newly built tidy-html5 package:
$ sudo make install
Return to the parent directory:
$ cd ../../..
Prepare quickjs to work with edbrowse
Change to the edbrowse subdirectory:
$ cd edbrowse
Run a Bash script to change a quickjs source file:
$ tools/quickjobfixup
Return to the parent directory:
$ cd ..
Build quickjs
Change to the quickjs subdirectory:
$ cd quickjs
Build quickjs:
$ make
Return to the parent directory:
$ cd ..
Build and install edbrowse
Change to the edbrowse/src subdirectory:
$ cd edbrowse/src
Build edbrowse:
$ make
Install edbrowse:
$ sudo make install
Return to the parent directory:
$ cd ../..
Start edbrowse:
$ edbrowse
If this gives a library linking error, reconfigure the dynamic linker run time bindings (you should not need to do this often):
$ sudo ldconfig
Update edbrowse
Update the package list:
$ sudo apt update
Upgrade installed packages:
$ sudo apt upgrade -y
Change to the tidy-html5 subdirectory:
$ cd tidy-html5
Get the latest files from the tidy-html5 repository:
$ git pull
If no files have changed, you need not build and install tidy-html5 again.
If files have changed, build and install tidy-html5:
$ cd build/cmake
$ cmake ../..
$ make
$ sudo make install
$ cd ../..
Return to the parent directory:
$ cd ..
Change to the quickjs subdirectory:
$ cd quickjs
Get the latest files from the quickjs repository:
$ git pull
If no files have changed, you need not build quickjs again.
If files have changed, build quickjs:
$ make
Return to the parent directory:
$ cd ..
Change to the edbrowse subdirectory:
$ cd edbrowse
Get the latest files from the edbrowse repository:
$ git pull
If no files have changed, you need not build and install edbrowse again.
If files have changed, build and install edbrowse:
$ cd src
$ make
$ sudo make install
$ cd ..
Return to the parent directory:
$ cd ..
Start edbrowse:
$ edbrowse