Support new URDE versioning scheme

This commit is contained in:
Luke Street 2021-03-29 13:23:02 -04:00
parent 3f0615bf94
commit 170d999d1e
3 changed files with 15 additions and 9 deletions

View File

@ -47,8 +47,8 @@ QString ArchitectureToString(Architecture arch) {
return QStringLiteral("x86_64");
case Architecture::ARM:
return QStringLiteral("arm");
case Architecture::AARCH64:
return QStringLiteral("aarch64");
case Architecture::ARM64:
return QStringLiteral("arm64");
default:
return QString();
}
@ -77,6 +77,8 @@ QString VectorISAToString(VectorISA visa) {
return QStringLiteral("avx");
case VectorISA::AVX2:
return QStringLiteral("avx2");
case VectorISA::AVX512:
return QStringLiteral("avx512");
default:
return QString();
}
@ -92,7 +94,7 @@ VectorISA StringToVectorISA(const QString& str) {
URDEVersion::URDEVersion(const QString& filename) {
int idx;
QString useFilename = filename;
if ((idx = filename.lastIndexOf(QLatin1Char{'.'})) >= 0) {
if ((idx = filename.lastIndexOf(QLatin1Char{'.'})) > filename.lastIndexOf(QLatin1Char{'-'})) {
m_extension = QString(filename).remove(0, idx);
useFilename.truncate(idx);
}
@ -120,6 +122,10 @@ URDEVersion::URDEVersion(const QString& filename) {
state = platform;
}
if (state == platform) {
if (list[i] == QStringLiteral("dirty")) {
m_version += QLatin1Char{'-'} + list[i];
continue;
}
state = architecture;
Platform platValue = StringToPlatform(list[i]);
if (platValue != Platform::Invalid) {

View File

@ -18,14 +18,14 @@ constexpr Platform CurPlatform = Platform::Linux;
extern const QString CurPlatformString;
enum class Architecture { Invalid, X86, X86_64, ARM, AARCH64, MAXArchitecture };
enum class Architecture { Invalid, X86, X86_64, ARM, ARM64, MAXArchitecture };
QString ArchitectureToString(Architecture arch);
Architecture StringToArchitecture(const QString& str);
extern Architecture CurArchitecture;
extern QString CurArchitectureString;
enum class VectorISA { Invalid, X87, SSE, SSE2, SSE3, SSE41, AVX, AVX2, MAXVectorISA };
enum class VectorISA { Invalid, X87, SSE, SSE2, SSE3, SSE41, AVX, AVX2, AVX512, MAXVectorISA };
QString VectorISAToString(VectorISA visa);
VectorISA StringToVectorISA(const QString& str);

View File

@ -5,11 +5,11 @@
<key>CFBundleExecutable</key>
<string>hecl-gui</string>
<key>CFBundleGetInfoString</key>
<string>Version ALPHA</string>
<string>@URDE_WC_DESCRIBE@</string>
<key>CFBundleShortVersionString</key>
<string>ALPHA</string>
<string>@URDE_WC_DESCRIBE@</string>
<key>NSHumanReadableCopyright</key>
<string>2015-2021 AxioDL Team</string>
<string>2015-@CURRENT_YEAR@ AxioDL Team</string>
<key>CFBundleIconFile</key>
<string>mainicon.icns</string>
<key>CFBundleIdentifier</key>
@ -19,7 +19,7 @@
<key>CFBundleName</key>
<string>URDE</string>
<key>CFBundleVersion</key>
<string>ALPHA</string>
<string>@URDE_WC_DESCRIBE@</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>