Skip to content

Commit

Permalink
version 2.3.1 with new config format to detect and notify user of upd…
Browse files Browse the repository at this point in the history
…ated version available (without blocking the current one right away)

order and items of config file changed
  • Loading branch information
kusterjs committed Jun 4, 2023
1 parent 3ee50d1 commit d003791
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions CCAMS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,15 +637,14 @@ void CCAMS::DoInitialLoad(future<string> & fmessage)
string DisplayMsg = "Update string downloaded: " + message;
DisplayUserMessage(MY_PLUGIN_NAME, "Debug", DisplayMsg.c_str(), true, false, false, false, false);
#endif
if (regex_match(message, match, regex("(\\d+)[:](\\d+)[:]([^:]+)[:]([A-Z,]+)", regex::icase)))
if (regex_match(message, match, regex("(\\d+)[:](\\d+)[:]([A-Z,]+)[:]([^:]+)", regex::icase)))
{
int mnm_v = stoi(match[2].str(), nullptr, 0);
if (mnm_v > MY_PLUGIN_VERSIONCODE)
if (stoi(match[2].str(), nullptr, 0) > MY_PLUGIN_VERSIONCODE)
throw error{ "Your " + string { MY_PLUGIN_NAME } + " plugin (version " + MY_PLUGIN_VERSION + ") is outdated and the automatic code assignment therefore not available. Please change to the latest version.\n\nVisit https://github.com/kusterjs/CCAMS/releases" };
else
pluginVersionCheck = true;

if (stoi(match[1].str()) > mnm_v)
if (stoi(match[1].str(), nullptr, 0) > MY_PLUGIN_VERSIONCODE)
{
DisplayUserMessage(MY_PLUGIN_NAME, "Update", "An update for the CCAMS plugin is available. Please visit https://github.com/kusterjs/CCAMS/releases and download the latest version.", true, true, false, true, false);
}
Expand Down
2 changes: 1 addition & 1 deletion CCAMS.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ using namespace EuroScopePlugIn;
#else
#define MY_PLUGIN_VERSION "2.3.1"
#endif
#define MY_PLUGIN_VERSIONCODE 12
#define MY_PLUGIN_VERSIONCODE 13
#define MY_PLUGIN_UPDATE_URL "https://raw.githubusercontent.com/kusterjs/CCAMS/master/config2.txt"
//#define MY_PLUGIN_UPDATE_URL "https://raw.githubusercontent.com/kusterjs/CCAMS/1.8/config.txt"
#define MY_PLUGIN_DEVELOPER "Jonas Kuster, Pierre Ferran, Oliver Grützmann"
Expand Down

0 comments on commit d003791

Please sign in to comment.