File tree Expand file tree Collapse file tree 1 file changed +28
-4
lines changed Expand file tree Collapse file tree 1 file changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,6 @@ oshost=""
1818os=" "
1919test=
2020
21- if [[ $( uname -m) != * " 64" * ]]; then
22- platform=x86
23- fi
24-
2521build ()
2622{
2723 if [ $ci = true ]; then
@@ -180,6 +176,33 @@ detect_os()
180176 os=$oshost
181177}
182178
179+ detect_arch ()
180+ {
181+ if [ " $oshost " = " linux" ] || [ " $oshost " = " macosx" ]; then
182+ arch=$( uname -m)
183+ if [ " $arch " = " x86_64" ]; then
184+ platform=" x64"
185+ elif [ " $arch " = " arm64" ] || [ " $arch " = " aarch64" ]; then
186+ platform=" arm64"
187+ elif [ " $arch " = " i686" ] || [ " $arch " = " i386" ]; then
188+ platform=" x86"
189+ else
190+ echo " Unknown architecture: $arch "
191+ fi
192+ elif [ " $oshost " = " windows" ]; then
193+ arch=$( echo $PROCESSOR_ARCHITECTURE )
194+ if [ " $arch " = " AMD64" ]; then
195+ platform=" x64"
196+ elif [ " $arch " = " ARM64" ]; then
197+ platform=" arm64"
198+ elif [ " $arch " = " x86" ]; then
199+ platform=" x86"
200+ else
201+ echo " Unknown architecture: $arch "
202+ fi
203+ fi
204+ }
205+
183206find_msbuild ()
184207{
185208 if [ -x " $( command -v MSBuild.exe) " ]; then
@@ -191,6 +214,7 @@ find_msbuild()
191214
192215cmd=$( tr ' [:upper:]' ' [:lower:]' <<< $1 )
193216detect_os
217+ detect_arch
194218download_premake
195219
196220while [[ $# > 0 ]]; do
You can’t perform that action at this time.
0 commit comments