forked from blinksh/blink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD
78 lines (62 loc) · 4.14 KB
/
BUILD
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
# Building
We provide you with two ways to compile and install Blink Shell. This instructions will refer to assembling
a full Blink Shell, compiling libraries and resources yourself. Due to the many dependencies that compose
Blink Shell, this is the recommended but not shortest method. You can also clone Blink and obtain a "ready to go"
tar.gz with all the dependencies as described on [home](https://github.com/blinksh/blink)
## Requirements
Please note that to compile and install Blink in your personal
devices, you need to comply with Apple Developer Terms and Conditions,
including obtaining a Developer License for that purpose. You will also
need all the XCode command line developer tools and SDKs provided under
a separate license by Apple Inc.
- XCode > 7.3 and XCode command line tools
- Autotools for OSX
## Cloning
Clone Blink into your local repository and make sure to obtain any submodules:
git submodule init
git submodule update
## Dependencies & Requirements
Blink makes use of multiple dependencies that you have to compile
separately before building Blink itself. There are simple scripts available
to perform this operation.
- [Libssh2 for iOS](https://github.com/carloscabanero/libssh2-for-iOS); Includes OpenSSL.
- [Mosh for iOS](https://github.com/blinksh/build-mosh); Includes Protobuf.
Please note that Blink currently only supports armv64 and x86_64 (simulator)
platforms, so compilation for other architectures is not necessary.
### Installation
#### Libraries
The Blink Shell XCode project will look for Library dependencies under the Framework folder. Libssh2 and Mosh for iOS will
also build OpenSSL and Protobuf respectively, both required to work.
To install Libssh2 and OpenSSL in your Blink repository, please copy
the .framework files generated on [Libssh2 for iOS](https://github.com/carloscabanero/libssh2-for-iOS) to the Framework folders.
[Mosh for iOS](https://github.com/blinksh/build-mosh) will compile both protobuf and Mosh for iOS.
After compiling, copy libmoshios.framework AND libprotobuf.a from the build-protobuf/protobuf-version/lib folder.
Blink also makes use of two other projects, which should be automatically downloaded using git submodule
within the same project:
- UICKeyChainStore
- MBProgressHUD
If you would like to use HockeySDK (not required), download the latest version and drop it Frameworks.
#### Resources
Blink Shell makes use of a web terminal running from JavaScript code and linked at runtime. All the required
resources to bundle the app, like terminal, fonts and themes, must be included under the Resources folder.
Blink Shell makes use of Chromium's HTerm. To bundle it, start by cloning [Chromium's libapps](https://chromium.googlesource.com/apps/libapps/+/master/hterm),
and generate hterm_all.js with the bin/mkdist.sh script (their build instructions are less than clear!).
Drop the generated hterm_all.js file into the Resources folder.
Font Style uploads requires [webfonts.js](https://github.com/typekit/webfontloader), but it isn't
needed for Blink to work. Download the file and drop it into Resources folder.
Blink's Terminal is running from JavaScript code linked at runtime.
Most of the available open source terminals can be made to work with Blink,
just by providing a "write" and "signal" functions. An example of this
is provided in the Resources/term.html file. If you use another
terminal.js, edit term.html to match. We have been also successful plugging in other
terminals like [Terminal.js](http://terminal.js.org).
## Compiling
Blink uses a standard .xcodeproj file. Any missing files will be marked in
red, what can be used to test your installation.
To configure the project:
1. Under Targets > Blink > General > Identities set a unique Bundle Identifier.
2. Under Targets > Blink > General > Identities set your Team.
3. You might be requested to accept your profile or setup your developer account
with XCode, follow the proper Apple Developer documentation in that case.
4. If you would like to use HockeyApp, change the scheme to Blink Hockey, and add HockeyID with your AppID string to info.plist.
Make sure "Blink" is the selected Scheme for compilation. As a standard XCode project, just run it with Cmd-R.