Skip to content

Commit

Permalink
added binkw64 exports
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirteenAG committed May 24, 2024
1 parent d11d181 commit c2f36b3
Show file tree
Hide file tree
Showing 9 changed files with 309 additions and 200 deletions.
15 changes: 9 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,23 @@ This is a DLL file which adds ASI plugin loading functionality to any game, whic
- winmm.dll ([x86](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/winmm-Win32.zip) and [x64](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/winmm-x64.zip))
- winhttp.dll ([x86](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/winhttp-Win32.zip) and [x64](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/winhttp-x64.zip))
- [xlive.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/xlive-Win32.zip) (x86)
- [binkw32.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/binkw32-Win32.zip) (rename original to binkw32Hooked.dll, optional)
- [bink2w64.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/bink2w64-x64.zip) (rename original to bink2w64Hooked.dll)
- [vorbisFile.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/vorbisFile-Win32.zip) (rename original to vorbisHooked.dll, optional)
- [binkw32.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/binkw32-Win32.zip) (x86)
- [bink2w32.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/bink2w32-Win32.zip) (x86)
- [binkw64.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/binkw64-x64.zip) (x64)
- [bink2w64.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/bink2w64-x64.zip) (x64)
- [vorbisFile.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/vorbisFile-Win32.zip) (x86)

It is possible(and sometimes necessary) to load the original dll by renaming it to `<dllname>Hooked.dll`, e.g. `d3d12Hooked.dll`.
With **binkw32.dll** and **vorbisFile.dll** it is optional and you can simply replace the dll. Always make a backup before replacing any files.

With the last two, it is possible to load the original dll by renaming it to 'vorbisHooked.dll' or 'binkw32Hooked.dll'.
Usually it is not required and you can simply replace the dll. Always make a backup before replacing any files.

## INSTALLATION

In order to install it, you just need to place DLL into game directory. Usually it works as dinput8.dll, but if it's not, there is a possibility to rename it(see the list of supported names above).

## USAGE

Put ASI files in game root directory, 'scripts' or 'plugins' folder.
Put ASI files in game root directory, 'scripts', 'plugins' or 'update' folder.
If configuration is necessary, global.ini file can be placed to 'scripts' or 'plugins' folder. It can be used alongside the chosen dll and if so, it is also possible to use dll name for ini file, e.g. version.dll/version.ini.
[See example of global.ini here](https://github.com/ThirteenAG/Ultimate-ASI-Loader/blob/master/data/scripts/global.ini).

Expand Down
2 changes: 1 addition & 1 deletion release-Win32.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set list=d3d8, d3d9, d3d10, d3d11, d3d12, ddraw, dinput, dinput8, dsound, msacm32, msvfw32, version, wininet, winmm, winhttp, xlive, vorbisFile, binkw32
set list=d3d8, d3d9, d3d10, d3d11, d3d12, ddraw, dinput, dinput8, dsound, msacm32, msvfw32, version, wininet, winmm, winhttp, xlive, vorbisFile, binkw32, bink2w32
mkdir dist\Win32
cd .\bin\Win32\Release
(for %%a in (%list%) do (
Expand Down
2 changes: 1 addition & 1 deletion release-x64.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set list=d3d9, d3d10, d3d11, d3d12, dinput8, dsound, version, wininet, winmm, winhttp, bink2w64
set list=d3d9, d3d10, d3d11, d3d12, dinput8, dsound, version, wininet, winmm, winhttp, binkw64, bink2w64
mkdir dist\x64
cd bin\x64\Release\
(for %%a in (%list%) do (
Expand Down
15 changes: 9 additions & 6 deletions release.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,20 @@ This is a DLL file which adds ASI plugin loading functionality to any game, whic
- winmm.dll ([x86](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/winmm-Win32.zip) and [x64](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/winmm-x64.zip))
- winhttp.dll ([x86](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/winhttp-Win32.zip) and [x64](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/winhttp-x64.zip))
- [xlive.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/xlive-Win32.zip) (x86)
- [binkw32.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/binkw32-Win32.zip) (rename original to binkw32Hooked.dll, optional)
- [bink2w64.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/bink2w64-x64.zip) (rename original to bink2w64Hooked.dll)
- [vorbisFile.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/vorbisFile-Win32.zip) (rename original to vorbisHooked.dll, optional)
- [binkw32.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/binkw32-Win32.zip) (x86)
- [bink2w32.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/bink2w32-Win32.zip) (x86)
- [binkw64.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/binkw64-x64.zip) (x64)
- [bink2w64.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/x64-latest/bink2w64-x64.zip) (x64)
- [vorbisFile.dll](https://github.com/ThirteenAG/Ultimate-ASI-Loader/releases/download/Win32-latest/vorbisFile-Win32.zip) (x86)

It is possible(and sometimes necessary) to load the original(or another) dll by renaming it to `<dllname>Hooked.dll`, e.g. `d3d12Hooked.dll`.
With **binkw32.dll** and **vorbisFile.dll** it is optional and you can simply replace the dll. Always make a backup before replacing any files.

With the last two, it is possible to load the original dll by renaming it to 'vorbisHooked.dll' or 'binkw32Hooked.dll'.
Usually it is not required and you can simply replace the dll. Always make a backup before replacing any files.

## INSTALLATION

In order to install it, you just need to place DLL into game directory. Usually it works as dinput8.dll, but if it's not, there is a possibility to rename it(see the list of supported names above).

## USAGE

Put ASI files in game root directory, 'scripts' or 'plugins' folder.
Put ASI files in game root directory, 'scripts', 'plugins' or 'update' folder.
4 changes: 2 additions & 2 deletions release.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$aliases_array_Win32 = "d3d8", "d3d9", "d3d10", "d3d11", "d3d12", "dinput8", "ddraw", "dinput", "dsound", "msacm32", "msvfw32", "version", "wininet", "winmm", "winhttp", "xlive", "vorbisFile", "binkw32"
$aliases_array_x64 = "d3d9", "d3d10", "d3d11", "d3d12", "dinput8", "dsound", "version", "wininet", "winmm", "winhttp", "bink2w64"
$aliases_array_Win32 = "d3d8", "d3d9", "d3d10", "d3d11", "d3d12", "dinput8", "ddraw", "dinput", "dsound", "msacm32", "msvfw32", "version", "wininet", "winmm", "winhttp", "xlive", "vorbisFile", "binkw32", "bink2w32"
$aliases_array_x64 = "d3d9", "d3d10", "d3d11", "d3d12", "dinput8", "dsound", "version", "wininet", "winmm", "winhttp", "binkw64", "bink2w64"
$platform_array = "Win32", "x64"
$hash_alrg = "SHA512"

Expand Down
21 changes: 16 additions & 5 deletions source/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ void LoadOriginalLibrary()
szLocalPath += L"binkw32Hooked.dll";
if (std::filesystem::exists(szLocalPath))
{
binkw32.LoadOriginalLibrary(LoadLib(szLocalPath), false);
bink2w32.LoadOriginalLibrary(LoadLib(szLocalPath), false);
}
else
{
Expand All @@ -555,7 +555,7 @@ void LoadOriginalLibrary()
size_t dwResourceSize = SizeofResource(hm, hResource);
if (0 != dwResourceSize)
{
binkw32.LoadOriginalLibrary(ogMemModule = MemoryLoadLibrary((const void*)pLockedResource, dwResourceSize), true);
bink2w32.LoadOriginalLibrary(ogMemModule = MemoryLoadLibrary((const void*)pLockedResource, dwResourceSize), true);
}
}
}
Expand All @@ -567,7 +567,7 @@ void LoadOriginalLibrary()
szLocalPath += L"bink2w32Hooked.dll";
if (std::filesystem::exists(szLocalPath))
{
binkw32.LoadOriginalLibrary(LoadLib(szLocalPath), false);
bink2w32.LoadOriginalLibrary(LoadLib(szLocalPath), false);
}
}
else if (iequals(szSelfName, L"xlive.dll"))
Expand All @@ -593,6 +593,14 @@ void LoadOriginalLibrary()
bink2w64.LoadOriginalLibrary(LoadLib(szLocalPath));
}
}
else if (iequals(szSelfName, L"binkw64.dll"))
{
szLocalPath += L"binkw64Hooked.dll";
if (std::filesystem::exists(szLocalPath))
{
bink2w64.LoadOriginalLibrary(LoadLib(szLocalPath));
}
}
else
#endif
{
Expand Down Expand Up @@ -799,8 +807,11 @@ void LoadPlugins()

SetCurrentDirectoryW(szSelfPath.c_str());

if (SetCurrentDirectoryW(L"update\\"))
FindFiles(&fd);
if (!sFileLoaderPath.empty())
{
if (SetCurrentDirectoryW(sFileLoaderPath.wstring().c_str()))
FindFiles(&fd);
}
}

SetCurrentDirectoryW(oldDir.c_str()); // Reset the current directory
Expand Down
Loading

0 comments on commit c2f36b3

Please sign in to comment.