Skip to content

How to build a WebShell based application

Wesley De Groot edited this page Jan 4, 2018 · 6 revisions

This page will show you how to build a WebShell based application.

STEP 1

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

STEP 2

Open WebShell.xcodeproj. Rename project name to your APP_NAME and click enter. The Xcode will do the refactory things for you:

image

Then configure the app in Sites/WebShell/Settings.swift

To know what each option means, see Configurations

STEP 4

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.

STEP 5 (Optional)

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.

image

STEP 6

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!

STEP 7

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:

image

Clone this wiki locally