rileytestut / AltServer-Windows

GNU Affero General Public License v3.0
141 stars 49 forks source link

Partially fix compatibility with Visual Studio 2019 #1

Closed chenxiaolong closed 3 years ago

chenxiaolong commented 4 years ago

This adds a missing <codecvt> include and switches switches from auto_ptr to unique_ptr.

This doesn't completely allow the project to be built with VS2019. ldid also needs to target C++17 and use std::filesystem instead of std::experimental::filesystem. I didn't include this change in the PR because I'm not sure if it'll break compilation with earlier versions of MSVC.

diff --git a/ldid/ldid.cpp b/ldid/ldid.cpp
index 3e30220..de7b61f 100755
--- a/ldid/ldid.cpp
+++ b/ldid/ldid.cpp
@@ -70,7 +70,7 @@

 #include <filesystem>

-namespace fs = std::experimental::filesystem;
+namespace fs = std::filesystem;

 #ifdef __APPLE__
 #include <CommonCrypto/CommonDigest.h>
diff --git a/ldid/ldid.vcxproj b/ldid/ldid.vcxproj
index f23c5fe..3c72e39 100755
--- a/ldid/ldid.vcxproj
+++ b/ldid/ldid.vcxproj
@@ -107,7 +107,7 @@
       <ConformanceMode>true</ConformanceMode>
       <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
       <AdditionalIncludeDirectories>$(ProjectDir)..\Dependencies\dirent\include;$(ProjectDir)..\Dependencies\libimobiledevice-vs\libplist\include;$(ProjectDir)..\AltSign\Dependencies\regex\include;$(ProjectDir)..\AltSign\Dependencies\mman;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <LanguageStandard>stdcpp14</LanguageStandard>
+      <LanguageStandard>stdcpp17</LanguageStandard>
     </ClCompile>
     <Link>
       <SubSystem>Windows</SubSystem>
ghost commented 4 years ago

Sir, can you please share build instructions? I am very stuck

lonkelle commented 3 years ago

@rileytestut Do you use VS 2019 to compile AltServer for Windows? Is this worth looking into - someone did approve it on Feb 2nd of this year.

lonkelle commented 3 years ago

Imma just close it for now since this conflicts anyway now.