[aseprite] 23/196: Define PACKAGE/VERSION/UPDATE_URL if they are undefined
Tobias Hansen
thansen at moszumanska.debian.org
Wed Apr 20 18:49:56 UTC 2016
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository aseprite.
commit 260f597cc4913acc8cb3392b860f2a279d322403
Author: David Capello <davidcapello at gmail.com>
Date: Thu Mar 3 19:26:46 2016 -0300
Define PACKAGE/VERSION/UPDATE_URL if they are undefined
---
src/she/win/window_dde.cpp | 5 +++++
src/updater/check_update.cpp | 5 +++++
src/updater/user_agent.cpp | 14 ++++++++++++--
3 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/src/she/win/window_dde.cpp b/src/she/win/window_dde.cpp
index 12baa42..c4028d9 100644
--- a/src/she/win/window_dde.cpp
+++ b/src/she/win/window_dde.cpp
@@ -131,6 +131,11 @@ bool handle_dde_messages(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, LRES
std::string topic = get_atom_string((ATOM)topicAtom, useUnicode);
FreeDDElParam(msg, lparam);
+#ifndef PACKAGE
+#define PACKAGE ""
+#pragma message("warning: Define PACKAGE macro with your app name")
+#endif
+
if (app != PACKAGE) {
return false;
}
diff --git a/src/updater/check_update.cpp b/src/updater/check_update.cpp
index c118e1a..a852e8d 100644
--- a/src/updater/check_update.cpp
+++ b/src/updater/check_update.cpp
@@ -99,6 +99,11 @@ public:
using namespace base;
using namespace net;
+#ifndef UPDATE_URL
+#define UPDATE_URL ""
+#endif
+#pragma message("warning: Define UPDATE_URL macro")
+
std::string url = UPDATE_URL;
if (!uuid.empty()) {
url += "&uuid=";
diff --git a/src/updater/user_agent.cpp b/src/updater/user_agent.cpp
index 0f2fe54..9b6f8d8 100644
--- a/src/updater/user_agent.cpp
+++ b/src/updater/user_agent.cpp
@@ -1,5 +1,5 @@
// Aseprite
-// Copyright (C) 2001-2015 David Capello
+// Copyright (C) 2001-2016 David Capello
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@@ -34,7 +34,17 @@ std::string getUserAgent()
{
std::stringstream userAgent;
- // ASEPRITE name and version
+ // App name and version
+
+#ifndef PACKAGE
+#define PACKAGE ""
+#pragma message("warning: Define PACKAGE macro")
+#endif
+
+#ifndef VERSION
+#define VERSION ""
+#pragma message("warning: Define VERSION macro")
+#endif
userAgent << PACKAGE << "/" << VERSION << " (";
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git
More information about the Pkg-games-commits
mailing list