Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ Once the updater has been started, it:

To customize the application name, organization and messages displayed by the updater:

1. Edit the AppInfo class (in AppInfo.h, AppInfo.cpp) to set the name
of the application and associated organization.
1. Compile passing to cmake the strings you want for the AppInfo class, for
example: `cmake .. -DDAPPINFO_APPLICATION_NAME="\"My App Name\""`
2. Replace the icons in src/resources
3. Change the product name and organization in src/resources/updater.rc
4. If you are building the updater on Windows and have a suitable Authenticode
Expand Down
2 changes: 1 addition & 1 deletion src/AppInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ std::string AppInfo::updateErrorMessage(const std::string& details)
std::string result = "There was a problem installing the update:\n\n";
result += details;
result += "\n\nYou can try downloading and installing the latest version of "
"Mendeley Desktop from http://www.mendeley.com/download-mendeley-desktop";
APPINFO_APPLICATION_NAME " from " APPINFO_URL;
return result;
}

6 changes: 3 additions & 3 deletions src/AppInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ class AppInfo

inline std::string AppInfo::name()
{
return "Mendeley Updater";
return APPINFO_UPDATER_NAME;
}

inline std::string AppInfo::appName()
{
return "Mendeley Desktop";
return APPINFO_APPLICATION_NAME;
}

inline std::string AppInfo::organizationName()
{
return "Mendeley Ltd.";
return APPINFO_COMPANY_NAME;
}

20 changes: 20 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,26 @@ endif()

add_definitions(-DTIXML_USE_STL)

if (NOT DEFINED APPINFO_APPLICATION_NAME)
set(APPINFO_APPLICATION_NAME "\"Mendeley Desktop\"")
endif()
add_definitions(-DAPPINFO_APPLICATION_NAME=${APPINFO_APPLICATION_NAME})

if (NOT DEFINED APPINFO_COMPANY_NAME)
set(APPINFO_COMPANY_NAME "\"Mendeley Ltd.\"")
endif()
add_definitions(-DAPPINFO_COMPANY_NAME=${APPINFO_COMPANY_NAME})

IF (NOT DEFINED APPINFO_UPDATER_NAME)
set(APPINFO_UPDATER_NAME "\"Mendeley Updater\"")
endif()
add_definitions(-DAPPINFO_UPDATER_NAME=${APPINFO_UPDATER_NAME})

IF (NOT DEFINED APPINFO_URL)
set(APPINFO_URL "\"http://www.mendeley.com/download-mendeley-desktop\"")
endif()
add_definitions(-DAPPINFO_URL=${APPINFO_URL})

set (SOURCES
AppInfo.cpp
DirIterator.cpp
Expand Down