-
Notifications
You must be signed in to change notification settings - Fork 115
Compile
Important: currently the Sultan POS supported by Qt 5.x only. And have no plan of supporting Qt 6.x. For Windows please use Qt MinGW version.
There are 2 ways to compile the project
- Using Qt Framework Bundle
- Using Qt from OS (Only for Linux)
This can be work on Mac, Windows and Linux
- Clone the project to your local computer
- On Ubuntu need to install :
$ sudo apt-get install build-essential libcups2-dev
- Download and install the latest framework based on your architecture here : download
- Open Qt Creator and go to 'File' -> 'Open Project'. Navigate to sultan.pro.
- When show the configuration window, just click on configure
- Click Run icon at the bottom left of the Qt Creator window.
This is for Ubuntu distribution
- Install requirement software
$ sudo apt-get install build-essential qt5-default libqt5sql5-mysql libqt5sql5-sqlite libqt5websockets5-dev libqt5printsupport5 libqt5webkit5-dev libcups2-dev sqlite3
- Clone the project to your local computer
- CD to root directory project and create a build directory
$ mkdir build
- CD to build folder
$ cd build
- run qmake
$ qmake CONFIG+=debug ../sultan.pro
- run make
$ make -j4
- add execute permission
$ chmod +x bin/Sultan.sh
- run the app
$ bin/Sultan.sh
By default the project will compile the project separated on each lib (libdb, libserver, libgui, libprint), this setup actually for development purpose because it is easier to track the files. When on release the project can be compile into only 1 file binary which is Sultan file only (no shared library). This can achieve by pass SINGLEBIN option to the config when calling the qmake.
$ qmake CONFIG+=release CONFIG+=SINGLEBIN ../sultan.pro
When using the Qt Creator, just go to project -> build steps and add additional arguments on qmake step
CONFIG+=SINGLEBIN
- SINGLEBIN : described above
- USE_EMBED_BROWSER : this will use internal browser (QWebView or QWebEngine)
- USE_WEBENGINE : this can be use when USE_EMBED_BROWSER is activated. Use QWebEngine instead of QWebView.
- NO_PRINTER_SPOOL : disable printer spool (winspool printer / cups)
- NO_PRINTER_DEVICE : disable printer device lp (on linux usually /dev/lp or /dev/usb/lp0)
- USE_LIBUSB : enable printer using libusb (direct send the printer command to usb - no need usb driver on linux)
Currently the app support for SQlite and Mysql. Using SQlite is the easier way to make the app running. But if you want to use Mysql, it will need several steps :
- Install mysql server
- When start the Sultan app on configuration window. Select database to MySql and setup the value as your mysql setting.
Sultan POS use web view to get OAuth2 login from Google. There are 2 options to use:
- QWebView : deprecated since Qt 5.6. If you want to use it on latest version of Qt, please compile it on your own. Or just use Qt 5.5 for easier.
- QWebEngineView : on Windows available only on Qt with MVC 2015+ compiler
Update version 1712xx the oauth request will be send to OS web browser, so no need QWebView or QWebEngine unless the USE_EMBED_BROWSER flag activated