Skip to content

Commit

Permalink
Update compile_windows.bat and the compile script
Browse files Browse the repository at this point in the history
  • Loading branch information
KcrPL committed Mar 8, 2021
1 parent 959e665 commit 68cf7c7
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Patchers output
wiimmfi-wads
backup-wads
src/WiiWarePatcher.exe
src/WiiWarePatcher_32bit.exe
src/WiiWarePatcher_64bit.exe

# Don't upload .WAD files
*.WAD
18 changes: 12 additions & 6 deletions Windows/WiiWarePatcher.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ set /a patchingnumber=1
set /a temperrorlev=0
::
set last_build=2021/03/08
set at=10:21
set at=11:19
:: ===========================================================================
:: WiiWare Patcher for Windows
set version=2.2.1
set version=2.2.2
:: AUTHORS: KcrPL,
:: ***************************************************************************
:: Copyright (c) 2021 RiiConnect24, and it's (Lead) Developers
Expand Down Expand Up @@ -574,10 +574,16 @@ curl -f -L -s -S %useragent_curl% --insecure "%FilesHostedOn%/WiiWarePatcher/Wad
set /a temperrorlev=%errorlevel%
if not %temperrorlev%==0 goto files_download_error
echo 80%%
curl -f -L -s -S %useragent_curl% --insecure "%FilesHostedOn%/WiiWarePatcher/WiiWarePatcher.exe" --output "WiiWarePatcher/WiiWarePatcher.exe"
set /a temperrorlev=%errorlevel%
if not %temperrorlev%==0 goto files_download_error

if %processor_architecture%==AMD64 (
curl -f -L -s -S %useragent_curl% --insecure "%FilesHostedOn%/WiiWarePatcher/WiiWarePatcher_64bit.exe" --output "WiiWarePatcher/WiiWarePatcher.exe"
set /a temperrorlev=%errorlevel%
if not %temperrorlev%==0 goto files_download_error
) else (
curl -f -L -s -S %useragent_curl% --insecure "%FilesHostedOn%/WiiWarePatcher/WiiWarePatcher_32bit.exe" --output "WiiWarePatcher/WiiWarePatcher.exe"
set /a temperrorlev=%errorlevel%
if not %temperrorlev%==0 goto files_download_error
)

goto choose_patch_type
:files_download_error
cls
Expand Down
Binary file modified Windows/WiiWarePatcher/WiiWarePatcher.exe
Binary file not shown.
19 changes: 16 additions & 3 deletions src/compile_windows.bat
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
@echo off
:: Install MinGW if you want to compile under Windows.
:: Make sure you have WSL (Windows Subsystem for Linux) installed and run this command:
:: sudo apt-get install mingw-w64 -y

echo Compiling...
g++ wiiwarepatcher.cpp -lws2_32 -static -o WiiWarePatcher.exe
echo.
echo - 32 bit...
wsl i686-w64-mingw32-g++ wiiwarepatcher.cpp -lws2_32 -static -o WiiWarePatcher_32bit.exe
if %errorlevel%==0 (
echo ^> OK!
) else (
echo Failed.
)
echo.
echo - 64 bit...
wsl x86_64-w64-mingw32-g++ wiiwarepatcher.cpp -lws2_32 -static -o WiiWarePatcher_64bit.exe
if %errorlevel%==0 (
echo OK!
echo ^> OK!
) else (
echo Failed.
)


echo.
echo Done!
pause

0 comments on commit 68cf7c7

Please sign in to comment.