Skip to content

Commit 01b1bee

Browse files
view changes to get around collisions
1 parent eb24368 commit 01b1bee

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

QMLComponents/utilities/appdirs.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ QString AppDirs::bundledModulesDir()
8080
#ifdef _WIN32
8181
auto env = DynamicRuntimeInfo::getInstance()->getRuntimeEnvironment();
8282
bool useAppdata = env != DynamicRuntimeInfo::MSIX && env != DynamicRuntimeInfo::ZIP;
83-
folder = useAppdata ? programDir().absoluteFilePath("Modules") + '/' : appData(false) + "/BundledJASPModules-" + AppInfo::gitCommit + "-" + AppInfo::builddate + "/";
83+
folder = useAppdata ? programDir().absoluteFilePath("Modules") + '/' : appData(false) + "/BundledJASPModules_" + QString(AppInfo::version.asString(4).c_str()) + "_" + QString(AppInfo::gitCommit.substr(0, 7).c_str()) + "_" + QString(AppInfo::builddate.c_str()).replace(":", "-").replace(" ", "") + "/";
8484
#elif __APPLE__
8585
folder = programDir().absoluteFilePath("../Modules/");
8686
#elif FLATPAK_USED

QMLComponents/utilities/dynamicruntimeinfo.cpp

+9-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ bool DynamicRuntimeInfo::bundledModulesInitialized()
2828
res = _bundledModulesInitializedSet
2929
&& _initializedByCommit == AppInfo::gitCommit
3030
&& _initializedByBuildDate == AppInfo::builddate
31-
&& _initializedForRVersion == AppInfo::getRVersion();
31+
&& _initializedForRVersion == AppInfo::getRVersion()
32+
&& _initializedForJaspVersion == AppInfo::version.asString(4);
3233

3334
return res;
3435
}
@@ -100,6 +101,7 @@ bool DynamicRuntimeInfo::parseDynamicRuntimeInfoFile(const std::string &path)
100101
_initializedByCommit = root.get("commit", "").asString();
101102
_initializedByBuildDate = root.get("buildDate", "").asString();
102103
_initializedForRVersion = root.get("RVersion", "").asString();
104+
_initializedForJaspVersion = root.get("jaspVersion", "").asString();
103105
_initializedOn = root.get("initTimestamp", 0).asUInt64();
104106

105107
return true;
@@ -117,6 +119,7 @@ bool DynamicRuntimeInfo::writeDynamicRuntimeInfoFile()
117119
}
118120

119121
Json::Value root;
122+
root["jaspVersion"] = AppInfo::version.asString(4);
120123
root["initialized"] = true;
121124
root["commit"] = AppInfo::gitCommit;
122125
root["buildDate"] = AppInfo::builddate;
@@ -158,3 +161,8 @@ std::string DynamicRuntimeInfo::bundledModulesInitializedRVersion()
158161
{
159162
return _initializedForRVersion;
160163
}
164+
165+
std::string DynamicRuntimeInfo::bundledModulesInitializedJaspVersion()
166+
{
167+
return _initializedForJaspVersion;
168+
}

QMLComponents/utilities/dynamicruntimeinfo.h

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class DynamicRuntimeInfo
3333
std::string bundledModulesInitializedByCommit();
3434
std::string bundledModulesInitializedByBuildDate();
3535
std::string bundledModulesInitializedRVersion();
36+
std::string bundledModulesInitializedJaspVersion();
3637

3738
static bool writeDynamicRuntimeInfoFile();
3839

@@ -55,6 +56,7 @@ class DynamicRuntimeInfo
5556
std::string _initializedByCommit = "build";
5657
std::string _initializedForRVersion = "build";
5758
std::string _initializedByBuildDate = "build";
59+
std::string _initializedForJaspVersion = "build";
5860
uint64_t _initializedOn = 0;
5961

6062
static DynamicRuntimeInfo* _instance;

Tools/CMake/JASP.cmake

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ set(JASP_VERSION_TWEAK ${PROJECT_VERSION_TWEAK})
4242
set(JASP_VERSION ${CMAKE_PROJECT_VERSION})
4343
set(JASP_SHORT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
4444

45+
set(JASP_VERSION_MSIX_PATCH_POSTFIX
46+
"000"
47+
CACHE STRING "Microsoft does not allow packages of same version to be uploaded to store and forces TWEAK 0, so we add a large version postfix to PATCH in the appmanifest in case we publish a broken version and wish to switch it out. Nobody sees it anyway")
48+
4549
message(STATUS "Version: ${CMAKE_PROJECT_VERSION}")
4650

4751
# TODO:

Tools/windows/msix/AppxManifest.xml.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities">
99

1010
<Identity Name="45842JASP.JASP"
11-
Version="@JASP_VERSION@"
11+
Version="@JASP_VERSION_MAJOR@.@JASP_VERSION_MINOR@.@JASP_VERSION_PATCH@@JASP_VERSION_MSIX_PATCH_POSTFIX@.@JASP_VERSION_TWEAK@"
1212
Publisher="CN=044465FF-CD1D-4EC4-B82B-C244199F66F9"
1313
ProcessorArchitecture="x64"/>
1414

0 commit comments

Comments
 (0)