From 96d6305e89af82a39fb96578d2d25ac5d10f9ed1 Mon Sep 17 00:00:00 2001 From: Leonardo Laguna Ruiz Date: Sat, 25 Feb 2023 17:33:45 +0200 Subject: [PATCH] Fixes compilation of efsw on Windows. --- Makefile | 12 +++++++++++- src/Prototype.cpp | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index af8cc9d..6bb9914 100644 --- a/Makefile +++ b/Makefile @@ -38,14 +38,24 @@ ifeq (, $(shell which premake4)) else PREMAKE = premake4 endif -efsw := dep/lib/libefsw-static-release.a +ifdef ARCH_WIN + efsw := dep/lib/efsw-static-release.lib +else + efsw := dep/lib/libefsw-static-release.a +endif DEPS += $(efsw) OBJECTS += $(efsw) $(efsw): cd efsw && $(PREMAKE) gmake +ifdef ARCH_WIN + cd efsw && $(MAKE) -C make/* config=release_x86_64 efsw-static-lib + mkdir -p dep/lib dep/include + cd efsw && cp lib/efsw-static-release.lib $(DEP_PATH)/lib/ +else cd efsw && $(MAKE) -C make/* config=release efsw-static-lib mkdir -p dep/lib dep/include cd efsw && cp lib/libefsw-static-release.a $(DEP_PATH)/lib/ +endif cd efsw && cp -R include/efsw $(DEP_PATH)/include/ diff --git a/src/Prototype.cpp b/src/Prototype.cpp index afb18c6..70c4d44 100644 --- a/src/Prototype.cpp +++ b/src/Prototype.cpp @@ -504,7 +504,7 @@ struct Prototype : Module { (void) std::system(command.c_str()); #elif defined ARCH_WIN std::string command = editorPath + " \"" + path + "\""; - std::wstring commandW = string::toWstring(command); + std::wstring commandW = string::UTF8toUTF16(command); STARTUPINFOW startupInfo; std::memset(&startupInfo, 0, sizeof(startupInfo)); startupInfo.cb = sizeof(startupInfo);