Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Building Toggl Desktop from source for usage with live servers

Indrek V edited this page Feb 9, 2016 · 5 revisions

Introduction

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.

OS X

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 the app and you are good to go.

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

Nothing special needed, the updater is disabled by default.

Windows

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)

Linux

On linux you have to change the environment variable in the TogglDesktop.pro file. Replace development with production before building the app and you are good to go.

This can also be done with one line sed command:

sed -i.bak "s/development/production/g" src/ui/linux/TogglDesktop/TogglDesktop.pro

Also remove these lines from the beginning of src/context.cc

    urls::SetUseStagingAsBackend(
        app_version.find("7.0.0") != std::string::npos);

To disable update checks do the following

Set the default value of update_check_disabled_ to true in context.cc

update_check_disabled_(false) ==>> update_check_disabled_(true)

Clone this wiki locally