-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
322 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,6 @@ xcuserdata/ | |
*.sh | ||
*.psd | ||
bin/* | ||
.www | ||
www | ||
examples/Kelvin.* | ||
examples/Celsius.* | ||
*.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/bin/bash | ||
DIR=$(dirname "$0") | ||
|
||
clear | ||
ANSI_ART=$(cat <<EOF | ||
\e[0;m \e[48;5;214m \e[0;m \e[0;m | ||
\e[48;5;214m \e[0;m \e[48;5;214m \e[0;m \e[48;5;214m \e[0;m | ||
\e[48;5;214m \e[0;m \e[48;5;214m \e[0;m \e[48;5;214m \e[0;m | ||
\e[48;5;214m \e[0;m \e[48;5;214m \e[0;m \e[48;5;214m \e[0;m | ||
\e[48;5;214m \e[0;m \e[48;5;214m \e[0;m \e[48;5;214m \e[0;m | ||
\e[48;5;214m \e[0;m \e[48;5;214m \e[0;m \e[48;5;214m \e[0;m | ||
\e[48;5;214m \e[0;m \e[48;5;214m \e[0;m \e[48;5;214m \e[0;m | ||
\e[48;5;214m \e[0;m \e[48;5;214m \e[0;m \e[48;5;214m \e[0;m | ||
\e[48;5;214m \e[0;m \e[48;5;214m \e[0;m \e[48;5;214m \e[0;m | ||
\e[48;5;214m \e[0;m \e[48;5;214m \e[0;m \e[48;5;214m \e[0;m | ||
\e[48;5;214m \e[0;m \e[48;5;214m \e[0;m \e[48;5;214m \e[0;m | ||
\e[0;m \e[48;5;214m \e[0;m \e[0;m | ||
EOF | ||
) | ||
printf "$ANSI_ART\n" | ||
|
||
cd $DIR | ||
|
||
# Use find to locate the .xcodeproj file | ||
xcodeproj_file=$(find . -name "*.xcodeproj" -print -quit) | ||
|
||
# Check if a .xcodeproj file was found | ||
if [ -n "$xcodeproj_file" ]; then | ||
xcodeproj_name=$(basename "$xcodeproj_file" .xcodeproj) | ||
else | ||
echo "No .xcodeproj file found." | ||
read | ||
# Close the Terminal window | ||
osascript -e 'tell application "Terminal" to close window 1' & exit | ||
fi | ||
|
||
# Ask the user a question | ||
CPU=$(osascript -e 'display dialog "CPU?" buttons {"x86_64", "i386", "aarch64"} default button "x86_64"') | ||
CPU=$xcodeproj_name_${CPU#button returned:} | ||
|
||
# Process the results | ||
TARGET=$CPU-linux-gnu | ||
|
||
# Compiling Code... | ||
if [ ! -d "bin" ]; then | ||
mkdir bin | ||
fi | ||
if [ ! -d "bin/linux" ]; then | ||
mkdir bin/linux | ||
fi | ||
if [ ! -d "bin/linux/$CPU" ]; then | ||
mkdir bin/linux/$CPU | ||
fi | ||
|
||
echo "Compiling Code..." | ||
zig c++ -target $TARGET -std=c++20 -o bin/linux/$CPU/$xcodeproj_name src/*.cpp -s | ||
|
||
|
||
# Close the Terminal window | ||
osascript -e 'tell application "Terminal" to close window 1' & exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/bin/bash | ||
DIR=$(dirname "$0") | ||
clear | ||
ANSI_ART=$(cat <<EOF | ||
\e[0;m \e[48;5;34m \e[0;m \e[0;m | ||
\e[0;m \e[48;5;34m \e[0;m \e[0;m | ||
\e[0;m \e[48;5;34m \e[0;m \e[0;m | ||
\e[0;m \e[0;m | ||
\e[0;m \e[48;5;34m \e[0;m \e[48;5;34m \e[0;m | ||
\e[0;m \e[48;5;220m \e[0;m | ||
\e[48;5;220m \e[0;m \e[0;m | ||
\e[48;5;208m \e[0;m \e[0;m | ||
\e[48;5;208m \e[0;m \e[0;m | ||
\e[48;5;160m \e[0;m \e[0;m | ||
\e[48;5;160m \e[0;m | ||
\e[0;m \e[48;5;125m \e[0;m | ||
\e[0;m \e[48;5;125m \e[0;m \e[0;m | ||
\e[0;m \e[48;5;38m \e[0;m \e[48;5;38m \e[0;m \e[0;m | ||
EOF | ||
) | ||
|
||
printf "$ANSI_ART\n" | ||
|
||
cd $DIR | ||
|
||
# Use find to locate the .xcodeproj file | ||
xcodeproj_file=$(find . -name "*.xcodeproj" -print -quit) | ||
|
||
# Check if a .xcodeproj file was found | ||
if [ -n "$xcodeproj_file" ]; then | ||
xcodeproj_name=$(basename "$xcodeproj_file" .xcodeproj) | ||
else | ||
echo "No .xcodeproj file found." | ||
# Close the Terminal window | ||
osascript -e 'tell application "Terminal" to close window 1' & exit | ||
fi | ||
|
||
# Compiling Code... | ||
|
||
if [ ! -d "bin" ]; then | ||
mkdir bin | ||
fi | ||
if [ ! -d "bin/macos" ]; then | ||
mkdir bin/macos | ||
fi | ||
|
||
echo "Compiling Code..." | ||
echo "macOS Universal Binary" | ||
g++ -arch x86_64 -arch arm64 -std=c++20 src/*.cpp -o bin/macos/$xcodeproj_name -Os -fno-ident -fno-asynchronous-unwind-tables | ||
strip bin/macos/$xcodeproj_name | ||
lipo -info bin/macos/$xcodeproj_name | ||
|
||
# Ask the user a question | ||
result=$(osascript -e 'display dialog "Do you want to sign this code?" buttons {"Yes", "No"} default button "Yes"') | ||
|
||
# Process the result | ||
if [[ "$result" == *"Yes"* ]]; then | ||
# Code Signing... | ||
echo "Code Signing... Please wait!" | ||
|
||
IDENTITY=$(security find-identity -v -p codesigning | grep "Developer ID Application" | awk '{print $2}') | ||
codesign -s "$IDENTITY" ./bin/macos/$xcodeproj_name | ||
fi | ||
|
||
# Close the Terminal window | ||
osascript -e 'tell application "Terminal" to close window 1' & exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.