endforeach()
set(WINUAE_UNIX_VERSION "${WINUAE_UNIX_VERSION_MAJOR}.${WINUAE_UNIX_VERSION_MINOR}.${WINUAE_UNIX_VERSION_REVISION}")
+# od-unix/target.h mirrors the beta versioning from od-win32/win32.h; fail the
+# configure when the mirror drifts after an upstream rebase.
+set(WINUAE_WIN32_PUBLICBETA 0)
+set(WINUAE_WIN32_BETA "")
+set(WINUAE_UNIX_PUBLICBETA 0)
+set(WINUAE_UNIX_BETA "")
+file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/od-win32/win32.h" WINUAE_WIN32_BETA_LINES REGEX "^#define[ \t]+WINUAE(PUBLIC)?BETA[ \t]+")
+foreach(WINUAE_BETA_LINE IN LISTS WINUAE_WIN32_BETA_LINES)
+ if(WINUAE_BETA_LINE MATCHES "WINUAEPUBLICBETA[ \t]+([0-9]+)")
+ set(WINUAE_WIN32_PUBLICBETA "${CMAKE_MATCH_1}")
+ elseif(NOT WINUAE_WIN32_BETA_FOUND AND WINUAE_BETA_LINE MATCHES "WINUAEBETA[ \t]+_T\\(\"([^\"]*)\"\\)")
+ # First match is the #if WINUAEPUBLICBETA branch; the #else branch is always empty.
+ set(WINUAE_WIN32_BETA "${CMAKE_MATCH_1}")
+ set(WINUAE_WIN32_BETA_FOUND TRUE)
+ endif()
+endforeach()
+if(WINUAE_WIN32_PUBLICBETA EQUAL 0)
+ set(WINUAE_WIN32_BETA "")
+endif()
+file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/od-unix/target.h" WINUAE_UNIX_BETA_LINES REGEX "^#define[ \t]+WINUAE(PUBLIC)?BETA[ \t]+")
+foreach(WINUAE_BETA_LINE IN LISTS WINUAE_UNIX_BETA_LINES)
+ if(WINUAE_BETA_LINE MATCHES "WINUAEPUBLICBETA[ \t]+([0-9]+)")
+ set(WINUAE_UNIX_PUBLICBETA "${CMAKE_MATCH_1}")
+ elseif(WINUAE_BETA_LINE MATCHES "WINUAEBETA[ \t]+\"([^\"]*)\"")
+ set(WINUAE_UNIX_BETA "${CMAKE_MATCH_1}")
+ endif()
+endforeach()
+if(NOT WINUAE_UNIX_PUBLICBETA STREQUAL WINUAE_WIN32_PUBLICBETA OR NOT WINUAE_UNIX_BETA STREQUAL WINUAE_WIN32_BETA)
+ message(FATAL_ERROR "od-unix/target.h beta mismatch: WINUAEPUBLICBETA=${WINUAE_UNIX_PUBLICBETA} WINUAEBETA=\"${WINUAE_UNIX_BETA}\" vs od-win32/win32.h WINUAEPUBLICBETA=${WINUAE_WIN32_PUBLICBETA} WINUAEBETA=\"${WINUAE_WIN32_BETA}\". Update the mirror block in od-unix/target.h.")
+endif()
+set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS od-win32/win32.h od-unix/target.h)
+
find_package(ZLIB REQUIRED)
if(WINUAE_UNIX_WITH_LIBPNG)
if(APPLE AND CMAKE_PREFIX_PATH)
#include "launcher.h"
#include "mount_config.h"
#include "path_utils.h"
+#include "target.h"
+#include "winuae_builddate.h"
#ifndef WINUAE_UNIX_SOURCE_DIR
#define WINUAE_UNIX_SOURCE_DIR "."
static QString versionString()
{
- return QStringLiteral("WinUAE %1.%2.%3")
+ QString s = QStringLiteral("WinUAE %1.%2.%3")
.arg(WINUAE_UNIX_VERSION_MAJOR)
.arg(WINUAE_UNIX_VERSION_MINOR)
.arg(WINUAE_UNIX_VERSION_REVISION);
+ const QString date = QStringLiteral("%1.%2.%3")
+ .arg(GETBDY(WINUAEDATE))
+ .arg(GETBDM(WINUAEDATE), 2, 10, QLatin1Char('0'))
+ .arg(GETBDD(WINUAEDATE), 2, 10, QLatin1Char('0'));
+ const QString beta = QStringLiteral(WINUAEBETA);
+ if (!beta.isEmpty()) {
+ if (WINUAEPUBLICBETA == 2) {
+ s += QStringLiteral(" (DevAlpha %1, %2)").arg(beta, date);
+ } else {
+ s += QStringLiteral(" (%1Beta %2, %3)")
+ .arg(WINUAEPUBLICBETA > 0 ? QStringLiteral("Public ") : QString(), beta, date);
+ }
+ } else {
+ s += QStringLiteral(" (%1)").arg(date);
+ }
+#if defined(__aarch64__)
+ s += QStringLiteral(" ARM64");
+#elif defined(__x86_64__)
+ s += QStringLiteral(" x64");
+#endif
+ return s;
}
static QStringList contributorLines()
#define TARGET_NAME _T("unix")
#define OPTIONSFILENAME _T("default.uae")
+/* Effective beta versioning mirrored from od-win32/win32.h (WINUAEBETA is
+ * empty when upstream is not in a beta cycle). CMake fails the configure
+ * when these drift from win32.h after an upstream rebase. */
+#define WINUAEPUBLICBETA 1
+#define WINUAEBETA "9"
+
#define TARGET_ROM_PATH _T("~/")
#define TARGET_FLOPPY_PATH _T("~/")
#define TARGET_HARDFILE_PATH _T("~/")