Add CUSTOM_WEBSITE_URL option to test a local webserver

This commit is contained in:
David Capello 2014-06-02 21:31:44 -03:00
parent ed6c0f986d
commit 7ffce344bd
4 changed files with 10 additions and 2 deletions

View File

@ -44,6 +44,7 @@ option(ENABLE_UPDATER "Enable automatic check for updates" on)
option(ENABLE_WEBSERVER "Enable support to run a webserver (for HTML5 gamedev)" off)
option(ENABLE_TRIAL_MODE "Compile the trial version" off)
option(FULLSCREEN_PLATFORM "Enable fullscreen by default" off)
set(CUSTOM_WEBSITE_URL "" CACHE STRING "Enable custom local webserver to check updates")
######################################################################
# Profile build type

View File

@ -92,6 +92,10 @@ if (CMAKE_USE_PTHREADS_INIT)
set(sys_libs ${sys_libs} ${CMAKE_THREAD_LIBS_INIT})
endif()
if(NOT "${CUSTOM_WEBSITE_URL}" STREQUAL "")
add_definitions(-DCUSTOM_WEBSITE_URL="${CUSTOM_WEBSITE_URL}")
endif()
if(ENABLE_UPDATER)
if(USE_SHARED_CURL)
find_library(LIBCURL_LIBRARY NAMES curl)

View File

@ -34,9 +34,14 @@
// General information
#define PACKAGE "Aseprite"
#define VERSION "1.0.0-dev"
#ifdef CUSTOM_WEBSITE_URL
#define WEBSITE CUSTOM_WEBSITE_URL // To test web server
#else
#define WEBSITE "http://www.aseprite.org/"
#endif
#define WEBSITE_DOWNLOAD WEBSITE "download/"
#define WEBSITE_CONTRIBUTORS WEBSITE "contributors/"
#define UPDATE_URL WEBSITE "update/?xml=1"
#define COPYRIGHT "Copyright (C) 2001-2014 David Capello"
#define PRINTF verbose_printf

View File

@ -33,8 +33,6 @@
#include <iostream>
#include <sstream>
#define UPDATE_URL WEBSITE "update/?xml=1"
namespace updater {
CheckUpdateResponse::CheckUpdateResponse()