forked from 360Controller/360Controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·40 lines (36 loc) · 2.03 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
DEV_NAME=`echo | grep DEVELOPER_NAME DeveloperSettings.xcconfig`
DEV_TEAM=`echo | grep DEVELOPMENT_TEAM DeveloperSettings.xcconfig`
CERT_ID="${DEV_NAME//\DEVELOPER_NAME = } (${DEV_TEAM//\DEVELOPMENT_TEAM = })"
mkdir -p build
zip -r build/360ControllerSource.zip * -x "build*"
xcrun xcodebuild -configuration Release -target "Whole Driver" -xcconfig "DeveloperSettings.xcconfig" OTHER_CODE_SIGN_FLAGS="--timestamp --options=runtime"
if [ $? -ne 0 ]
then
echo "******** BUILD FAILED ********"
exit 1
fi
cd Install360Controller
packagesbuild -v Install360Controller.pkgproj --identity "Developer ID Installer: ""${CERT_ID}"
mv build 360ControllerInstall
hdiutil create -srcfolder 360ControllerInstall -fs HFS+ -format UDZO ../build/360ControllerInstall.dmg
mv 360ControllerInstall build
cd ..
echo "** File contents **"
xcrun lipo -info build/Release/360Controller.kext/Contents/MacOS/360Controller
xcrun lipo -info build/Release/360Controller.kext/Contents/PlugIns/Feedback360.plugin/Contents/MacOS/Feedback360
xcrun lipo -info build/Release/360Daemon.app/Contents/MacOS/360Daemon
xcrun lipo -info build/Release/Pref360Control.prefPane/Contents/MacOS/Pref360Control
xcrun lipo -info build/Release/Pref360Control.prefPane/Contents/Resources/DriverTool
# xcrun lipo -info build/Release/WirelessGamingReceiver.kext/Contents/MacOS/WirelessGamingReceiver
# xcrun lipo -info build/Release/Wireless360Controller.kext/Contents/MacOS/Wireless360Controller
echo "** File signatures **"
xcrun spctl -a -v build/Release/360Controller.kext
xcrun spctl -a -v build/Release/360Controller.kext/Contents/PlugIns/Feedback360.plugin
xcrun spctl -a -v build/Release/360Daemon.app/Contents/MacOS/360Daemon
xcrun spctl -a -v build/Release/Pref360Control.prefPane
xcrun spctl -a -v build/Release/Pref360Control.prefPane/Contents/Resources/DriverTool
# xcrun spctl -a -v build/Release/WirelessGamingReceiver.kext
# xcrun spctl -a -v build/Release/Wireless360Controller.kext
xcrun spctl -a -v --type install Install360Controller/build/Install360Controller.pkg
echo "*** DONE ***"