Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing the issue caused by web3auth not working due to it's using old version of BouncyCastle.Crypto.dll #694

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
15 changes: 9 additions & 6 deletions scripts/publish-to-unity-package.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ SET SCRIPT_DIR=%~dp0
echo Building project...
pushd "%SCRIPT_DIR%\..\src\ChainSafe.Gaming.Unity"

del obj /F /Q
del bin /F /Q
del obj \F \Q
del bin \F \Q
dotnet restore
dotnet publish -c release -f netstandard2.1 /property:Unity=true
if %errorlevel% neq 0 exit /b %errorlevel%
dotnet publish -c release -f netstandard2.1 \property:Unity=true
if %errorlevel% neq 0 exit \b %errorlevel%

echo Restoring non-Unity packages...

Expand All @@ -21,7 +21,7 @@ del UnityEngine.dll

if exist "..\..\..\..\..\..\Packages\io.chainsafe.web3-unity.lootboxes" (
echo Directory exists, performing actions...
rmdir /s /q "..\..\..\..\..\..\Packages\io.chainsafe.web3-unity.lootboxes\Chainlink\Runtime\Libraries"
rmdir \s \q "..\..\..\..\..\..\Packages\io.chainsafe.web3-unity.lootboxes\Chainlink\Runtime\Libraries"
mkdir "..\..\..\..\..\..\Packages\io.chainsafe.web3-unity.lootboxes\Chainlink\Runtime\Libraries"
copy Chainsafe.Gaming.Chainlink.dll "..\..\..\..\..\..\Packages\io.chainsafe.web3-unity.lootboxes\Chainlink\Runtime\Libraries"
copy Chainsafe.Gaming.LootBoxes.Chainlink.dll "..\..\..\..\..\..\Packages\io.chainsafe.web3-unity.lootboxes\Chainlink\Runtime\Libraries"
Expand All @@ -34,8 +34,11 @@ del Chainsafe.Gaming.LootBoxes.Chainlink.dll

del Microsoft.CSharp.dll
if not exist ..\..\..\..\..\..\Packages\io.chainsafe.web3-unity\Runtime\Libraries mkdir ..\..\..\..\..\..\Packages\io.chainsafe.web3-unity\Runtime\Libraries\
del ..\..\..\..\..\..\Packages\io.chainsafe.web3-unity\Runtime\Libraries\* /F /Q
del ..\..\..\..\..\..\Packages\io.chainsafe.web3-unity\Runtime\Libraries\* \F \Q
copy *.dll ..\..\..\..\..\..\Packages\io.chainsafe.web3-unity\Runtime\Libraries
rem Copy the old version that works with web3auth to the libraries folder
copy /Y "%SCRIPT_DIR%"\..\libs\Nethereum-UnityAOT\BouncyCastle.Crypto.dll "..\..\..\..\..\..\Packages\io.chainsafe.web3-unity\Runtime\Libraries"

popd
popd

Expand Down
2 changes: 2 additions & 0 deletions scripts/publish-to-unity-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ rm Microsoft.CSharp.dll
rm -rf ../../../../../../Packages/io.chainsafe.web3-unity/Runtime/Libraries
mkdir -p ../../../../../../Packages/io.chainsafe.web3-unity/Runtime/Libraries
cp *.dll ../../../../../../Packages/io.chainsafe.web3-unity/Runtime/Libraries
# Copy the old version that works with web3auth to the libraries folder
cp -f "$scripts_dir"/../libs/Nethereum-UnityAOT/BouncyCastle.Crypto.dll "../../../../../../Packages/io.chainsafe.web3-unity/Runtime/Libraries"
popd
popd
echo Done
8 changes: 8 additions & 0 deletions src/UnitySampleProject/Assets/Plugins.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading