From 91380e79bb775d173263d7d4b4f32103cf309c61 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 12 Feb 2021 00:50:18 +0100 Subject: [PATCH] Add MSVC 2005/2010 cores --- .gitlab-ci.yml | 30 ++++++++++++++++++++++++++++++ Makefile | 43 +++++++++++++++++++++++++++---------------- 2 files changed, 57 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1b84d24..84ca402 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,6 +21,18 @@ include: - project: 'libretro-infrastructure/ci-templates' file: '/windows-i686-mingw.yml' + # Windows msvc10 64-bit + - project: 'libretro-infrastructure/ci-templates' + file: '/windows-x64-msvc10-msys2.yml' + + # Windows msvc10 32-bit + - project: 'libretro-infrastructure/ci-templates' + file: '/windows-i686-msvc10-msys2.yml' + + # Windows msvc05 32-bit + - project: 'libretro-infrastructure/ci-templates' + file: '/windows-i686-msvc05-msys2.yml' + # Linux 64-bit - project: 'libretro-infrastructure/ci-templates' file: '/linux-x64.yml' @@ -111,6 +123,24 @@ libretro-build-windows-i686: - .libretro-windows-i686-mingw-make-default - .core-defs +# Windows msvc10 64-bit +libretro-build-windows-msvc10-x64: + extends: + - .libretro-windows-x64-msvc10-msys2-make-default + - .core-defs + +# Windows msvc10 32-bit +libretro-build-windows-msvc10-i686: + extends: + - .libretro-windows-i686-msvc10-msys2-make-default + - .core-defs + +# Windows msvc05 32-bit +libretro-build-windows-msvc05-i686: + extends: + - .libretro-windows-i686-msvc05-msys2-make-default + - .core-defs + # Linux 64-bit libretro-build-linux-x64: extends: diff --git a/Makefile b/Makefile index 81ea3cc..3f15e9a 100644 --- a/Makefile +++ b/Makefile @@ -476,19 +476,20 @@ PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../IDE") LIB := $(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../../VC/lib/amd64") INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../../VC/include") -WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')lib/x64 -WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')lib/x64 +WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*') +WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*') -WindowsSdkDirInc := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')Include -WindowsSdkDirInc ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')Include +WindowsSDKIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include") +WindowsSDKGlIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\gl") +WindowsSDKLibDir := $(shell cygpath -w "$(WindowsSdkDir)\Lib\x64") - -INCFLAGS_PLATFORM = -I"$(WindowsSdkDirInc)" -export INCLUDE := $(INCLUDE) -export LIB := $(LIB);$(WindowsSdkDir) +INCFLAGS_PLATFORM = -I"$(WindowsSDKIncludeDir)" +export INCLUDE := $(INCLUDE);$(WindowsSDKIncludeDir);$(WindowsSDKGlIncludeDir) +export LIB := $(LIB);$(WindowsSDKLibDir) TARGET := $(TARGET_NAME)_libretro.dll PSS_STYLE :=2 LDFLAGS += -DLL + # Windows MSVC 2010 x86 else ifeq ($(platform), windows_msvc2010_x86) CC = cl.exe @@ -500,16 +501,19 @@ PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../IDE") LIB := $(shell IFS=$$'\n'; cygpath -w "$(VS100COMNTOOLS)../../VC/lib") INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../../VC/include") -WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')lib -WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')lib +WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*') +WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*') WindowsSdkDirInc := $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')Include WindowsSdkDirInc ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -o '[A-Z]:\\.*')Include +WindowsSDKIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include") +WindowsSDKGlIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\gl") +WindowsSDKLibDir := $(shell cygpath -w "$(WindowsSdkDir)\Lib\x64") -INCFLAGS_PLATFORM = -I"$(WindowsSdkDirInc)" -export INCLUDE := $(INCLUDE) -export LIB := $(LIB);$(WindowsSdkDir) +INCFLAGS_PLATFORM = -I"$(WindowsSDKIncludeDir)" +export INCLUDE := $(INCLUDE);$(WindowsSDKIncludeDir);$(WindowsSDKGlIncludeDir) +export LIB := $(LIB);$(WindowsSDKLibDir) TARGET := $(TARGET_NAME)_libretro.dll PSS_STYLE :=2 LDFLAGS += -DLL @@ -545,10 +549,17 @@ INCLUDE := $(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../../VC/include") LIB := $(shell IFS=$$'\n'; cygpath -w "$(VS80COMNTOOLS)../../VC/lib") BIN := $(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../../VC/bin") -WindowsSdkDir := $(INETSDK) +WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs\8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3" -v "Install Dir" | grep -o '[A-Z]:\\.*') -export INCLUDE := $(INCLUDE);$(INETSDK)/Include;libretro/libretro-common/include/compat/msvc -export LIB := $(LIB);$(WindowsSdkDir);$(INETSDK)/Lib +WindowsSDKIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include") +WindowsSDKAtlIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\atl") +WindowsSDKCrtIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\crt") +WindowsSDKGlIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\gl") +WindowsSDKMfcIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\mfc") +WindowsSDKLibDir := $(shell cygpath -w "$(WindowsSdkDir)\Lib") + +export INCLUDE := $(INCLUDE);$(WindowsSDKIncludeDir);$(WindowsSDKAtlIncludeDir);$(WindowsSDKCrtIncludeDir);$(WindowsSDKGlIncludeDir);$(WindowsSDKMfcIncludeDir);libretro/libretro-common/include/compat/msvc +export LIB := $(LIB);$(WindowsSDKLibDir) TARGET := $(TARGET_NAME)_libretro.dll PSS_STYLE :=2 LDFLAGS += -DLL