From dd34dad5a1e6e33b0c63c23efa7a246d86d2570a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Wed, 20 Sep 2023 09:36:01 +0200 Subject: [PATCH] vrclient: Build using makedep rules. CW-Bug-Id: #22729 --- Makefile.in | 17 +- vrclient_x64/Makefile.in | 197 ++++++++++++++++++ .../vrclient_x64.spec => vrclient.spec} | 0 vrclient_x64/vrclient_x64.spec | 4 + vrclient_x64/vrclient_x64/json_converter.cpp | 7 + vrclient_x64/vrclient_x64/vrclient_main.c | 7 +- 6 files changed, 214 insertions(+), 18 deletions(-) create mode 100644 vrclient_x64/Makefile.in rename vrclient_x64/{vrclient_x64/vrclient_x64.spec => vrclient.spec} (100%) create mode 100644 vrclient_x64/vrclient_x64.spec diff --git a/Makefile.in b/Makefile.in index 32f89af3..c4189bad 100644 --- a/Makefile.in +++ b/Makefile.in @@ -437,24 +437,11 @@ $(OBJ)/.wine-post-build32: ## vrclient ## -VRCLIENT_CFLAGS = -Wno-attributes -VRCLIENT_CXXFLAGS = -Wno-attributes -VRCLIENT_LDFLAGS = -static-libgcc -static-libstdc++ -ldl - -VRCLIENT_WINEMAKER_ARGS = \ - "-I$(VRCLIENT_SRC)/" \ - "-I$(VRCLIENT_SRC)/vrclient_x64/" - VRCLIENT_DEPENDS = wine $(eval $(call rules-source,vrclient,$(SRCDIR)/vrclient_x64)) -$(eval $(call rules-winemaker,vrclient,32,vrclient.dll)) -$(eval $(call rules-winemaker,vrclient,64,vrclient_x64.dll)) - -$(OBJ)/.vrclient-post-source: - mkdir -p $(VRCLIENT_OBJ32) && cp -a $(VRCLIENT_SRC)/vrclient_x64/vrclient_x64.spec $(VRCLIENT_OBJ32)/vrclient.spec - mkdir -p $(VRCLIENT_OBJ64) && cp -a $(VRCLIENT_SRC)/vrclient_x64/vrclient_x64.spec $(VRCLIENT_OBJ64)/vrclient_x64.spec - touch $@ +$(eval $(call rules-makedep,vrclient,32)) +$(eval $(call rules-makedep,vrclient,64)) ## diff --git a/vrclient_x64/Makefile.in b/vrclient_x64/Makefile.in new file mode 100644 index 00000000..b01ab196 --- /dev/null +++ b/vrclient_x64/Makefile.in @@ -0,0 +1,197 @@ +MODULE = vrclient.dll +MODULE_x64 = vrclient_x64.dll +IMPORTS = advapi32 + +EXTRADLLFLAGS = -mcygwin -static-libgcc -static-libstdc++ -ldl +EXTRADEFS = -DWINE_NO_LONG_TYPES -DGNUC + +C_SRCS = \ + vrclient_x64/flatapi.c \ + vrclient_x64/vrclient_main.c \ + vrclient_x64/winIVRApplications.c \ + vrclient_x64/winIVRChaperone.c \ + vrclient_x64/winIVRChaperoneSetup.c \ + vrclient_x64/winIVRClientCore.c \ + vrclient_x64/winIVRCompositor.c \ + vrclient_x64/winIVRControlPanel.c \ + vrclient_x64/winIVRDriverManager.c \ + vrclient_x64/winIVRExtendedDisplay.c \ + vrclient_x64/winIVRHeadsetView.c \ + vrclient_x64/winIVRInput.c \ + vrclient_x64/winIVRIOBuffer.c \ + vrclient_x64/winIVRMailbox.c \ + vrclient_x64/winIVRNotifications.c \ + vrclient_x64/winIVROverlay.c \ + vrclient_x64/winIVROverlayView.c \ + vrclient_x64/winIVRRenderModels.c \ + vrclient_x64/winIVRResources.c \ + vrclient_x64/winIVRScreenshots.c \ + vrclient_x64/winIVRSettings.c \ + vrclient_x64/winIVRSystem.c \ + vrclient_x64/winIVRTrackedCamera.c \ + +CXX_SRCS = \ + vrclient_x64/cppIVRApplications_IVRApplications_001.cpp \ + vrclient_x64/cppIVRApplications_IVRApplications_002.cpp \ + vrclient_x64/cppIVRApplications_IVRApplications_003.cpp \ + vrclient_x64/cppIVRApplications_IVRApplications_004.cpp \ + vrclient_x64/cppIVRApplications_IVRApplications_005.cpp \ + vrclient_x64/cppIVRApplications_IVRApplications_006.cpp \ + vrclient_x64/cppIVRApplications_IVRApplications_007.cpp \ + vrclient_x64/cppIVRChaperone_IVRChaperone_002.cpp \ + vrclient_x64/cppIVRChaperone_IVRChaperone_003.cpp \ + vrclient_x64/cppIVRChaperone_IVRChaperone_004.cpp \ + vrclient_x64/cppIVRChaperoneSetup_IVRChaperoneSetup_004.cpp \ + vrclient_x64/cppIVRChaperoneSetup_IVRChaperoneSetup_005.cpp \ + vrclient_x64/cppIVRChaperoneSetup_IVRChaperoneSetup_006.cpp \ + vrclient_x64/cppIVRClientCore_IVRClientCore_002.cpp \ + vrclient_x64/cppIVRClientCore_IVRClientCore_003.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_005.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_006.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_007.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_008.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_009.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_010.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_011.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_012.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_013.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_014.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_015.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_016.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_017.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_018.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_019.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_020.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_021.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_022.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_024.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_026.cpp \ + vrclient_x64/cppIVRCompositor_IVRCompositor_027.cpp \ + vrclient_x64/cppIVRControlPanel_IVRControlPanel_006.cpp \ + vrclient_x64/cppIVRDriverManager_IVRDriverManager_001.cpp \ + vrclient_x64/cppIVRExtendedDisplay_IVRExtendedDisplay_001.cpp \ + vrclient_x64/cppIVRHeadsetView_IVRHeadsetView_001.cpp \ + vrclient_x64/cppIVRInput_IVRInput_003.cpp \ + vrclient_x64/cppIVRInput_IVRInput_004.cpp \ + vrclient_x64/cppIVRInput_IVRInput_005.cpp \ + vrclient_x64/cppIVRInput_IVRInput_006.cpp \ + vrclient_x64/cppIVRInput_IVRInput_007.cpp \ + vrclient_x64/cppIVRInput_IVRInput_010.cpp \ + vrclient_x64/cppIVRIOBuffer_IVRIOBuffer_001.cpp \ + vrclient_x64/cppIVRIOBuffer_IVRIOBuffer_002.cpp \ + vrclient_x64/cppIVRMailbox_IVRMailbox_001.cpp \ + vrclient_x64/cppIVRNotifications_IVRNotifications_001.cpp \ + vrclient_x64/cppIVRNotifications_IVRNotifications_002.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_001.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_002.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_003.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_004.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_005.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_007.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_008.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_010.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_011.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_012.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_013.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_014.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_016.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_017.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_018.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_019.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_020.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_021.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_022.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_024.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_025.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_026.cpp \ + vrclient_x64/cppIVROverlay_IVROverlay_027.cpp \ + vrclient_x64/cppIVROverlayView_IVROverlayView_003.cpp \ + vrclient_x64/cppIVRRenderModels_IVRRenderModels_001.cpp \ + vrclient_x64/cppIVRRenderModels_IVRRenderModels_002.cpp \ + vrclient_x64/cppIVRRenderModels_IVRRenderModels_004.cpp \ + vrclient_x64/cppIVRRenderModels_IVRRenderModels_005.cpp \ + vrclient_x64/cppIVRRenderModels_IVRRenderModels_006.cpp \ + vrclient_x64/cppIVRResources_IVRResources_001.cpp \ + vrclient_x64/cppIVRScreenshots_IVRScreenshots_001.cpp \ + vrclient_x64/cppIVRSettings_IVRSettings_001.cpp \ + vrclient_x64/cppIVRSettings_IVRSettings_002.cpp \ + vrclient_x64/cppIVRSettings_IVRSettings_003.cpp \ + vrclient_x64/cppIVRSystem_IVRSystem_003.cpp \ + vrclient_x64/cppIVRSystem_IVRSystem_004.cpp \ + vrclient_x64/cppIVRSystem_IVRSystem_005.cpp \ + vrclient_x64/cppIVRSystem_IVRSystem_006.cpp \ + vrclient_x64/cppIVRSystem_IVRSystem_009.cpp \ + vrclient_x64/cppIVRSystem_IVRSystem_010.cpp \ + vrclient_x64/cppIVRSystem_IVRSystem_011.cpp \ + vrclient_x64/cppIVRSystem_IVRSystem_012.cpp \ + vrclient_x64/cppIVRSystem_IVRSystem_014.cpp \ + vrclient_x64/cppIVRSystem_IVRSystem_015.cpp \ + vrclient_x64/cppIVRSystem_IVRSystem_016.cpp \ + vrclient_x64/cppIVRSystem_IVRSystem_017.cpp \ + vrclient_x64/cppIVRSystem_IVRSystem_019.cpp \ + vrclient_x64/cppIVRSystem_IVRSystem_020.cpp \ + vrclient_x64/cppIVRSystem_IVRSystem_021.cpp \ + vrclient_x64/cppIVRSystem_IVRSystem_022.cpp \ + vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_001.cpp \ + vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_002.cpp \ + vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_003.cpp \ + vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_004.cpp \ + vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_005.cpp \ + vrclient_x64/cppIVRTrackedCamera_IVRTrackedCamera_006.cpp \ + vrclient_x64/json_converter.cpp \ + vrclient_x64/jsoncpp.cpp \ + vrclient_x64/struct_converters_090.cpp \ + vrclient_x64/struct_converters_091.cpp \ + vrclient_x64/struct_converters_0910.cpp \ + vrclient_x64/struct_converters_0912.cpp \ + vrclient_x64/struct_converters_0913.cpp \ + vrclient_x64/struct_converters_0914.cpp \ + vrclient_x64/struct_converters_0915.cpp \ + vrclient_x64/struct_converters_0916.cpp \ + vrclient_x64/struct_converters_0917.cpp \ + vrclient_x64/struct_converters_0918.cpp \ + vrclient_x64/struct_converters_0919.cpp \ + vrclient_x64/struct_converters_092.cpp \ + vrclient_x64/struct_converters_0920.cpp \ + vrclient_x64/struct_converters_093.cpp \ + vrclient_x64/struct_converters_094.cpp \ + vrclient_x64/struct_converters_096.cpp \ + vrclient_x64/struct_converters_097.cpp \ + vrclient_x64/struct_converters_098.cpp \ + vrclient_x64/struct_converters_099.cpp \ + vrclient_x64/struct_converters_100.cpp \ + vrclient_x64/struct_converters_101.cpp \ + vrclient_x64/struct_converters_1010.cpp \ + vrclient_x64/struct_converters_1011.cpp \ + vrclient_x64/struct_converters_1012.cpp \ + vrclient_x64/struct_converters_1013.cpp \ + vrclient_x64/struct_converters_1014.cpp \ + vrclient_x64/struct_converters_1015.cpp \ + vrclient_x64/struct_converters_1016.cpp \ + vrclient_x64/struct_converters_1017.cpp \ + vrclient_x64/struct_converters_102.cpp \ + vrclient_x64/struct_converters_103.cpp \ + vrclient_x64/struct_converters_103a.cpp \ + vrclient_x64/struct_converters_104.cpp \ + vrclient_x64/struct_converters_105.cpp \ + vrclient_x64/struct_converters_106.cpp \ + vrclient_x64/struct_converters_107.cpp \ + vrclient_x64/struct_converters_108.cpp \ + vrclient_x64/struct_converters_109.cpp \ + vrclient_x64/struct_converters_11030.cpp \ + vrclient_x64/struct_converters_11111.cpp \ + vrclient_x64/struct_converters_1125.cpp \ + vrclient_x64/struct_converters_11310.cpp \ + vrclient_x64/struct_converters_113b.cpp \ + vrclient_x64/struct_converters_11415.cpp \ + vrclient_x64/struct_converters_1168.cpp \ + vrclient_x64/struct_converters_1210.cpp \ + vrclient_x64/struct_converters_1237.cpp \ + vrclient_x64/struct_converters_1267.cpp \ + vrclient_x64/struct_converters_1322.cpp \ + vrclient_x64/struct_converters_1418.cpp \ + vrclient_x64/struct_converters_1517.cpp \ + vrclient_x64/struct_converters_1610.cpp \ + vrclient_x64/struct_converters_1715.cpp \ + vrclient_x64/struct_converters_1819.cpp \ + vrclient_x64/struct_converters_1916.cpp \ diff --git a/vrclient_x64/vrclient_x64/vrclient_x64.spec b/vrclient_x64/vrclient.spec similarity index 100% rename from vrclient_x64/vrclient_x64/vrclient_x64.spec rename to vrclient_x64/vrclient.spec diff --git a/vrclient_x64/vrclient_x64.spec b/vrclient_x64/vrclient_x64.spec new file mode 100644 index 00000000..c7e832e5 --- /dev/null +++ b/vrclient_x64/vrclient_x64.spec @@ -0,0 +1,4 @@ +# Generated from vrclient.dll by winedump + +1 stdcall HmdSystemFactory(ptr ptr) +2 stdcall VRClientCoreFactory(ptr ptr) diff --git a/vrclient_x64/vrclient_x64/json_converter.cpp b/vrclient_x64/vrclient_x64/json_converter.cpp index 83fd2ec0..b95cb3c0 100644 --- a/vrclient_x64/vrclient_x64/json_converter.cpp +++ b/vrclient_x64/vrclient_x64/json_converter.cpp @@ -1,3 +1,10 @@ +#include +#include + +#include +#include + +#undef wcsncpy #include #include diff --git a/vrclient_x64/vrclient_x64/vrclient_main.c b/vrclient_x64/vrclient_x64/vrclient_main.c index 8b2262b0..54304f7a 100644 --- a/vrclient_x64/vrclient_x64/vrclient_main.c +++ b/vrclient_x64/vrclient_x64/vrclient_main.c @@ -159,7 +159,7 @@ bool vrclient_dos_path_to_unix_path(const char *src, char *dst) if (!realpath(unix_path, dst)) { ERR("Could not get real path for %s.\n", unix_path); - strncpy(dst, unix_path, PATH_MAX); + lstrcpynA(dst, unix_path, PATH_MAX); } HeapFree(GetProcessHeap(), 0, unix_path); @@ -260,6 +260,7 @@ static void *(*vrclient_VRClientCoreFactory)(const char *name, int *return_code) static int load_vrclient(void) { + static const WCHAR PROTON_VR_RUNTIME_W[] = {'P','R','O','T','O','N','_','V','R','_','R','U','N','T','I','M','E',0}; WCHAR pathW[PATH_MAX]; char *pathU; DWORD sz; @@ -274,7 +275,7 @@ static int load_vrclient(void) return 1; /* PROTON_VR_RUNTIME is provided by the proton setup script */ - if(!GetEnvironmentVariableW(L"PROTON_VR_RUNTIME", pathW, ARRAY_SIZE(pathW))) + if(!GetEnvironmentVariableW(PROTON_VR_RUNTIME_W, pathW, ARRAY_SIZE(pathW))) { DWORD type, size; LSTATUS status; @@ -287,7 +288,7 @@ static int load_vrclient(void) } size = sizeof(pathW); - if ((status = RegQueryValueExW(vr_key, L"PROTON_VR_RUNTIME", NULL, &type, (BYTE *)pathW, &size))) + if ((status = RegQueryValueExW(vr_key, PROTON_VR_RUNTIME_W, NULL, &type, (BYTE *)pathW, &size))) { WINE_WARN("Could not query value, status %#x.\n", status); RegCloseKey(vr_key);