-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgenerate_xcodeproj.sh
More file actions
executable file
·99 lines (90 loc) · 1.85 KB
/
generate_xcodeproj.sh
File metadata and controls
executable file
·99 lines (90 loc) · 1.85 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/bash
# Generate Xcode project for AppleNeuralEngine-Kit
echo "Generating Xcode project for AppleNeuralEngine-Kit..."
# Make sure script is executable
chmod +x $0
# Create an Assets.xcassets directory if it doesn't exist
mkdir -p Assets.xcassets/AppIcon.appiconset
# Create a basic Contents.json for the App Icon
cat > Assets.xcassets/AppIcon.appiconset/Contents.json << EOL
{
"images" : [
{
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
EOL
# Create Contents.json for Assets.xcassets
cat > Assets.xcassets/Contents.json << EOL
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
EOL
# Generate the Xcode project from the Swift package using Xcode
echo "Opening Package.swift in Xcode..."
open Package.swift
# Apply modifications to the generated project
xcodeproj="AppleNeuralEngine-Kit.xcodeproj"
if [ -d "$xcodeproj" ]; then
echo "Xcode project generated successfully."
echo "Opening Xcode project..."
open "$xcodeproj"
else
echo "Project generation failed. Please check for errors and try again."
fi
echo "Done."