Skip to content
Merged
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
4 changes: 2 additions & 2 deletions utils/buildactions/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function os.sha256_file(path)
local windows = os.host() == "windows"
local s, errc
if windows then
s, errc = os.outputof(string.format("CertUtil -hashfile \"%s\" SHA256", path))
s, errc = os.outputof(string.format("call \"utils\\7z\\7za.exe\" h -scrcSHA256 \"%s\"", path))
else
s, errc = os.outputof(string.format("sha256sum \"%s\" | awk '{ print $1 }'", path))
end
Expand All @@ -109,7 +109,7 @@ function os.sha256_file(path)

-- Clean windows output
if windows then
s = (s:match("\n(.*)\n(.*)") or ""):gsub(" ", "")
s = (s:match("SHA256 for data: +([^\n]*)") or "")
end

return s:lower()
Expand Down
2 changes: 1 addition & 1 deletion win-build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ IF /i [%2] == [Win32] (
set BUILD_PLATFORM=ARM64
) ELSE (
IF not [%2] == [] (
echo Invalid first argument %2. Using default platform %BUILD_PLATFORM%.
echo Invalid second argument %2. Using default platform %BUILD_PLATFORM%.
)
)

Expand Down
42 changes: 42 additions & 0 deletions wine-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

if [ -z "$MSBUILDPATH" ]; then
echo "Could not find MSBuild. Make sure the MSBUILDPATH environment variable points"
echo "to either MSBuild.exe or a script that handles the invocation of MSBuild.exe."
echo ""
echo "If using msvc-wine, it should point to /path/to/msvc-wine-install-dir/bin/x64/msbuild"
exit 1
fi
echo "Found MSBuild at: $MSBUILDPATH"

BUILD_CONFIGURATION=Release
BUILD_PLATFORM=Win32

# Read configuration (1st parameter)
case ${1,,} in
debug) BUILD_CONFIGURATION=Debug ;;
release) BUILD_CONFIGURATION=Release ;;
"") ;;
*) echo "Invalid first argument $1. Using default configuration $BUILD_CONFIGURATION." ;;
esac

# Read platform (2nd parameter)
case ${2,,} in
win32) BUILD_PLATFORM=Win32 ;;
x64) BUILD_PLATFORM=x64 ;;
arm) BUILD_PLATFORM=ARM ;;
arm64) BUILD_PLATFORM=ARM64 ;;
"") ;;
*) echo "Invalid second argument $2. Using default platform $BUILD_PLATFORM." ;;
esac

echo "Build configuration:"
echo " BUILD_CONFIGURATION = $BUILD_CONFIGURATION"
echo " BUILD_PLATFORM = $BUILD_PLATFORM"

# Create solution (ignoring pause)
wine win-create-projects.bat < /dev/null
echo ""

# Start compiling
"$MSBUILDPATH" Build/MTASA.sln -property:Configuration="$BUILD_CONFIGURATION" -property:Platform="$BUILD_PLATFORM" -maxCpuCount
Loading