Skip to content

Commit e30a0d6

Browse files
author
Carlos Cabanero
committed
Update mosh-1.4.0+blink.17.3.0
1 parent 3b7bf3d commit e30a0d6

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
run: sudo xcode-select -s /Applications/Xcode.app
1818

1919
- name: install protobuf
20-
run: brew install protobuf
20+
run: brew install protobuf@21
2121

2222
- name: install automake
2323
run: brew install automake
@@ -29,8 +29,14 @@ jobs:
2929
run: rm -f .build/release.md
3030

3131
- name: Run build
32+
env:
33+
PKG_CONFIG_PATH: "/usr/local/opt/protobuf@21/lib/pkgconfig"
3234
run: swift run
3335

36+
- name: Ls structure
37+
if: failure()
38+
run: ls -al /Users/runner/work/mosh-apple/mosh-apple/.build/artifacts/mosh-apple/Protobuf_C_.xcframework/ && ls -al /Users/runner/work/mosh-apple/mosh-apple/.build/artifacts/mosh-apple/Protobuf_C_.xcframework/tvos-arm64/Protobuf_C_.framework && ls -al /Users/runner/work/mosh-apple/mosh-apple/.build/artifacts/mosh-apple/Protobuf_C_.xcframework/tvos-arm64/Protobuf_C_.framework/Headers/google/protobuf
39+
3440
- name: Create Release
3541
id: create_release
3642
uses: actions/create-release@v1

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ let package = Package(
77
name: "mosh-apple",
88
platforms: [.macOS("11")],
99
dependencies: [
10-
.package(url: "https://github.com/yury/FMake", from : "0.0.16"),
10+
.package(url: "https://github.com/blinksh/FMake", from : "0.0.16"),
1111
// .package(path: "../FMake")
1212
],
1313
targets: [

Sources/build/main.swift

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import Foundation
66

77
enum Config {
88
static let moshOrigin = "https://github.com/blinksh/mosh.git"
9-
static let moshSHA = "cbad23e600df9f44393ddf1308db9161a159aa4e"
10-
static let moshVersion = "1.4.0"
11-
9+
static let moshSHA = "51d3de0af5a9fac97d1d1f6355487ee61b19e989"
10+
static let moshVersion = "1.4.0+blink-17.3.0"
11+
static let moshVersionPlist = "1.4.0.1730"
1212
static let frameworkName = "mosh"
1313
}
1414

@@ -26,7 +26,7 @@ extension Platform {
2626

2727
OutputLevel.default = .error
2828

29-
// use from `brew install protobuf`
29+
// use from `brew install protobuf@21`
3030

3131
try? sh("rm -rf mosh")
3232
try sh("git clone", Config.moshOrigin)
@@ -35,7 +35,8 @@ try cd("mosh") {
3535
}
3636

3737
let pwd = cwd()
38-
let protobufProtoc = "/usr/local/bin/protoc"
38+
let protobufProtoc = "/usr/local/opt/protobuf@21/bin/protoc"
39+
//let protobufXCFrameworkPath = "\(pwd)/.build/artifacts/mosh-apple/Protobuf_C_/Protobuf_C_.xcframework"
3940
let protobufXCFrameworkPath = "\(pwd)/.build/artifacts/mosh-apple/Protobuf_C_.xcframework"
4041
let moshSrcPath = "\(pwd)/mosh"
4142

@@ -78,7 +79,10 @@ for p in platforms {
7879

7980
let cflags = "\(p.ccFlags(arch: arch, minVersion: p.deploymentTarget)) -I/usr/local/opt/ncurses/include"
8081
let cc = try readLine(cmd: "xcrun -find clang")
81-
82+
try? sh("ls \(protobufXCFrameworkPath)")
83+
try? sh("ls \(protobufXCFrameworkPath)/\(p.protobufPath)")
84+
try? sh("ls \(protobufXCFrameworkPath)/\(p.protobufPath)/Protobuf_C_.framework")
85+
8286
var env = ProcessInfo.processInfo.environment
8387
env["ac_cv_path_PROTOC"] = protobufProtoc
8488
env["protobuf_LIBS"] = "\(protobufFramewokPath)"
@@ -95,6 +99,7 @@ for p in platforms {
9599
try cd(moshSrcPath) {
96100
try sh("./autogen.sh", env: env)
97101
try sh("./configure --prefix=\(prefixPath)/lib --disable-server --disable-client --enable-ios-controller --host=\(arch)-apple-darwin", env: env)
102+
// try sh("./configure CXXFLAGS=-std=c++14 --prefix=\(prefixPath)/lib --disable-server --disable-client --enable-ios-controller --host=\(arch)-apple-darwin", env: env)
98103
try sh("make clean", env: env)
99104
try sh("make", env: env)
100105

@@ -123,7 +128,7 @@ for p in platforms {
123128

124129
let plist = try p.plist(
125130
name: Config.frameworkName,
126-
version: Config.moshVersion,
131+
version: Config.moshVersionPlist,
127132
id: "org.mosh",
128133
minSdkVersion: p.deploymentTarget
129134
)

0 commit comments

Comments
 (0)