Skip to content

Commit

Permalink
Upgrade to latest deps
Browse files Browse the repository at this point in the history
Dokany to v2 (needed dll name updates)
Return type for utf8_to_wchar_buf changed to 'int'
tinyxml2 no longer uses libraries
  • Loading branch information
jetwhiz committed May 2, 2022
1 parent aea111d commit c1d0028
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 41 deletions.
16 changes: 8 additions & 8 deletions build-dokany.bat
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ if defined USE_LEGACY_DOKAN (
set VERSION=v0.7.4
set VERSION_STR=0.7.4
) else (
set VERSION=v1.3.1.1000
set VERSION_STR=v1.3.1.1000
set VERSION=v2.0.4.1000
set VERSION_STR=v2.0.4.1000
)


Expand All @@ -49,8 +49,8 @@ set SRC_DIR_NAME=dokan

REM don't bother if they already have an installation
if defined DOKAN_ROOT (
if exist "%DOKAN_ROOT%\Win32\Release\dokan1.lib" (
if exist "%DOKAN_ROOT%\Win32\Release\dokanfuse1.lib" (goto :already_installed)
if exist "%DOKAN_ROOT%\Win32\Release\dokan2.lib" (
if exist "%DOKAN_ROOT%\Win32\Release\dokanfuse2.lib" (goto :already_installed)
)
)

Expand Down Expand Up @@ -105,10 +105,10 @@ if defined USE_LEGACY_DOKAN (
copy ".\Win32\Release\dokan.lib" ".\Win32\Release\dokan1.lib"
copy ".\Win32\Release\dokanfuse.lib" ".\Win32\Release\dokanfuse1.lib"
) else (
if NOT exist ".\Win32\Release\dokan1.lib" goto :build_failure
if NOT exist ".\Win32\Release\dokan1.dll" goto :build_failure
if NOT exist ".\Win32\Release\dokanfuse1.lib" goto :build_failure
if NOT exist ".\Win32\Release\dokanfuse1.dll" goto :build_failure
if NOT exist ".\Win32\Release\dokan2.lib" goto :build_failure
if NOT exist ".\Win32\Release\dokan2.dll" goto :build_failure
if NOT exist ".\Win32\Release\dokanfuse2.lib" goto :build_failure
if NOT exist ".\Win32\Release\dokanfuse2.dll" goto :build_failure
)

REM set DOKAN_ROOT environment variable
Expand Down
4 changes: 2 additions & 2 deletions build-easyloggingpp.bat
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ REM along with this program. If not, see <http://www.gnu.org/licenses/>.


REM versioning variables
set VERSION=v9.96.7
set VERSION_STR=v9.96.7
set VERSION=v9.97.0
set VERSION_STR=v9.97.0
set SOURCE_URI=https://github.com/easylogging/easyloggingpp.git


Expand Down
22 changes: 4 additions & 18 deletions build-tinyxml2.bat
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ REM along with this program. If not, see <http://www.gnu.org/licenses/>.


REM versioning variables
set VERSION=7.1.0
set VERSION_STR=7.1.0
set VERSION=9.0.0
set VERSION_STR=9.0.0
set SOURCE_URI=https://github.com/leethomason/tinyxml2.git


Expand All @@ -40,7 +40,7 @@ set INSTALL_DIR=%CD%\deps\%SRC_DIR_NAME%\

REM don't bother if they already have an installation
if defined INSTALL_DIR (
if exist "%INSTALL_DIR%\tinyxml2\Release-Lib\tinyxml2.lib" (
if exist "%INSTALL_DIR%\tinyxml2.cpp" (
if exist "%INSTALL_DIR%\tinyxml2.h" (goto :already_installed)
)
)
Expand Down Expand Up @@ -70,22 +70,8 @@ git clean -ffdx
git reset --hard %VERSION%
git checkout %VERSION%

echo.
echo ~~~~~ Upgrading legacy solution ~~~~~
echo.
cmd /c devenv "tinyxml2/tinyxml2.sln" /upgrade


REM build libraries
echo.
echo ==================================================
echo BUILDING TINYXML2 LIBRARIES
echo ==================================================

msbuild tinyxml2/tinyxml2.sln /p:WindowsTargetPlatformVersion=10.0.18362.0 /p:PlatformToolset=v140 /p:Configuration=Release-Lib /p:Platform=Win32 /t:Clean,Build

REM verify necessary libraries were successfully built
if NOT exist "%INSTALL_DIR%\tinyxml2\Release-Lib\tinyxml2.lib" goto :build_failure
if NOT exist "%INSTALL_DIR%\tinyxml2.cpp" goto :build_failure
if NOT exist "%INSTALL_DIR%\tinyxml2.h" goto :build_failure


Expand Down
2 changes: 1 addition & 1 deletion encfs/compatwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ unix::closedir(unix::DIR* dir)
return 0;
}

void utf8_to_wchar_buf(const char *src, wchar_t *res, int maxlen);
int utf8_to_wchar_buf(const char *src, wchar_t *res, int maxlen);
std::string wchar_to_utf8_cstr(const wchar_t *str);

struct unix::dirent*
Expand Down
4 changes: 2 additions & 2 deletions encfs/encfs-installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ Section "VC++ Redist v140" SEC02
SectionEnd

Section "Dokany" SEC03
File "${DEP_DIR}\DokanSetup_redist-${DOKAN_VERSION}.exe"
ExecWait "$INSTDIR\DokanSetup_redist-${DOKAN_VERSION}.exe /install /passive /norestart"
File "${DEP_DIR}\DokanSetup-${DOKAN_VERSION}.exe"
ExecWait "$INSTDIR\DokanSetup-${DOKAN_VERSION}.exe /install /passive /norestart"
SectionEnd

Section "encfs" SEC04
Expand Down
1 change: 1 addition & 0 deletions encfs/encfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include "fuse.h"
#include "easylogging++.h"
#include "tinyxml2.h"
#include <sys/types.h>
#include "unistd.h"
#include "pthread.h"
Expand Down
5 changes: 4 additions & 1 deletion encfs/encfs.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,14 @@
<AdditionalIncludeDirectories>..\;$(OPENSSL_ROOT)\include;$(DOKAN_ROOT)\dokan_fuse\include;$(DOKAN_ROOT)\sys;..\deps\tinyxml2;..\deps\easyloggingpp\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;ENCFS_EXPORTS;RLOG_COMPONENT=rlog;_CRT_SECURE_NO_WARNINGS;DEFAULT_CASE_INSENSITIVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(DOKAN_ROOT)\Win32\Release\dokan1.lib;$(DOKAN_ROOT)\Win32\Release\dokanfuse1.lib;$(OPENSSL_ROOT)\lib\libeay32.lib;$(OPENSSL_ROOT)\lib\ssleay32.lib;..\deps\tinyxml2\tinyxml2\Release-Lib\tinyxml2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>$(DOKAN_ROOT)\Win32\Release\dokan2.lib;$(DOKAN_ROOT)\Win32\Release\dokanfuse2.lib;$(OPENSSL_ROOT)\lib\libeay32.lib;$(OPENSSL_ROOT)\lib\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
Expand All @@ -143,6 +144,7 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\deps\easyloggingpp\src\easylogging++.cc" />
<ClCompile Include="..\deps\tinyxml2\tinyxml2.cpp" />
<ClCompile Include="autosprintf.cpp" />
<ClCompile Include="base64.cpp" />
<ClCompile Include="BlockFileIO.cpp" />
Expand Down Expand Up @@ -179,6 +181,7 @@
<ClCompile Include="XmlReader.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\deps\tinyxml2\tinyxml2.h" />
<ClInclude Include="autosprintf.h" />
<ClInclude Include="base64.h" />
<ClInclude Include="BlockFileIO.h" />
Expand Down
6 changes: 6 additions & 0 deletions encfs/encfs.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@
<ClCompile Include="..\deps\easyloggingpp\src\easylogging++.cc">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\deps\tinyxml2\tinyxml2.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="autosprintf.h">
Expand Down Expand Up @@ -248,5 +251,8 @@
<ClInclude Include="Error.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\deps\tinyxml2\tinyxml2.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
5 changes: 4 additions & 1 deletion encfs/encfsctl.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,14 @@
<AdditionalIncludeDirectories>..\;$(OPENSSL_ROOT)\include;$(DOKAN_ROOT)\dokan_fuse\include;$(DOKAN_ROOT)\sys;..\deps\tinyxml2;..\deps\easyloggingpp\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;ENCFS_EXPORTS;RLOG_COMPONENT=rlog-ctl;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(DOKAN_ROOT)\Win32\Release\dokan1.lib;$(DOKAN_ROOT)\Win32\Release\dokanfuse1.lib;$(OPENSSL_ROOT)\lib\libeay32.lib;$(OPENSSL_ROOT)\lib\ssleay32.lib;..\deps\tinyxml2\tinyxml2\Release-Lib\tinyxml2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>$(DOKAN_ROOT)\Win32\Release\dokan2.lib;$(DOKAN_ROOT)\Win32\Release\dokanfuse2.lib;$(OPENSSL_ROOT)\lib\libeay32.lib;$(OPENSSL_ROOT)\lib\ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
Expand All @@ -143,6 +144,7 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\deps\easyloggingpp\src\easylogging++.cc" />
<ClCompile Include="..\deps\tinyxml2\tinyxml2.cpp" />
<ClCompile Include="autosprintf.cpp" />
<ClCompile Include="base64.cpp" />
<ClCompile Include="BlockFileIO.cpp" />
Expand Down Expand Up @@ -178,6 +180,7 @@
<ClCompile Include="XmlReader.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\deps\tinyxml2\tinyxml2.h" />
<ClInclude Include="autosprintf.h" />
<ClInclude Include="base64.h" />
<ClInclude Include="BlockFileIO.h" />
Expand Down
6 changes: 6 additions & 0 deletions encfs/encfsctl.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@
<ClCompile Include="..\deps\easyloggingpp\src\easylogging++.cc">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\deps\tinyxml2\tinyxml2.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="autosprintf.h">
Expand Down Expand Up @@ -248,5 +251,8 @@
<ClInclude Include="Error.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\deps\tinyxml2\tinyxml2.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions encfs/encfsw.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;DEFAULT_CASE_INSENSITIVE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader />
<WarningLevel>Level3</WarningLevel>
Expand All @@ -90,7 +90,7 @@
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalDependencies>$(DOKAN_ROOT)\Win32\Release\dokan1.lib;$(DOKAN_ROOT)\Win32\Release\dokanfuse1.lib;$(DOKAN_ROOT)\dokan_fuse\Win32\Release\*.obj;$(OPENSSL_ROOT)\lib\libeay32.lib;$(OPENSSL_ROOT)\lib\ssleay32.lib;..\deps\tinyxml2\tinyxml2\Release-Lib\tinyxml2.lib;Release\encfs\*.obj;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>$(DOKAN_ROOT)\Win32\Release\dokan2.lib;$(DOKAN_ROOT)\Win32\Release\dokanfuse2.lib;$(DOKAN_ROOT)\dokan_fuse\Win32\Release\*.obj;$(OPENSSL_ROOT)\lib\libeay32.lib;$(OPENSSL_ROOT)\lib\ssleay32.lib;Release\encfs\*.obj;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion encfs/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ int main(int argc, char *argv[]) {
#ifdef USE_LEGACY_DOKAN
hinstLib = LoadLibrary(TEXT("dokan.dll"));
#else
hinstLib = LoadLibrary(TEXT("dokan1.dll"));
hinstLib = LoadLibrary(TEXT("dokan2.dll"));
#endif
if (hinstLib == NULL) {
RLOG(ERROR) << "ERROR: Unable to load Dokan FUSE library";
Expand Down
2 changes: 1 addition & 1 deletion encfs/win/maingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ static bool CheckDokan()

HMODULE dll = LoadLibraryA("dokan.dll");
if (!dll) {
dll = LoadLibraryA("dokan1.dll");
dll = LoadLibraryA("dokan2.dll");
if (!dll) return false;
}

Expand Down
8 changes: 4 additions & 4 deletions package.bat
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ REM along with this program. If not, see <http://www.gnu.org/licenses/>.
REM Up front environment variables
set PROJECT_DIR=%CD%
set DEP_DIR="%PROJECT_DIR%\..\encfs-bin\"
set PRODUCT_VERSION="1.11.0-beta.2"
set DOKAN_VERSION="1.3.1.1000"
set PRODUCT_VERSION="1.11.0-beta.3"
set DOKAN_VERSION="2.0.4.1000"



Expand Down Expand Up @@ -68,8 +68,8 @@ echo Checking dependencies folder '%DEP_DIR%'
echo Looking for encfs4win.ico ...
if NOT exist "%DEP_DIR%\encfs4win.ico" goto :no_deps

echo Looking for DokanSetup_redist-%DOKAN_VERSION%.exe
if NOT exist "%DEP_DIR%\DokanSetup_redist-%DOKAN_VERSION%.exe" goto :no_deps
echo Looking for DokanSetup-%DOKAN_VERSION%.exe
if NOT exist "%DEP_DIR%\DokanSetup-%DOKAN_VERSION%.exe" goto :no_deps



Expand Down

0 comments on commit c1d0028

Please sign in to comment.