Skip to content

How to build a WebShell based application

Wesley De Groot edited this page Apr 24, 2016 · 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 Settings.swift:

    let Settings: [String: Any]  = [
        
        "url": "http://djyde.github.io/WebShell/WebShell/",
        
        "title": "WebShell",
        "useDocumentTitle": true,
        
        "launchingText": "Launching...",
        
        // Note that the window min height is 640 and min width is 1000 by default. You could change it in Main.storyboard
        "minHeight": 640,
        "minWidth": 1000,
        
        "showLoadingBar": true
        
    ]

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 informations to your own info and the Copyright info in WebShell/Info.plist.

image

STEP 6

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 automaticlly open in finder:

image

Clone this wiki locally