Create hello-platform for macOS (#10)
Co-authored-by: Михаил Капелько <kornerr@gmail.com>
This commit is contained in:
1 parent
8913022044
commit
1aa218d0bb
186 files changed
+519
-7
No files matched your search
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
TARGET=$1
|
||||
STEP=$((STEP+1))
|
||||
echo -e "\n> > > > Step №$STEP. Build '$TARGET' for macOS"
|
||||
|
||||
if [[ -z "${RAYLIB_PREFIX:-}" ]]; then
|
||||
RAYLIB_PREFIX="$(HOMEBREW_NO_AUTO_UPDATE=1 brew --prefix raylib 2>/dev/null)"
|
||||
fi
|
||||
export RAYLIB_PREFIX
|
||||
echo "Raylib: $RAYLIB_PREFIX"
|
||||
|
||||
cd $SDIR/../$TARGET/ver-mac
|
||||
swift build
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
DEP="raylib-ios-xcframeworks"
|
||||
|
||||
STEP=$((STEP+1))
|
||||
echo -e "\n> > > > Step №$STEP. Check $DEP presence"
|
||||
|
||||
MISSING=0
|
||||
[[ -e $SDIR/../../$RAYLIB_IOS ]] || MISSING=1
|
||||
[[ -e $SDIR/../../$RAYLIB_IOS_EGL ]] || MISSING=1
|
||||
[[ -e $SDIR/../../$RAYLIB_IOS_GLES ]] || MISSING=1
|
||||
|
||||
if [[ $MISSING -eq 1 ]]; then
|
||||
echo "ERROR $DEP not found alongside this project"
|
||||
exit 1
|
||||
fi
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
TARGET=$1
|
||||
STEP=$((STEP+1))
|
||||
echo -e "\n> > > > Step №$STEP. Generate Dialect for '$TARGET'"
|
||||
|
||||
$SDIR/../../dialect/util/run-generator --file=$SDIR/../$TARGET/dialect.yml
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
TARGET=$1
|
||||
|
||||
STEP=$((STEP+1))
|
||||
echo -e "\n> > > > Step №$STEP. Generate iOS project for '$TARGET'"
|
||||
|
||||
cd $SDIR/../$TARGET/ver-ios
|
||||
xcodegen
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
TARGET=$1
|
||||
APP_NAME=$2
|
||||
|
||||
STEP=$((STEP+1))
|
||||
echo -e "\n> > > > Step №$STEP. Make '$APP_NAME' macOS package for '$TARGET'"
|
||||
|
||||
APP_MAC="$SDIR/../$TARGET/ver-mac/.build/$APP_NAME.app"
|
||||
rm -rf "$APP_MAC"
|
||||
|
||||
APP_DAT="$APP_MAC/Contents"
|
||||
mkdir -p "$APP_DAT/MacOS"
|
||||
mkdir -p "$APP_DAT/Resources"
|
||||
cp $SDIR/../$TARGET/ver-mac/.build/debug/$TARGET "$APP_DAT/MacOS/$TARGET"
|
||||
cp $SDIR/../$TARGET/ver-mac/Info.plist "$APP_DAT/Info.plist"
|
||||
# Copy resources with symlink dereferencing
|
||||
cp -R -L $SDIR/../$TARGET/ver-mac/res/* "$APP_DAT/Resources/"
|
||||
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
TARGET=$1
|
||||
|
||||
STEP=$((STEP+1))
|
||||
echo -e "\n> > > > Step №$STEP. Prepare ANGLE includes for '$TARGET'"
|
||||
|
||||
BUILD=$SDIR/../$TARGET/ver-ios/.build
|
||||
INC=$BUILD/include
|
||||
LIB=$BUILD/lib
|
||||
mkdir -p $INC $LIB
|
||||
|
||||
# Create EGL and GLES symlinks because their internal includes refer to each other
|
||||
# without knowing of XCFramework bounderies
|
||||
ln -sfn "$SDIR/../../$RAYLIB_IOS_EGL/ios-arm64_x86_64-simulator/libEGL.framework/Headers" "$INC/libEGL"
|
||||
ln -sfn "$SDIR/../../$RAYLIB_IOS_GLES/ios-arm64_x86_64-simulator/libGLESv2.framework/Headers" "$INC/libGLESv2"
|
||||
|
||||
# Symlink libraries for convenience, too
|
||||
|
||||
ln -sfn "$SDIR/../../$RAYLIB_IOS" "$LIB"
|
||||
ln -sfn "$SDIR/../../$RAYLIB_IOS_EGL" "$LIB"
|
||||
ln -sfn "$SDIR/../../$RAYLIB_IOS_GLES" "$LIB"
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
TARGET=$1
|
||||
APP_NAME=$2
|
||||
STEP=$((STEP+1))
|
||||
echo -e "\n> > > > Step №$STEP. Run macOS app for '$TARGET'"
|
||||
|
||||
"$SDIR/../$TARGET/ver-mac/.build/$APP_NAME.app/Contents/MacOS/$TARGET"
|
||||
Reference in new issue
Block a user