-
Notifications
You must be signed in to change notification settings - Fork 94
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_NAMEWe recommend you to add an alias for
WebShellin.zshrcor.bashrc:
alias webshell="git clone git@github.com:djyde/WebShell.git"So when the next time you want to build a new
WebShellbased 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 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
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 informations to your own info and the Copyright info in WebShell/Info.plist.

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: