Manage your tasks and timesheet on TimeCamp, right from your desktop.
Start timers, create projects, do everything that can be done on the web version.
Linux/macOS (Travis) | Linux (Shippable) | Windows | SonarCloud | Codacy | CodeFactor |
---|---|---|---|---|---|
The project structure tree looks like this:
cmake
- cmake-specific helpers for various OSes and for Qtres
- resource files; icons, images, desktop shortcut templatessrc
- source filesOverrides
- various classes that override default Qt functionality
(like hijacking clicks to external websites to open them in default OS browser)*Other directories*
- directories created for classes that have OS-dependent functionality, eg:DataCollector
- with
WindowEvents.cpp
as the base class (with shared functionality, like data saving), - and
WindowEvents_W.cpp
as a subclass with functionality for Windows (collecting window names, etc)
- with
third-party
- code from other projects, that we use internally (currently LZ4 and QHotkey)- Files placed directly in root are for strictly organisational purposes, eg:
.gitignore
,.editorconfig
,CMakeLists.txt
andREADME.md
- For ease of deployment, our
deploy_*
scripts are also in the root. This might change in future versions.
These instructions will get you a copy of the project up and running on your machine for development and testing purposes.
See Creating installers for notes on how to make packages for Windows, macOS and Linux.
To compile TimeCamp Desktop you need:
-
Qt 5.9 or greater (remember to select the latest version during Qt instalation)
- you don't need Qt Sources and other components, eg. Android or iOS;
you can deselect everything except your OS package and Qt WebEngine
- you don't need Qt Sources and other components, eg. Android or iOS;
-
and either a CMake-compatible IDE
(Qt Creator, JetBrains CLion, Microsoft Visual Studio 2017)
- they can load this repo as a native project -
... or just CMake (at least v. 3.1), which can generate project files for many other IDEs and build systems
(eg. XCode, Code::Blocks, Eclipse, Ninja Build System, older MS Visual Studios, or plain old Makefiles)
Start by Installing Qt.
Make sure you have all of the required tools
- install with your favourite package manager:
git, cmake, clang/gcc/msvc
Get this repo:
git clone [email protected]:timecamp/timecamp-desktop.git
To compile our code you need to make a CMakeProjectConfig.cmake
file.
Copy and rename CMakeProjectConfig.cmake.example
and modify the path pointing to Qt precompiled libs.
You can also add path to Qt to the PATH
enviroment variable - it will help with packaging installer and signing the binaries.
cp CMakeProjectConfig.cmake.example CMakeProjectConfig.cmake
# now edit the copied file and change path to Qt within
#
# optional: to add Qt to $PATH environment variable do:
export PATH=$PATH:/your/qt/install/dir
(Optional) Generate project files for your IDE, eg. XCode on Mac, in a subdirectory:
mkdir cmake-build-xcode
cd cmake-build-xcode
cmake -G Xcode -B ..
Where Xcode
is generator of your choosing, and cmake-build-xcode
is where project files will be created.
Now you can open it in your IDE of choice. You are ready to go!
We compile TimeCamp Desktop with MSVC on Windows, Clang on macOS and GCC on Linux.
Both Qt Creator and CLion allow you to choose the compiler in settings in their GUI.
Other combinations are sometimes possible, but are not used by us right now. We already checked these:
- Windows
- MSVC - Microsoft Visual Studio Compiler
- you can use it in eg. Qt Creator, CLion and MS Visual Studio
- not
MinGW- QtWebEngine can't be built on Windows using this toolchain, and we depend on QtWebEngine
- not
Clang- same as above, but Chromium for Windows is now being built using Clang by default,
and QtWebEngine is based on Chromium, so maybe it will be available soon
- same as above, but Chromium for Windows is now being built using Clang by default,
- MSVC - Microsoft Visual Studio Compiler
- macOS
- Clang
- you can use it in eg. Qt Creator, CLion and XCode-generated project
- not
GCC- we had some troubles with our macOS-related Objective-C++ mixed code (status widget),
with Clang it works out of the box - but you can submit patches to get us gcc compatibility!
- we had some troubles with our macOS-related Objective-C++ mixed code (status widget),
- Clang
- Linux
- GCC
- Clang
- Qt precompiled with gcc is available for download on qt.io,
but you can use it with clang as well, as it is mostly GCC compatible; ("In most cases, code "just works".") - or you can compile Qt with clang yourself!
- Qt precompiled with gcc is available for download on qt.io,
Our installers are created with:
- Windows
windeployqt
- a Qt Deployment Tool, which pulls in Qt dynamic libraries and dependenciesNSIS
- Nullsoft Scriptable Install System, with our proprietary script (not in this repo)
- macOS
macdeployqt
- a Qt Deployment Tool, which pulls in Qt libraries and dependencies, and creates an App Bundlecreate-dmg
- a Node.js script for creating DMG packages
- Linux
linuxdeployqt
- a Community-created Deployment Tool, which pulls in Qt libraries and dependenciesappimagetool
- a creator of runnable packages for Linux in AppImage format
Additionally, our Windows and macOS installers are being signed with TimeCamp certificates.
For more details see deploy_win.bat
, deploy_mac.sh
and deploy_lin.sh
scripts.
Source:
- Qt [LGPLv3] - we're using it under LGPLv3 license, with prebuilt binaries provided on their website
- QHotkey [BSD 3-Clause] - globally working hotkeys for Windows, macOS and Linux
- LZ4 [BSD 2-Clause] - for reading Firefox data (see
FirefoxUtils.cpp
) - mini-cmake-qt [Unlicensed] - a template for the simplest possible version of a working, multi-platform Qt5 project
- Previous TimeCamp Desktop App - sources for macOS widgets and data collecting
Tools:
- SQLite - local database
- EditorConfig - consistent coding style (see
.editorconfig
for more info)
- Karol Olszacki - Initial work
See also the list of contributors who participated in this project.