-
Notifications
You must be signed in to change notification settings - Fork 95
How to build a WebShell based application
This page will show you how to build a WebShell
based application.
Pull WebShell
into APP_NAME
folder
$ git clone git@github.com:djyde/WebShell.git APP_NAME
We recommend you to add an alias for
WebShell
in.zshrc
or.bashrc
:
alias webshell="git clone git@github.com:djyde/WebShell.git"
So when the next time you want to build a new
WebShell
based application, you can only:
$ webshell APP_NAME
Open WebShell.xcodeproj
. Rename project name to your APP_NAME
and click enter
. The Xcode will do the refactory things for you:
Then configure the app in Sites/WebShell/Settings.swift
To know what each option means, see Configurations
After configuring and testing, you should change the app icon (of course you can use WebShell's default icon) in WebShell/Assets.xcassets
. Just drag each size of your icon file into AppIcon
panel.
If you care about the identity and copyright information (when you are building a business application), You need to change the Identity
information to your own info and the Copyright
info in WebShell/Info.plist
.
Open the WebShell-Info.plist
file and find Principal Class
with contents WebShell.WebShellMediaKeysSupport
(note: In the Swift 3 version this is renamed to WebShell.WSMediakeysSupport
)
Change the Principal Class
to YOUR_APP_NAME.WebShellMediaKeysSupport
(swift 3: YOUR_APP_NAME.WSMediaKeysSupport
) (swift 4: YOUR_APP_NAME.WSApplication
)
Note: dots (.
) and spaces (
) need to be replaced to underscore (_
) in order to work!
Archive your build to a real mac app.
If you want to build a business application, I assume you'd already know how to archive a signed application which is prepared to upload to the Mac App Store. In this part, I will only show how to archive the app for personal usage.
Open menu Product -> Archive
and select your build version. After entering Export...
, choose Export as a Mac Application
, the application will automatically open in finder: