mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-01 11:57:19 +02:00
With Ladybird now being its own repository, there's little reason to keep the Ladybird Android port in the SerenityOS repository. (The Qt port is useful to be able to test changes to LibWeb in lagom so it'll stay around. Similar for the AppKit port, since getting Qt on macOS is a bit annoying. But if the AppKit port is too much pain to keep working, we should toss that too. Eventually, the lagom browser ports should move out from Ladybird/ to Meta/Lagom/Contrib, but for now it might make sense to leave them where they are to keep cherry-picks from ladybird easier.)
61 lines
1.4 KiB
C++
61 lines
1.4 KiB
C++
/*
|
|
* Copyright (c) 2024, Tim Flynn <trflynn89@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Platform.h>
|
|
#include <AK/StringView.h>
|
|
|
|
namespace Web {
|
|
|
|
#if ARCH(X86_64)
|
|
# define CPU_STRING "x86_64"
|
|
#elif ARCH(AARCH64)
|
|
# define CPU_STRING "AArch64"
|
|
#elif ARCH(I386)
|
|
# define CPU_STRING "x86"
|
|
#elif ARCH(RISCV64)
|
|
# define CPU_STRING "RISC-V 64"
|
|
#else
|
|
# error Unknown architecture
|
|
#endif
|
|
|
|
#if defined(AK_OS_SERENITY)
|
|
# define OS_STRING "SerenityOS"
|
|
#elif defined(AK_OS_LINUX)
|
|
# define OS_STRING "Linux"
|
|
#elif defined(AK_OS_MACOS)
|
|
# define OS_STRING "macOS"
|
|
#elif defined(AK_OS_IOS)
|
|
# define OS_STRING "iOS"
|
|
#elif defined(AK_OS_WINDOWS)
|
|
# define OS_STRING "Windows"
|
|
#elif defined(AK_OS_FREEBSD)
|
|
# define OS_STRING "FreeBSD"
|
|
#elif defined(AK_OS_OPENBSD)
|
|
# define OS_STRING "OpenBSD"
|
|
#elif defined(AK_OS_NETBSD)
|
|
# define OS_STRING "NetBSD"
|
|
#elif defined(AK_OS_DRAGONFLY)
|
|
# define OS_STRING "DragonFly"
|
|
#elif defined(AK_OS_SOLARIS)
|
|
# define OS_STRING "SunOS"
|
|
#elif defined(AK_OS_HAIKU)
|
|
# define OS_STRING "Haiku"
|
|
#elif defined(AK_OS_GNU_HURD)
|
|
# define OS_STRING "GNU/Hurd"
|
|
#else
|
|
# error Unknown OS
|
|
#endif
|
|
|
|
#define BROWSER_NAME "Ladybird"
|
|
#define BROWSER_VERSION "1.0"
|
|
|
|
constexpr auto default_user_agent = "Mozilla/5.0 (" OS_STRING "; " CPU_STRING ") " BROWSER_NAME "/" BROWSER_VERSION ""sv;
|
|
constexpr auto default_platform = OS_STRING " " CPU_STRING ""sv;
|
|
|
|
}
|