Skip to content

Commit

Permalink
Merge pull request #4 from sqlitebrowser/master
Browse files Browse the repository at this point in the history
Changes from upstream
  • Loading branch information
deepsidhu1313 committed Dec 11, 2021
2 parents 341d110 + d123fc9 commit ed4f706
Show file tree
Hide file tree
Showing 1,032 changed files with 65,367 additions and 48,267 deletions.
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ assignees: ''
---

<!--
Please fill the requested information before pressing Submit.
Thanks for coming here to report a bug. :)
Please describe it in the sections below, fill out the correct check boxes with an "x", replacing the space inside [ ], then click the "Submit new issue" button at the bottom
Expand Down Expand Up @@ -39,6 +40,8 @@ The info below often helps, please fill it out if you're able to. :)

#### What is your DB4S version?

- [ ] 3.12.2
- [ ] 3.12.1
- [ ] 3.12.0
- [ ] 3.11.x
- [ ] Other: ___
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ assignees: ''

---

<!-- Thanks for coming here to suggest a new feature. :) -->
<!-- Please fill the requested information before pressing Submit.
Thanks for coming here to suggest a new feature. :) -->

Describe the new feature
--------------------------
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/cppcmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: C/C++ CI

on:
push:
branches: ['*']
tags:
paths_ignore: ['docs/**', '.travis.yml']
pull_request:
release:
types: ['created']

defaults:
run:
shell: bash

jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {name: "ubuntu-20.04", os: "ubuntu-20.04"}

steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install qttools5-dev libqt5scintilla2-dev libqcustomplot-dev libsqlite3-dev
- name: Configure CMake
run: |
cmake --version
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${PWD}/install \
-DCPACK_PACKAGE_DIRECTORY=${PWD}/package \
-DENABLE_TESTING=ON
- name: make
run: cmake --build build --config Release -j --target install
- name: run tests
run: ctest -C Release
- name: package
run: |
cmake --build build --config Release -j --target package
cmake -E remove_directory package/_CPack_Packages
- name: upload package
uses: actions/upload-artifact@master
with:
name: pkg-${{ matrix.config.name }}
path: package
- name: upload to release page
if: github.event_name == 'release'
env:
TOKEN: "token ${{ secrets.GITHUB_TOKEN }}"
TAG: ${{ github.event.release.tag_name }}
UPLOAD_URL: ${{ github.event.release.upload_url }}
run: |
# Do try this at home! The REST API is documented at
# https://docs.github.com/en/free-pro-team@latest/rest and you can get a personal
# access token at https://github.com/settings/tokens
# (set TOKEN to "bearer abcdef1234")
# you can get the UPLOAD_URL with a short bash snippet; make sure to set the env var TAG:
# UPLOAD_URL=$(curl -H 'Accept: application/vnd.github.v3+json' $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/releases/tags/$TAG | jq -r .upload_url)
UPLOAD_URL=${UPLOAD_URL%\{*} # remove "{name,label}" suffix
for pkg in package/*.*; do
NAME=$(basename $pkg)
MIME=$(file --mime-type $pkg|cut -d ' ' -f2)
curl -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: $TOKEN" -H "Content-Type: $MIME" --data-binary @$pkg $UPLOAD_URL?name=$NAME
done
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ src/sqlitebrowser
src/Makefile*
src/debug
src/release
src/gen_version.h

# ignore compiled translation files
src/translations/*.qm
Expand Down
68 changes: 28 additions & 40 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,78 +1,66 @@
os: linux
language: cpp
sudo: required
dist: xenial
dist: bionic

branches:
only:
- master

# env:
# - ARCH=x86_64 DOCKER_IMAGE=amd64/ubuntu:trusty
# - ARCH=i686 DOCKER_IMAGE=i386/ubuntu:trusty

matrix:
jobs:
fast_finish: true
include:
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env: COMPILER=g++-5 CXX=g++-5
env: COMPILER=g++ CXX=g++
- compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
packages:
- clang-3.8
env: COMPILER=clang++-3.8

before_install:
- sudo apt-get update -qq
- sudo apt-get --force-yes install build-essential git-core cmake libsqlite3-dev qt5-default qttools5-dev-tools libsqlcipher-dev qtbase5-dev libqt5scintilla2-dev libqcustomplot-dev qttools5-dev
env: COMPILER=clang++


install:
- if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi
- if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.8" CC="clang-3.8"; fi
addons:
apt:
packages:
- build-essential
- git-core
- cmake
- libsqlite3-dev
- qt5-default
- qttools5-dev-tools
- libsqlcipher-dev
- qtbase5-dev
- qttools5-dev
- libqt5svg5

script:
- mkdir build
- mkdir build_cipher
- mkdir appbuild
- mkdir appdir
- cd build
- cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DENABLE_TESTING=ON ..
- cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DENABLE_TESTING=ON -DFORCE_INTERNAL_QSCINTILLA=ON ..
- make
- ctest -V
- cd ../build_cipher
- cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DENABLE_TESTING=ON -Dsqlcipher=1 ..
- cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DENABLE_TESTING=ON -DFORCE_INTERNAL_QSCINTILLA=ON -Dsqlcipher=1 ..
- make
- ctest -V
- cd ../appbuild
- cmake -DCMAKE_INSTALL_PREFIX:PATH=../appdir/usr -Wno-dev -Dsqlcipher=1 -DSQLITE_ENABLE_JSON1=1 ..
- cmake -DCMAKE_INSTALL_PREFIX:PATH=../appdir/usr -Wno-dev -DFORCE_INTERNAL_QSCINTILLA=ON -Dsqlcipher=1 -DSQLITE_ENABLE_JSON1=1 ..
- make install
- cd ..
- git rev-list master --count
- wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage"
- chmod a+x linuxdeployqt-6-x86_64.AppImage
- export VERSION=$(printf "`master`-`git rev-list HEAD --count`-` git -C . rev-parse --short HEAD`") #$(git rev-parse --short HEAD) # linuxdeployqt uses this for naming the file
- ./linuxdeployqt-6-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage

- wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
- chmod a+x linuxdeployqt-continuous-x86_64.AppImage
- export VERSION=$(printf "master-`git rev-list HEAD --count`-` git -C . rev-parse --short HEAD`")
- ./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage

after_success:
- find appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
- bash upload.sh DB_Browser_for_SQLite*.AppImage*
- chmod a+x upload.sh
- UPLOADTOOL_ISPRERELEASE=true ./upload.sh DB_Browser_for_SQLite*.AppImage*

notifications:
email:
recipients:
- mkleusberg@gmail.com
- github@mkleusberg.de
- innermous@gmail.com
- justin@postgresql.org
- mgrojo@gmail.com
Expand Down
56 changes: 19 additions & 37 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
DB Browser for SQLite requires Qt as well as SQLite. For more information on Qt
please consult http://www.qt.io and for SQLite please see https://sqlite.org/.

Please note that all versions after 3.9.1 will require:
Please note that all versions after 3.12.1 will require:
* A C++ compiler with support for C++14 or later

All versions after 3.9.1 will require:
* Qt 5.5 or later, however we advise you to use 5.7 or later
* A C++ compiler with support for C++11 or later

Expand Down Expand Up @@ -51,7 +54,7 @@ The same process works for building the code in any platform supported by Qt
(including other Unix systems with X11.)


### Ubuntu Linux
### Ubuntu / Debian Linux

```bash
$ sudo apt install build-essential git-core cmake libsqlite3-dev qt5-default qttools5-dev-tools \
Expand All @@ -65,6 +68,8 @@ $ make
$ sudo make install
```

**Note** - Use `cmake -DFORCE_INTERNAL_QSCINTILLA=ON -Dsqlcipher=1 -Wno-dev ..` if you're using Debian and meet errors during compiling.

This should complete without errors, giving you a binary file called 'sqlitebrowser'.

Done. :)
Expand All @@ -76,6 +81,10 @@ Done. :)
**Note 2** - On CentOS 7.x, you need to replace the `qwt-qt5-devel` package name with
`qt5-qtbase-devel` in the `dnf install` line below.


**Note 3** - On CentOS 8 (Stream), you need to replace the `qt-devel` package name with
`qt5-devel` in the `dnf install` line below. Make sure the `PowerTools` repo is enabled.

```
$ sudo dnf install cmake gcc-c++ git qt-devel qt5-linguist qwt-qt5-devel \
sqlite-devel
Expand Down Expand Up @@ -128,6 +137,7 @@ It requires SQLite and Qt 5.x to be installed first. These are the
$ brew tap sqlitebrowser/sqlite3
$ brew install sqlitefts5
$ brew install qt
$ brew install cmake
$ brew link sqlitefts5 --force

Then it's just a matter of getting the source:
Expand All @@ -139,43 +149,16 @@ its name (eg ~/tmp/foo'), as compiling will error out.

And compiling it:

$ cd sqlitebrowser
$ qmake
$ make
$ brew unlink sqlitefts5
$ mv src/DB\ Browser\ for\ SQLite.app /Applications/

An icon for "DB Browser for SQLite" should now be in your main OSX Applications
list, ready to launch.

**Note 2** - There have been occasional [reports of compilation problems on OSX
10.9](https://github.com/sqlitebrowser/sqlitebrowser/issues/38), with the
'make' step complaining about no targets. This seems to be solvable by
running:

$ qmake -spec macx-g++

or:

$ qmake -spec macx-llvm

(before the 'make' step)

### Building with CMake

Install Qt and SQLite as instructed in the previous section and clone the repo to a directory (it's `sqlitebrowser` as usual).

Install CMake:

$ brew install cmake

And build with these commands:

$ cd sqlitebrowser
$ mkdir build # You can easily make a fresh build again by removing this directory
$ cd build
$ cmake -DCMAKE_PREFIX_PATH=/usr/local/opt/qt ..
$ cmake --build .
$ brew unlink sqlitefts5
$ mv sqlitebrowser.app /Applications/DB\ Browser\ for\ SQLite.app

An icon for "DB Browser for SQLite" should now be in your main OSX Applications
list, ready to launch.

### Compiling on Windows with MSVC

Expand Down Expand Up @@ -221,7 +204,7 @@ Now compile:

$ make

If you additionaly want an NSIS installer:
If you additionally want an NSIS installer:

$ make package

Expand All @@ -243,12 +226,11 @@ to download and compile the code as described on the

If SQLCipher is installed, simply follow the standard instructions for your
platform but enable the 'sqlcipher' build option by replacing any calls to
cmake and qmake like this:
cmake like this:
```
If it says... Change it to...
cmake cmake -Dsqlcipher=1
cmake .. cmake -Dsqlcipher=1 ..
qmake qmake CONFIG+=sqlcipher
```

## Building and running the Unit Tests
Expand Down
Loading

0 comments on commit ed4f706

Please sign in to comment.