File tree Expand file tree Collapse file tree 3 files changed +45
-3
lines changed Expand file tree Collapse file tree 3 files changed +45
-3
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ function os.sha256_file(path)
96
96
local windows = os .host () == " windows"
97
97
local s , errc
98
98
if windows then
99
- s , errc = os .outputof (string.format (" CertUtil -hashfile \" %s\" SHA256 " , path ))
99
+ s , errc = os .outputof (string.format (" call \" utils \\ 7z \\ 7za.exe \" h -scrcSHA256 \" %s\" " , path ))
100
100
else
101
101
s , errc = os .outputof (string.format (" sha256sum \" %s\" | awk '{ print $1 }'" , path ))
102
102
end
@@ -109,7 +109,7 @@ function os.sha256_file(path)
109
109
110
110
-- Clean windows output
111
111
if windows then
112
- s = (s :match (" \n (.*) \n (. *)" ) or " " ): gsub ( " " , " " )
112
+ s = (s :match (" SHA256 for data: +([^ \n ] *)" ) or " " )
113
113
end
114
114
115
115
return s :lower ()
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ IF /i [%2] == [Win32] (
45
45
set BUILD_PLATFORM = ARM64
46
46
) ELSE (
47
47
IF not [%2 ] == [] (
48
- echo Invalid first argument %2 . Using default platform %BUILD_PLATFORM% .
48
+ echo Invalid second argument %2 . Using default platform %BUILD_PLATFORM% .
49
49
)
50
50
)
51
51
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ if [ -z " $MSBUILDPATH " ]; then
4
+ echo " Could not find MSBuild. Make sure the MSBUILDPATH environment variable points"
5
+ echo " to either MSBuild.exe or a script that handles the invocation of MSBuild.exe."
6
+ echo " "
7
+ echo " If using msvc-wine, it should point to /path/to/msvc-wine-install-dir/bin/x64/msbuild"
8
+ exit 1
9
+ fi
10
+ echo " Found MSBuild at: $MSBUILDPATH "
11
+
12
+ BUILD_CONFIGURATION=Release
13
+ BUILD_PLATFORM=Win32
14
+
15
+ # Read configuration (1st parameter)
16
+ case ${1,,} in
17
+ debug) BUILD_CONFIGURATION=Debug ;;
18
+ release) BUILD_CONFIGURATION=Release ;;
19
+ " " ) ;;
20
+ * ) echo " Invalid first argument $1 . Using default configuration $BUILD_CONFIGURATION ." ;;
21
+ esac
22
+
23
+ # Read platform (2nd parameter)
24
+ case ${2,,} in
25
+ win32) BUILD_PLATFORM=Win32 ;;
26
+ x64) BUILD_PLATFORM=x64 ;;
27
+ arm) BUILD_PLATFORM=ARM ;;
28
+ arm64) BUILD_PLATFORM=ARM64 ;;
29
+ " " ) ;;
30
+ * ) echo " Invalid second argument $2 . Using default platform $BUILD_PLATFORM ." ;;
31
+ esac
32
+
33
+ echo " Build configuration:"
34
+ echo " BUILD_CONFIGURATION = $BUILD_CONFIGURATION "
35
+ echo " BUILD_PLATFORM = $BUILD_PLATFORM "
36
+
37
+ # Create solution (ignoring pause)
38
+ wine win-create-projects.bat < /dev/null
39
+ echo " "
40
+
41
+ # Start compiling
42
+ " $MSBUILDPATH " Build/MTASA.sln -property:Configuration=" $BUILD_CONFIGURATION " -property:Platform=" $BUILD_PLATFORM " -maxCpuCount
You can’t perform that action at this time.
0 commit comments