Merge branch 'master' of https://github.com/86Box/86Box into qt
This commit is contained in:
@@ -24,13 +24,50 @@ project(86Box
|
|||||||
HOMEPAGE_URL "https://86box.net"
|
HOMEPAGE_URL "https://86box.net"
|
||||||
LANGUAGES C CXX)
|
LANGUAGES C CXX)
|
||||||
|
|
||||||
if(WIN32 AND VCPKG_TOOLCHAIN)
|
include(CPack)
|
||||||
if(VCPKG_TARGET_TRIPLET MATCHES "-windows-static$")
|
include(CMakeDependentOption)
|
||||||
# `-static` triplet, use the statically linked CRT
|
|
||||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
# Basic build options
|
||||||
|
if(WIN32)
|
||||||
|
if(VCPKG_TOOLCHAIN)
|
||||||
|
# For vcpkg builds we have to respect the linking method used by the
|
||||||
|
# specified triplet.
|
||||||
|
set(NO_STATIC_OPTION ON)
|
||||||
|
if(VCPKG_TARGET_TRIPLET MATCHES "-windows-static$")
|
||||||
|
# `-static` triplet, use static linking
|
||||||
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
set(STATIC_BUILD ON)
|
||||||
|
elseif(VCPKG_TARGET_TRIPLET MATCHES "-windows-static-md$")
|
||||||
|
# `-static-md` triplet, use static linking with dynamic CRT
|
||||||
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
||||||
|
set(STATIC_BUILD ON)
|
||||||
|
elseif()
|
||||||
|
# Regular triplet, use dynamic linking
|
||||||
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
||||||
|
set(STATIC_BUILD OFF)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Prefer static builds on Windows
|
||||||
|
set(PREFER_STATIC ON)
|
||||||
|
|
||||||
|
# Default value for the `WIN32` target property, which specifies whether
|
||||||
|
# to build the application for the Windows GUI or console subsystem
|
||||||
|
option(CMAKE_WIN32_EXECUTABLE "Build a Windows GUI executable" ON)
|
||||||
|
else()
|
||||||
|
# Prefer dynamic builds everywhere else
|
||||||
|
set(PREFER_STATIC OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(APPLE)
|
||||||
|
option(CMAKE_MACOSX_BUNDLE "Build a macOS bundle (.app)" ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT NO_STATIC_OPTION)
|
||||||
|
if(PREFER_STATIC)
|
||||||
|
option(STATIC_BUILD "Static build" ON)
|
||||||
else()
|
else()
|
||||||
# Regular triplet (or `-static-md`), use the dynamically linked CRT
|
option(STATIC_BUILD "Static build" OFF)
|
||||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -42,10 +79,6 @@ if (NOT ARCH)
|
|||||||
set(ARCH unknown)
|
set(ARCH unknown)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(CPack)
|
|
||||||
|
|
||||||
include(CMakeDependentOption)
|
|
||||||
|
|
||||||
add_compile_definitions(CMAKE)
|
add_compile_definitions(CMAKE)
|
||||||
add_compile_definitions("$<$<CONFIG:Debug>:DEBUG>")
|
add_compile_definitions("$<$<CONFIG:Debug>:DEBUG>")
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
# Copyright 2021 David Hrdlička.
|
# Copyright 2021 David Hrdlička.
|
||||||
#
|
#
|
||||||
|
|
||||||
include(${CMAKE_CURRENT_LIST_DIR}/flags-gcc.cmake)
|
string(APPEND CMAKE_C_FLAGS_INIT " -march=armv8-a -mfloat-abi=hard")
|
||||||
|
string(APPEND CMAKE_CXX_FLAGS_INIT " -march=armv8-a -mfloat-abi=hard")
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS_INIT "-march=armv8-a -mfloat-abi=hard ${CMAKE_C_FLAGS_INIT}")
|
include(${CMAKE_CURRENT_LIST_DIR}/flags-gcc.cmake)
|
||||||
set(CMAKE_CXX_FLAGS_INIT "-march=armv8-a -mfloat-abi=hard ${CMAKE_CXX_FLAGS_INIT}")
|
|
@@ -14,7 +14,7 @@
|
|||||||
# Copyright 2021 David Hrdlička.
|
# Copyright 2021 David Hrdlička.
|
||||||
#
|
#
|
||||||
|
|
||||||
include(${CMAKE_CURRENT_LIST_DIR}/flags-gcc.cmake)
|
string(APPEND CMAKE_C_FLAGS_INIT " -march=armv7-a -mfloat-abi=hard ${CMAKE_C_FLAGS_INIT}")
|
||||||
|
string(APPEND CMAKE_CXX_FLAGS_INIT " -march=armv7-a -mfloat-abi=hard ${CMAKE_CXX_FLAGS_INIT}")
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS_INIT "-march=armv7-a -mfloat-abi=hard ${CMAKE_C_FLAGS_INIT}")
|
include(${CMAKE_CURRENT_LIST_DIR}/flags-gcc.cmake)
|
||||||
set(CMAKE_CXX_FLAGS_INIT "-march=armv7-a -mfloat-abi=hard ${CMAKE_CXX_FLAGS_INIT}")
|
|
@@ -14,7 +14,7 @@
|
|||||||
# Copyright 2021 David Hrdlička.
|
# Copyright 2021 David Hrdlička.
|
||||||
#
|
#
|
||||||
|
|
||||||
include(${CMAKE_CURRENT_LIST_DIR}/flags-gcc.cmake)
|
string(APPEND CMAKE_C_FLAGS_INIT " -m32 -march=i686 -msse2 -mfpmath=sse ${CMAKE_C_FLAGS_INIT}")
|
||||||
|
string(APPEND CMAKE_CXX_FLAGS_INIT " -m32 -march=i686 -msse2 -mfpmath=sse ${CMAKE_CXX_FLAGS_INIT}")
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS_INIT "-m32 -march=i686 -msse2 -mfpmath=sse ${CMAKE_C_FLAGS_INIT}")
|
include(${CMAKE_CURRENT_LIST_DIR}/flags-gcc.cmake)
|
||||||
set(CMAKE_CXX_FLAGS_INIT "-m32 -march=i686 -msse2 -mfpmath=sse ${CMAKE_CXX_FLAGS_INIT}")
|
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
# Copyright 2021 David Hrdlička.
|
# Copyright 2021 David Hrdlička.
|
||||||
#
|
#
|
||||||
|
|
||||||
include(${CMAKE_CURRENT_LIST_DIR}/flags-gcc.cmake)
|
string(APPEND CMAKE_C_FLAGS_INIT " -m64 -march=x86-64 -msse2 -mfpmath=sse ${CMAKE_C_FLAGS_INIT}")
|
||||||
|
string(APPEND CMAKE_CXX_FLAGS_INIT " -m64 -march=x86-64 -msse2 -mfpmath=sse ${CMAKE_CXX_FLAGS_INIT}")
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS_INIT "-m64 -march=x86-64 -msse2 -mfpmath=sse ${CMAKE_C_FLAGS_INIT}")
|
include(${CMAKE_CURRENT_LIST_DIR}/flags-gcc.cmake)
|
||||||
set(CMAKE_CXX_FLAGS_INIT "-m64 -march=x86-64 -msse2 -mfpmath=sse ${CMAKE_CXX_FLAGS_INIT}")
|
|
||||||
|
@@ -13,13 +13,23 @@
|
|||||||
# Copyright 2021 David Hrdlička.
|
# Copyright 2021 David Hrdlička.
|
||||||
#
|
#
|
||||||
|
|
||||||
set(CMAKE_CONFIGURATION_TYPES Debug;Release;Optimized)
|
# Define our flags
|
||||||
|
string(APPEND CMAKE_C_FLAGS_INIT " -fomit-frame-pointer -mstackrealign -Wall -fno-strict-aliasing")
|
||||||
|
string(APPEND CMAKE_CXX_FLAGS_INIT " -fomit-frame-pointer -mstackrealign -Wall -fno-strict-aliasing")
|
||||||
|
string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -g0 -O3")
|
||||||
|
string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -g0 -O3")
|
||||||
|
string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -ggdb -Og")
|
||||||
|
string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " -ggdb -Og")
|
||||||
|
string(APPEND CMAKE_C_FLAGS_OPTIMIZED_INIT " -march=native -mtune=native -O3 -ffp-contract=fast -flto")
|
||||||
|
string(APPEND CMAKE_CXX_FLAGS_OPTIMIZED_INIT " -march=native -mtune=native -O3 -ffp-contract=fast -flto")
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS_INIT "-fomit-frame-pointer -mstackrealign -Wall -fno-strict-aliasing")
|
# Set up the variables
|
||||||
set(CMAKE_CXX_FLAGS_INIT ${CMAKE_C_FLAGS_INIT})
|
foreach(LANG C;CXX)
|
||||||
set(CMAKE_C_FLAGS_RELEASE_INIT "-g0 -O3")
|
set(CMAKE_${LANG}_FLAGS "$ENV{${LANG}FLAGS} ${CMAKE_${LANG}_FLAGS_INIT}" CACHE STRING "Flags used by the ${LANG} compiler during all build types.")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE_INIT ${CMAKE_C_FLAGS_RELEASE_INIT})
|
mark_as_advanced(CMAKE_${LANG}_FLAGS)
|
||||||
set(CMAKE_C_FLAGS_DEBUG_INIT "-ggdb -Og")
|
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG_INIT ${CMAKE_C_FLAGS_DEBUG_INIT})
|
foreach(CONFIG RELEASE;DEBUG;OPTIMIZED)
|
||||||
set(CMAKE_C_FLAGS_OPTIMIZED_INIT "-march=native -mtune=native -O3 -ffp-contract=fast -flto")
|
set(CMAKE_${LANG}_FLAGS_${CONFIG} "${CMAKE_${LANG}_FLAGS_${CONFIG}_INIT}" CACHE STRING "Flags used by the ${LANG} compiler during ${CONFIG} builds.")
|
||||||
set(CMAKE_CXX_FLAGS_OPTIMIZED_INIT ${CMAKE_C_FLAGS_OPTIMIZED_INIT})
|
mark_as_advanced(CMAKE_${LANG}_FLAGS_${CONFIG})
|
||||||
|
endforeach()
|
||||||
|
endforeach()
|
@@ -64,9 +64,11 @@ if(WIN32 AND ARCH STREQUAL "i386")
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MINGW)
|
if(STATIC_BUILD)
|
||||||
target_link_options(86Box PRIVATE "-static")
|
if(MINGW OR UNIX)
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" ".dll.a")
|
target_link_options(86Box PRIVATE "-static")
|
||||||
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
@@ -104,7 +106,7 @@ target_link_libraries(86Box ${OPENAL_LIBRARY})
|
|||||||
|
|
||||||
find_package(SDL2 REQUIRED)
|
find_package(SDL2 REQUIRED)
|
||||||
include_directories(${SDL2_INCLUDE_DIRS})
|
include_directories(${SDL2_INCLUDE_DIRS})
|
||||||
if(WIN32 AND TARGET SDL2::SDL2-static)
|
if(STATIC_BUILD AND TARGET SDL2::SDL2-static)
|
||||||
target_link_libraries(86Box SDL2::SDL2-static)
|
target_link_libraries(86Box SDL2::SDL2-static)
|
||||||
elseif(TARGET SDL2::SDL2)
|
elseif(TARGET SDL2::SDL2)
|
||||||
target_link_libraries(86Box SDL2::SDL2)
|
target_link_libraries(86Box SDL2::SDL2)
|
||||||
@@ -156,7 +158,7 @@ if(MINITRACE)
|
|||||||
target_link_libraries(86Box minitrace)
|
target_link_libraries(86Box minitrace)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32 OR APPLE)
|
if(WIN32 OR (APPLE AND CMAKE_MACOSX_BUNDLE))
|
||||||
# Copy the binary to the root of the install prefix on Windows and macOS
|
# Copy the binary to the root of the install prefix on Windows and macOS
|
||||||
install(TARGETS 86Box DESTINATION ".")
|
install(TARGETS 86Box DESTINATION ".")
|
||||||
else()
|
else()
|
||||||
|
@@ -9,6 +9,8 @@ LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
|
|||||||
#pragma code_page(65001)
|
#pragma code_page(65001)
|
||||||
#endif //_WIN32
|
#endif //_WIN32
|
||||||
|
|
||||||
|
#define AUTHORS
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Menu
|
// Menu
|
||||||
@@ -78,12 +80,12 @@ BEGIN
|
|||||||
POPUP "&Tipo de tela VGA"
|
POPUP "&Tipo de tela VGA"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "&Cor RGB", IDM_VID_GRAY_RGB
|
MENUITEM "&Cor RGB", IDM_VID_GRAY_RGB
|
||||||
MENUITEM "Escala de cinza &RGB", IDM_VID_GRAY_MONO
|
MENUITEM "Tons de cinza &RGB", IDM_VID_GRAY_MONO
|
||||||
MENUITEM "Monitor &âmbar", IDM_VID_GRAY_AMBER
|
MENUITEM "Monitor &âmbar", IDM_VID_GRAY_AMBER
|
||||||
MENUITEM "Monitor &verde", IDM_VID_GRAY_GREEN
|
MENUITEM "Monitor &verde", IDM_VID_GRAY_GREEN
|
||||||
MENUITEM "Monitor &branco", IDM_VID_GRAY_WHITE
|
MENUITEM "Monitor &branco", IDM_VID_GRAY_WHITE
|
||||||
END
|
END
|
||||||
POPUP "Tipo de &conversão de escala de cinza"
|
POPUP "Tipo de &conversão de tons de cinza"
|
||||||
BEGIN
|
BEGIN
|
||||||
MENUITEM "BT&601 (NTSC/PAL)", IDM_VID_GRAYCT_601
|
MENUITEM "BT&601 (NTSC/PAL)", IDM_VID_GRAYCT_601
|
||||||
MENUITEM "BT&709 (HDTV)", IDM_VID_GRAYCT_709
|
MENUITEM "BT&709 (HDTV)", IDM_VID_GRAYCT_709
|
||||||
@@ -531,8 +533,8 @@ BEGIN
|
|||||||
IDS_2149 "Imagens de cassete (*.PCM;*.RAW;*.WAV;*.CAS)\0*.PCM;*.RAW;*.WAV;*.CAS\0Todos os arquivos (*.*)\0*.*\0"
|
IDS_2149 "Imagens de cassete (*.PCM;*.RAW;*.WAV;*.CAS)\0*.PCM;*.RAW;*.WAV;*.CAS\0Todos os arquivos (*.*)\0*.*\0"
|
||||||
IDS_2150 "Cartucho %i: %ls"
|
IDS_2150 "Cartucho %i: %ls"
|
||||||
IDS_2151 "Imagens de cartucho (*.A;*.B;*.JRC)\0*.A;*.B;*.JRC\0Todos os arquivos (*.*)\0*.*\0"
|
IDS_2151 "Imagens de cartucho (*.A;*.B;*.JRC)\0*.A;*.B;*.JRC\0Todos os arquivos (*.*)\0*.*\0"
|
||||||
IDS_2152 "Error initializing renderer"
|
IDS_2152 "Erro ao inicializar o renderizador"
|
||||||
IDS_2153 "OpenGL (3.0 Core) renderer could not be initialized. Use another renderer."
|
IDS_2153 "O renderizador OpenGL (Núcleo 3.0) não pôde ser inicializado. Use outro renderizador."
|
||||||
END
|
END
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
|
Reference in New Issue
Block a user