aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-05-22 17:39:36 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:39:32 +0200
commit0d0fa21e695f3082576053bf0c9b71a3bcc154a4 (patch)
treeca23f9f6f88e167ecf3be8feaa4d0fb4d5f0b51a
parent4614d45075684d463c8aa302c594e8496120a7ed (diff)
Fix for windows
-rw-r--r--backend/ninja/Ninja.cpp8
-rw-r--r--include/Conf.hpp30
-rw-r--r--msvc/LIBEAY32.dllbin0 -> 2283008 bytes
-rw-r--r--msvc/SSLEAY32.dllbin0 -> 361472 bytes
-rw-r--r--msvc/archive.dllbin0 -> 659456 bytes
-rw-r--r--msvc/git2.dllbin0 -> 1124864 bytes
-rw-r--r--msvc/libbz2.dllbin0 -> 70656 bytes
-rw-r--r--msvc/libcharset.dllbin0 -> 10752 bytes
-rw-r--r--msvc/libcurl.dllbin0 -> 285696 bytes
-rw-r--r--msvc/libiconv.dllbin0 -> 937984 bytes
-rw-r--r--msvc/libxml2.dllbin0 -> 1314304 bytes
-rw-r--r--msvc/lz4.dllbin0 -> 94720 bytes
-rw-r--r--msvc/lzma.dllbin0 -> 153088 bytes
-rw-r--r--msvc/sibs.exebin0 -> 415232 bytes
-rw-r--r--msvc/zlib1.dllbin0 -> 85504 bytes
-rw-r--r--sibs.sln31
-rw-r--r--sibs.vcxproj186
-rw-r--r--sibs.vcxproj.filters249
-rw-r--r--sibs.vcxproj.user4
-rw-r--r--src/CmakeModule.cpp4
-rw-r--r--src/Conf.cpp10
-rw-r--r--src/FileUtil.cpp3
-rw-r--r--src/GlobalLib.cpp8
-rw-r--r--src/Package.cpp4
24 files changed, 508 insertions, 29 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index 06da7c0..7053d43 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -330,10 +330,10 @@ namespace backend
cflagsCallbackFunc(pkgConfigFlag.cflags);
}
#else
- for (const Dependency &dependency : dependencies)
- {
- globalLibDependencies.push_back(dependency);
- }
+ for (PackageListDependency *pkgConfigDependency : packageListDependencies)
+ {
+ globalLibDependencies.push_back(pkgConfigDependency);
+ }
#endif
return GlobalLib::getLibs(globalLibDependencies, config, globalLibDir, staticLinkerFlagCallbackFunc, dynamicLinkerFlagCallback, globalIncludeDirCallback);
diff --git a/include/Conf.hpp b/include/Conf.hpp
index 9a9cacf..6018b48 100644
--- a/include/Conf.hpp
+++ b/include/Conf.hpp
@@ -174,8 +174,8 @@ namespace sibs
#define CONFIG_STATIC_DEBUG_PLATFORM 4
#define CONFIG_STATIC_RELEASE_PLATFORM 5
#endif
- #define CONFIG_STATIC_LIB_FILE_EXTENSION "lib"
- #define CONFIG_DYNAMIC_LIB_FILE_EXTENSION "dll"
+ #define CONFIG_STATIC_LIB_FILE_EXTENSION L"lib"
+ #define CONFIG_DYNAMIC_LIB_FILE_EXTENSION L"dll"
#elif OS_TYPE == OS_TYPE_LINUX
#ifdef SIBS_ENV_32BIT
#define SYSTEM_PLATFORM Platform::PLATFORM_LINUX32
@@ -221,10 +221,10 @@ namespace sibs
switch(optimizationLevel)
{
case OPT_LEV_DEBUG:
- cmakeArgsGlobal = "-G Ninja \"-DCMAKE_BUILD_TYPE=Debug\"";
+ cmakeArgsGlobal = TINYDIR_STRING("-G Ninja \"-DCMAKE_BUILD_TYPE=Debug\"");
break;
case OPT_LEV_RELEASE:
- cmakeArgsGlobal = "-G Ninja \"-DCMAKE_BUILD_TYPE=Release\"";
+ cmakeArgsGlobal = TINYDIR_STRING("-G Ninja \"-DCMAKE_BUILD_TYPE=Release\"");
break;
}
}
@@ -326,29 +326,29 @@ namespace sibs
}
// Get cmake args for all builds. This is args under [cmake] only
- const std::string& getCmakeArgs() const
+ const FileString& getCmakeArgs() const
{
return cmakeArgsGlobal;
}
// Get cmake args for static build. This is a combination of args under [cmake] and under [cmake.static]
- std::string getCmakeArgsStatic() const
+ FileString getCmakeArgsStatic() const
{
- std::string result;
+ FileString result;
result.reserve(cmakeArgsGlobal.size() + 1 + cmakeArgsStatic.size());
result += cmakeArgsGlobal;
- result += " ";
+ result += TINYDIR_STRING(" ");
result += cmakeArgsStatic;
return result;
}
// Get cmake args for dynamic build. This is a combination of args under [cmake] and under [cmake.dynamic]
- std::string getCmakeArgsDynamic() const
+ FileString getCmakeArgsDynamic() const
{
- std::string result;
+ FileString result;
result.reserve(cmakeArgsGlobal.size() + 1 + cmakeArgsDynamic.size());
result += cmakeArgsGlobal;
- result += " ";
+ result += TINYDIR_STRING(" ");
result += cmakeArgsDynamic;
return result;
}
@@ -409,7 +409,7 @@ namespace sibs
void parsePlatformConfig(const StringView &fieldName, const ConfigValue &fieldValue);
void parsePlatformConfigStaticDebug(const StringView &fieldName, const ConfigValue &fieldValue);
void parsePlatformConfigStaticRelease(const StringView &fieldName, const ConfigValue &fieldValue);
- void parseCmake(const StringView &fieldName, const ConfigValue &fieldValue, std::string &cmakeDir, std::string &cmakeArgs);
+ void parseCmake(const StringView &fieldName, const ConfigValue &fieldValue, FileString &cmakeDir, FileString &cmakeArgs);
void validatePackageName() const;
protected:
StringView currentObject;
@@ -431,9 +431,9 @@ namespace sibs
FileString cmakeDirGlobal;
FileString cmakeDirStatic;
FileString cmakeDirDynamic;
- std::string cmakeArgsGlobal;
- std::string cmakeArgsStatic;
- std::string cmakeArgsDynamic;
+ FileString cmakeArgsGlobal;
+ FileString cmakeArgsStatic;
+ FileString cmakeArgsDynamic;
CVersion cVersion;
CPPVersion cppVersion;
bool useCmake;
diff --git a/msvc/LIBEAY32.dll b/msvc/LIBEAY32.dll
new file mode 100644
index 0000000..3f1779a
--- /dev/null
+++ b/msvc/LIBEAY32.dll
Binary files differ
diff --git a/msvc/SSLEAY32.dll b/msvc/SSLEAY32.dll
new file mode 100644
index 0000000..2a81ba3
--- /dev/null
+++ b/msvc/SSLEAY32.dll
Binary files differ
diff --git a/msvc/archive.dll b/msvc/archive.dll
new file mode 100644
index 0000000..1c8983f
--- /dev/null
+++ b/msvc/archive.dll
Binary files differ
diff --git a/msvc/git2.dll b/msvc/git2.dll
new file mode 100644
index 0000000..54d4152
--- /dev/null
+++ b/msvc/git2.dll
Binary files differ
diff --git a/msvc/libbz2.dll b/msvc/libbz2.dll
new file mode 100644
index 0000000..1bb0b7d
--- /dev/null
+++ b/msvc/libbz2.dll
Binary files differ
diff --git a/msvc/libcharset.dll b/msvc/libcharset.dll
new file mode 100644
index 0000000..3cebd0c
--- /dev/null
+++ b/msvc/libcharset.dll
Binary files differ
diff --git a/msvc/libcurl.dll b/msvc/libcurl.dll
new file mode 100644
index 0000000..ea99c0e
--- /dev/null
+++ b/msvc/libcurl.dll
Binary files differ
diff --git a/msvc/libiconv.dll b/msvc/libiconv.dll
new file mode 100644
index 0000000..4a8d146
--- /dev/null
+++ b/msvc/libiconv.dll
Binary files differ
diff --git a/msvc/libxml2.dll b/msvc/libxml2.dll
new file mode 100644
index 0000000..f25ae4a
--- /dev/null
+++ b/msvc/libxml2.dll
Binary files differ
diff --git a/msvc/lz4.dll b/msvc/lz4.dll
new file mode 100644
index 0000000..863d4cf
--- /dev/null
+++ b/msvc/lz4.dll
Binary files differ
diff --git a/msvc/lzma.dll b/msvc/lzma.dll
new file mode 100644
index 0000000..48a3d73
--- /dev/null
+++ b/msvc/lzma.dll
Binary files differ
diff --git a/msvc/sibs.exe b/msvc/sibs.exe
new file mode 100644
index 0000000..44f8871
--- /dev/null
+++ b/msvc/sibs.exe
Binary files differ
diff --git a/msvc/zlib1.dll b/msvc/zlib1.dll
new file mode 100644
index 0000000..691c689
--- /dev/null
+++ b/msvc/zlib1.dll
Binary files differ
diff --git a/sibs.sln b/sibs.sln
new file mode 100644
index 0000000..dee6580
--- /dev/null
+++ b/sibs.sln
@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.27703.2018
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sibs", "sibs.vcxproj", "{2C511FA3-FDD5-426D-88B1-29D3A1402CCA}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {2C511FA3-FDD5-426D-88B1-29D3A1402CCA}.Debug|x64.ActiveCfg = Debug|x64
+ {2C511FA3-FDD5-426D-88B1-29D3A1402CCA}.Debug|x64.Build.0 = Debug|x64
+ {2C511FA3-FDD5-426D-88B1-29D3A1402CCA}.Debug|x86.ActiveCfg = Debug|Win32
+ {2C511FA3-FDD5-426D-88B1-29D3A1402CCA}.Debug|x86.Build.0 = Debug|Win32
+ {2C511FA3-FDD5-426D-88B1-29D3A1402CCA}.Release|x64.ActiveCfg = Release|x64
+ {2C511FA3-FDD5-426D-88B1-29D3A1402CCA}.Release|x64.Build.0 = Release|x64
+ {2C511FA3-FDD5-426D-88B1-29D3A1402CCA}.Release|x86.ActiveCfg = Release|Win32
+ {2C511FA3-FDD5-426D-88B1-29D3A1402CCA}.Release|x86.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {5B182611-D575-40A3-97DA-763A0BC62B84}
+ EndGlobalSection
+EndGlobal
diff --git a/sibs.vcxproj b/sibs.vcxproj
new file mode 100644
index 0000000..28a2a99
--- /dev/null
+++ b/sibs.vcxproj
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>15.0</VCProjectVersion>
+ <ProjectGuid>{2C511FA3-FDD5-426D-88B1-29D3A1402CCA}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <Optimization>Disabled</Optimization>
+ </ClCompile>
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="backend\BackendUtils.cpp" />
+ <ClCompile Include="backend\ninja\Ninja.cpp" />
+ <ClCompile Include="external\xxhash.c" />
+ <ClCompile Include="src\Archive.cpp" />
+ <ClCompile Include="src\CmakeModule.cpp" />
+ <ClCompile Include="src\Conf.cpp" />
+ <ClCompile Include="src\curl.cpp" />
+ <ClCompile Include="src\Exec.cpp" />
+ <ClCompile Include="src\FileUtil.cpp" />
+ <ClCompile Include="src\GitRepository.cpp" />
+ <ClCompile Include="src\GlobalLib.cpp" />
+ <ClCompile Include="src\main.cpp" />
+ <ClCompile Include="src\Package.cpp" />
+ <ClCompile Include="src\PkgConfig.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="backend\BackendUtils.hpp" />
+ <ClInclude Include="backend\ninja\Ninja.hpp" />
+ <ClInclude Include="external\rapidjson\allocators.h" />
+ <ClInclude Include="external\rapidjson\cursorstreamwrapper.h" />
+ <ClInclude Include="external\rapidjson\document.h" />
+ <ClInclude Include="external\rapidjson\encodedstream.h" />
+ <ClInclude Include="external\rapidjson\encodings.h" />
+ <ClInclude Include="external\rapidjson\error\en.h" />
+ <ClInclude Include="external\rapidjson\error\error.h" />
+ <ClInclude Include="external\rapidjson\filereadstream.h" />
+ <ClInclude Include="external\rapidjson\filewritestream.h" />
+ <ClInclude Include="external\rapidjson\fwd.h" />
+ <ClInclude Include="external\rapidjson\internal\biginteger.h" />
+ <ClInclude Include="external\rapidjson\internal\diyfp.h" />
+ <ClInclude Include="external\rapidjson\internal\dtoa.h" />
+ <ClInclude Include="external\rapidjson\internal\ieee754.h" />
+ <ClInclude Include="external\rapidjson\internal\itoa.h" />
+ <ClInclude Include="external\rapidjson\internal\meta.h" />
+ <ClInclude Include="external\rapidjson\internal\pow10.h" />
+ <ClInclude Include="external\rapidjson\internal\regex.h" />
+ <ClInclude Include="external\rapidjson\internal\stack.h" />
+ <ClInclude Include="external\rapidjson\internal\strfunc.h" />
+ <ClInclude Include="external\rapidjson\internal\strtod.h" />
+ <ClInclude Include="external\rapidjson\internal\swap.h" />
+ <ClInclude Include="external\rapidjson\istreamwrapper.h" />
+ <ClInclude Include="external\rapidjson\memorybuffer.h" />
+ <ClInclude Include="external\rapidjson\memorystream.h" />
+ <ClInclude Include="external\rapidjson\msinttypes\inttypes.h" />
+ <ClInclude Include="external\rapidjson\msinttypes\stdint.h" />
+ <ClInclude Include="external\rapidjson\ostreamwrapper.h" />
+ <ClInclude Include="external\rapidjson\pointer.h" />
+ <ClInclude Include="external\rapidjson\prettywriter.h" />
+ <ClInclude Include="external\rapidjson\rapidjson.h" />
+ <ClInclude Include="external\rapidjson\reader.h" />
+ <ClInclude Include="external\rapidjson\schema.h" />
+ <ClInclude Include="external\rapidjson\stream.h" />
+ <ClInclude Include="external\rapidjson\stringbuffer.h" />
+ <ClInclude Include="external\rapidjson\writer.h" />
+ <ClInclude Include="external\tinydir.h" />
+ <ClInclude Include="external\utf8.h" />
+ <ClInclude Include="external\utf8\checked.h" />
+ <ClInclude Include="external\utf8\core.h" />
+ <ClInclude Include="external\utf8\unchecked.h" />
+ <ClInclude Include="external\xxhash.h" />
+ <ClInclude Include="include\Archive.hpp" />
+ <ClInclude Include="include\CmakeModule.hpp" />
+ <ClInclude Include="include\Conf.hpp" />
+ <ClInclude Include="include\curl.hpp" />
+ <ClInclude Include="include\Dependency.hpp" />
+ <ClInclude Include="include\env.hpp" />
+ <ClInclude Include="include\Exec.hpp" />
+ <ClInclude Include="include\FileUtil.hpp" />
+ <ClInclude Include="include\GitRepository.hpp" />
+ <ClInclude Include="include\GlobalLib.hpp" />
+ <ClInclude Include="include\Linker.hpp" />
+ <ClInclude Include="include\Package.hpp" />
+ <ClInclude Include="include\PackageVersion.hpp" />
+ <ClInclude Include="include\PkgConfig.hpp" />
+ <ClInclude Include="include\Result.hpp" />
+ <ClInclude Include="include\StringView.hpp" />
+ <ClInclude Include="include\types.hpp" />
+ <ClInclude Include="include\utils.hpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/sibs.vcxproj.filters b/sibs.vcxproj.filters
new file mode 100644
index 0000000..059dfbf
--- /dev/null
+++ b/sibs.vcxproj.filters
@@ -0,0 +1,249 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="backend\BackendUtils.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="backend\ninja\Ninja.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="external\xxhash.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\Archive.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\CmakeModule.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\Conf.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\curl.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\Exec.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\FileUtil.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\GitRepository.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\GlobalLib.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\main.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\Package.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\PkgConfig.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="backend\BackendUtils.hpp">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="backend\ninja\Ninja.hpp">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\tinydir.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\utf8.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\xxhash.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\allocators.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\cursorstreamwrapper.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\document.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\encodedstream.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\encodings.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\filereadstream.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\filewritestream.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\fwd.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\istreamwrapper.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\memorybuffer.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\memorystream.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\ostreamwrapper.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\pointer.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\prettywriter.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\rapidjson.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\reader.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\schema.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\stream.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\stringbuffer.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\writer.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\error\en.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\error\error.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\internal\biginteger.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\internal\diyfp.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\internal\dtoa.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\internal\ieee754.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\internal\itoa.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\internal\meta.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\internal\pow10.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\internal\regex.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\internal\stack.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\internal\strfunc.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\internal\strtod.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\internal\swap.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\msinttypes\inttypes.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\rapidjson\msinttypes\stdint.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\utf8\checked.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\utf8\core.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="external\utf8\unchecked.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="include\Archive.hpp">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="include\CmakeModule.hpp">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="include\Conf.hpp">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="include\curl.hpp">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="include\Dependency.hpp">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="include\env.hpp">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="include\Exec.hpp">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="include\FileUtil.hpp">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="include\GitRepository.hpp">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="include\GlobalLib.hpp">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="include\Linker.hpp">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="include\Package.hpp">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="include\PackageVersion.hpp">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="include\PkgConfig.hpp">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="include\Result.hpp">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="include\StringView.hpp">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="include\types.hpp">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="include\utils.hpp">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/sibs.vcxproj.user b/sibs.vcxproj.user
new file mode 100644
index 0000000..be25078
--- /dev/null
+++ b/sibs.vcxproj.user
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup />
+</Project> \ No newline at end of file
diff --git a/src/CmakeModule.cpp b/src/CmakeModule.cpp
index 7f517e3..15597cb 100644
--- a/src/CmakeModule.cpp
+++ b/src/CmakeModule.cpp
@@ -6,7 +6,7 @@
#if OS_FAMILY == OS_FAMILY_POSIX
#define nprintf printf
#else
-#define nprintf wprintf
+#define nprintf(fmt, ...) wprintf(TINYDIR_STRING(fmt), __VA_ARGS__)
#endif
using namespace std;
@@ -104,7 +104,7 @@ namespace sibs
dynamicLinkerFlagCallbackFunc(pkgConfigLinkerFlagsResult.unwrap());
}
#else
- for (const Dependency &dependency : dependencies)
+ for (PackageListDependency *dependency : config.getPackageListDependencies())
{
globalLibDependencies.push_back(dependency);
}
diff --git a/src/Conf.cpp b/src/Conf.cpp
index 941bdd7..883022b 100644
--- a/src/Conf.cpp
+++ b/src/Conf.cpp
@@ -1210,7 +1210,7 @@ namespace sibs
failInvalidFieldUnderObject(fieldName);
}
- void SibsConfig::parseCmake(const StringView &fieldName, const ConfigValue &fieldValue, string &cmakeDir, string &cmakeArgs)
+ void SibsConfig::parseCmake(const StringView &fieldName, const ConfigValue &fieldValue, FileString &cmakeDir, FileString &cmakeArgs)
{
if(fieldName.equals("dir"))
{
@@ -1240,10 +1240,10 @@ namespace sibs
bool prependSpace = !cmakeArgs.empty();
cmakeArgs.reserve(cmakeArgs.size() + 4 + (prependSpace ? 1 : 0) + arg.size);
if(prependSpace)
- cmakeArgs += " ";
- cmakeArgs += "\"-D";
- cmakeArgs.append(arg.data, arg.size);
- cmakeArgs += "\"";
+ cmakeArgs += TINYDIR_STRING(" ");
+ cmakeArgs += TINYDIR_STRING("\"-D");
+ cmakeArgs += toFileString(string(arg.data, arg.size));
+ cmakeArgs += TINYDIR_STRING("\"");
}
}
else
diff --git a/src/FileUtil.cpp b/src/FileUtil.cpp
index 5ac2641..53c1132 100644
--- a/src/FileUtil.cpp
+++ b/src/FileUtil.cpp
@@ -11,6 +11,7 @@
// Copied from linux libc sys/stat.h:
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#pragma comment(lib, "Userenv.lib")
#endif
using namespace std;
@@ -128,7 +129,7 @@ namespace sibs
{
struct _stat64i32 fileStat;
if (_wstat(path, &fileStat) == 0)
- rreturn Result<u64>::Ok(fileStat.st_mtim.tv_sec);
+ return Result<u64>::Ok(fileStat.st_mtime);
else
{
string errMsg = "File not found: ";
diff --git a/src/GlobalLib.cpp b/src/GlobalLib.cpp
index c577a4a..9921c1b 100644
--- a/src/GlobalLib.cpp
+++ b/src/GlobalLib.cpp
@@ -166,8 +166,8 @@ namespace sibs
FileString namePlatformNative = gitDependency->name;
FileString versionPlatformNative = gitDependency->revision;
#else
- FileString namePlatformNative = utf8To16(name);
- FileString versionPlatformNative = utf8To16(version);
+ FileString namePlatformNative = utf8To16(gitDependency->name);
+ FileString versionPlatformNative = utf8To16(gitDependency->revision);
#endif
FileString packageDir = globalLibRootDir + TINYDIR_STRING("/");
@@ -307,7 +307,11 @@ namespace sibs
Result<bool> archiveExtractResult = Archive::extract(libArchivedFilePath.c_str(), libPath.c_str());
// We have extracted the archive, we dont need to cache it. If remove fails, it doesn't really matter, user can remove it himself
+#if OS_FAMILY == OS_FAMILY_POSIX
remove(libArchivedFilePath.c_str());
+#else
+ _wremove(libArchivedFilePath.c_str());
+#endif
return archiveExtractResult;
}
diff --git a/src/Package.cpp b/src/Package.cpp
index 1fa5485..d59c6a9 100644
--- a/src/Package.cpp
+++ b/src/Package.cpp
@@ -2,6 +2,10 @@
#include "../include/curl.hpp"
#include "../external/rapidjson/error/en.h"
+#ifdef GetObject
+#undef GetObject
+#endif
+
using namespace std;
using namespace rapidjson;