-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finish build scrcpy on ios, add support libraries
- Loading branch information
Showing
9 changed files
with
529 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include | ||
lib |
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 |
---|---|---|
@@ -1,4 +1,22 @@ | ||
scrcpy-server: | ||
curl -o scrcpy-server/scrcpy-server -L https://github.com/Genymobile/scrcpy/releases/download/v1.18/scrcpy-server-v1.18 | ||
|
||
libsdl: | ||
OUTPUT=$$(pwd)/Libs ./Scripts/build-libsdl.sh | ||
|
||
ffmpeg: | ||
cd Libs && curl -O -L https://downloads.sourceforge.net/project/ffmpeg-ios/ffmpeg-ios-master.tar.bz2 | ||
cd Libs && bunzip2 ffmpeg-ios*.bz2 | ||
cd Libs && tar xvf ffmpeg-ios*.tar | ||
cd Libs && cp -av FFmpeg-iOS/include/* include | ||
cd Libs && cp -av FFmpeg-iOS/lib/* lib | ||
cd Libs && rm -rf FFmpeg-iOS README.md ffmpeg-* | ||
|
||
scrcpy-init: libsdl ffmpeg | ||
# generate config.h | ||
cd scrcpy-src && meson x --buildtype release --strip -Db_lto=true | ||
# fix build issues | ||
# 1. remove windows platform code | ||
rm -v scrcpy-src/app/src/sys/win/process.c | ||
|
||
.PHONY: scrcpy-server |
Large diffs are not rendered by default.
Oops, something went wrong.
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,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r"> | ||
<dependencies> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/> | ||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<scenes> | ||
<!--View Controller--> | ||
<scene sceneID="tne-QT-ifu"> | ||
<objects> | ||
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController"> | ||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> | ||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> | ||
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> | ||
</view> | ||
</viewController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> | ||
</objects> | ||
</scene> | ||
</scenes> | ||
</document> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
set -x; | ||
|
||
BUILD_DIR=$(mktemp -d -t SDL); | ||
cd $BUILD_DIR; | ||
|
||
curl -O https://www.libsdl.org/release/SDL2-2.0.14.tar.gz; | ||
tar xzvf SDL*.tar.gz; | ||
|
||
xcodebuild clean build BUILD_DIR=$BUILD_DIR/build ARCHS="arm64" CONFIGURATION=Release -project SDL2-*/Xcode/SDL/SDL.xcodeproj -scheme "Static Library-iOS" -sdk iphoneos; | ||
xcodebuild clean build BUILD_DIR=$BUILD_DIR/build ARCHS="x86_64" CONFIGURATION=Release -project SDL2-*/Xcode/SDL/SDL.xcodeproj -scheme "Static Library-iOS" -sdk iphonesimulator; | ||
|
||
lipo -create build/*/libSDL2.a -output build/libSDL2.a; | ||
file build/libSDL2.a; | ||
|
||
[[ -d "$OUTPUT/lib" ]] || mkdir -pv "$OUTPUT/lib"; | ||
[[ -d "$OUTPUT/include/SDL2" ]] || mkdir -pv $OUTPUT/include/SDL2; | ||
[[ -d "$OUTPUT" ]] && { | ||
[[ -d "$OUTPUT/lib" ]] && cp -v build/libSDL2.a $OUTPUT/lib; | ||
[[ -d "$OUTPUT/include" ]] && cp -v SDL2-*/include/*.h $OUTPUT/include/SDL2; | ||
} | ||
|
||
[[ -d "$BUILD_DIR" ]] && rm -rf $BUILD_DIR; |
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,21 @@ | ||
// | ||
// PrefixHeader.pch | ||
// Scrcpy | ||
// | ||
// Created by Ethan on 2021/7/7. | ||
// | ||
|
||
#ifndef PrefixHeader_pch | ||
#define PrefixHeader_pch | ||
|
||
#include <OpenGLES/gltypes.h> | ||
#include <OpenGLES/ES3/gl.h> | ||
|
||
typedef GLfloat GLdouble; | ||
typedef double GLclampd; | ||
|
||
#include <SDL2/SDL_opengl_glext.h> | ||
|
||
#define main scrcpy_main | ||
|
||
#endif /* PrefixHeader_pch */ |