-
Notifications
You must be signed in to change notification settings - Fork 278
Building Toggl Desktop from source for usage with live servers
The apps on all platforms are created so that when building they all build the app to connect to our testing environment. This is a short guide on how to compile Toggl Desktop from source to be used with the live servers.
On OS X you have to change the KopsikEnvironment variable in the src/ui/osx/TogglDesktop/test2/TogglDesktop-Info.plist
file. Replace development
with production
before building.
and
Remove these lines from the beginning of src/context.cc
urls::SetUseStagingAsBackend(
app_version.find("7.0.0") != std::string::npos);
Disabling updates checks
Nothing special is needed, the updater is disabled by default in development.
On Windows you have to change the Environment setting variable in the src/ui/windows/TogglDesktop/TogglDesktop/App.config
file. Replace development
with production
before building the app and you are good to go.
If you are using cygwin this action can be complete with this one line sed command:
sed -i.bak "s/development/production/g" src/ui/windows/TogglDesktop/TogglDesktop/App.config
Also remove these lines from the beginning of src/context.cc
urls::SetUseStagingAsBackend(
app_version.find("7.0.0") != std::string::npos);
To disable updates checks to the following
Set the default value of update_check_disabled_
to true in context.cc
update_check_disabled_(false) ==>> update_check_disabled_(true)
Both setting the app to use the production servers and handling update checks is now done using CMake flags:
Before compiling, use the following CMake flags:
- TOGGL_PRODUCTION_BUILD (binary)
- TOGGL_ALLOW_UPDATE_CHECK (binary)
- TOGGL_VERSION (string) - not necessary, but good to have
So your CMake commandline would look like this, for example:
cmake .. -DTOGGL_PRODUCTION_BUILD=ON -DTOGGL_ALLOW_UPDATE_CHECK=ON -DTOGGL_VERSION=7.4.410