22
33version=" "
44main_version=" "
5+ replace_sdl=" false"
56
67for line in ` cat ./build/version`
78do
1314 main_version=$line
1415done
1516
17+ build_sdl_arm64 ()
18+ {
19+ git clone https://github.com/libsdl-org/SDL.git
20+ cd SDL
21+ mkdir build
22+ cd build
23+ ../configure
24+ make -j8
25+ cd ../../
26+ }
27+
1628build_osx ()
1729{
1830 zip_name=" colormc-macos-$main_version$version -$2 .zip"
@@ -48,7 +60,17 @@ build_osx()
4860
4961 chmod a+x $dir /ColorMC.Launcher
5062
63+ if [$1 = ' aarch64' ] && [replace_sdl = ' true' ] ; then
64+ build_sdl_arm64
65+ fi
66+
5167 cd ./src/build_out/$1 -dotnet
68+
69+ if [$1 = ' aarch64' ] && [replace_sdl = ' true' ] ; then
70+ rm libSDL2-2.0.dylib
71+ cp ../../../SDL/build/build/.libs/libSDL2-2.0.0.dylib libSDL2-2.0.dylib
72+ fi
73+
5274 codesign --force --deep --sign - ColorMC.app
5375 zip -r $zip_name ./ColorMC.app
5476 mv $zip_name ../../../build_out/$zip_name
@@ -92,29 +114,25 @@ build_osx_min()
92114
93115 chmod a+x $dir /ColorMC.Launcher
94116
117+ if [$1 = ' aarch64' ] && [replace_sdl = ' true' ] ; then
118+ build_sdl_arm64
119+ fi
120+
95121 cd ./src/build_out/$1 -min
122+
123+ if [$1 = ' aarch64' ] && [replace_sdl = ' true' ] ; then
124+ rm libSDL2-2.0.dylib
125+ cp ../../../SDL/build/build/.libs/libSDL2-2.0.0.dylib libSDL2-2.0.dylib
126+ fi
127+
96128 zip -r $zip_name ./ColorMC.app
97129 mv $zip_name ../../../build_out/$zip_name
98130 cd ../../../
99131
100132 echo " $zip_name build done"
101133}
102134
103- build_sdl_arm64 ()
104- {
105- git clone https://github.com/libsdl-org/SDL.git
106- cd SDL
107- mkdir build
108- cd build
109- ../configure
110- make
111-
112-
113- }
114-
115135build_osx osx-x64 x86_64
116136build_osx osx-arm64 aarch64
117137build_osx_min osx-x64 x86_64
118- build_osx_min osx-arm64 aarch64
119-
120- build_sdl_arm64
138+ build_osx_min osx-arm64 aarch64
0 commit comments