-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Compiling on Ubuntu 16.04 with Qt Creator
Ubuntu 16.04.x comes with an old version of Qt (5.5), causing some bad issues for DB Browser for SQLite (DB4S):
- https://github.com/sqlitebrowser/sqlitebrowser/issues/920
- https://github.com/sqlitebrowser/sqlitebrowser/issues/1001
Not everyone will hit those problems, but if it happens to you there is a solution. 😄
If you compile DB4S yourself using the steps shown below, you'll have a working DB4S without the above issues.
$ sudo apt install build-essential git cmake libsqlite3-dev qt5-default \
qttools5-dev-tools
Clone the sqlitebrowser/sqlitebrowser git repo:
$ git clone https://github.com/sqlitebrowser/sqlitebrowser
Grab the Qt installer then run it:
$ wget http://www.mirrorservice.org/sites/download.qt-project.org/archive/online_installers/2.0/qt-unified-linux-x64-2.0.5-2-online.run
$ chmod 755 qt-unified-linux-x64-2.0.5-2-online.run
$ ./qt-unified-linux-x64-2.0.5-2-online.run
The Qt installer will appear:
If you have an (optional) Qt account, you can fill in the details. Otherwise just click the "Skip" button:
The Qt installer "welcome" screen will appear now. Click next through the next few screens, until it asks where you want to install:
By default, Qt will install into a "Qt" directory in your home folder. That seems to work well, but if you need to change it for some reason then this screen is where you do it. Click "Next" once you're happy with the chosen location:
This screen will have several component selected by default. You don't need anything other than Desktop gcc 64-bit
(or 32-bit if compiling on 32-bit Ubuntu), and Qt Creator (down the bottom). The rest you can safely de-select before clicking "Next" to continue:
Agree to the Qt license conditions (if you're ok with them), then click Next:
Click "Install" to begin the actual installation process:
Qt is now installed. Leave the "Launch Qt Creator" option enabled so it gets launched automatically when you click "Finish":
The welcome screen for Qt Creator appears. Click the "Open Project" button near the middle top, browse into the "sqlitebrowser" folder, then select the CMakeLists.txt
file, and open it (note that the screenshots are outdated. Please open the CMakeLists.txt
file instead of the sqlitebrowser.pro
file. Also the UI of Qt Creator might have changed slightly if you are using a newer version):
A screen called "Configure Project" will appear. There are three main checkboxes in it → Debug
, Release
, and Profile
. Unselect the Debug
and Profile
ones, so only Release
is left enabled. Then click the Configure Project
button:
This drops you into the "Edit" layout, with no documents open. Click the "Projects" tab on the left to switch to the projects layout so we can made further changes:
You're now in the Projects layout, which shows the "Build Settings" by default. "Shadow build" will be enabled. We don't want that, so disable it:
This screenshot shows "Shadow build" disabled, which is what we want:
Now from the Qt Creator menu in the top bar, choose Build → Build All:
DB Browser for SQLite is now being built. It can take a few minutes, so be patient until it completes:
If all goes well, the build should finish without errors, looking somewhat like this:
If the build process finishes with any errors though, sometimes running Build → Build All again (as per the previous step) fixes the problem, and is worth trying.
If you want SQLCipher support, follow this step.
Still needs writing
Getting Started
For Users
- Encrypted Databases
- Keyboard shortcuts
- Browse Data
- Filters
- Regular Expressions
- Display Formats
- Encodings
- Conditional Formats
- Plot Dock
- Views
- Project Files
- Command Line Interface
- Transactions
- Tutorials
- Video tutorials
- Windows Users
- macOS Users
For Developers
- Release process
- Source code highlights
- Merging Commits
- Translations
- Building on
- Nightly Builds
- Nightly build script for
- GitHub Actions