intro Wiki
This commit is contained in:
parent
a8f060578a
commit
db90eddf31
57
README.md
57
README.md
|
@ -54,62 +54,9 @@ The default sounds of notifications is provided [Creative Commons BY](https://cr
|
||||||
|
|
||||||
Crowdin project is available! Visit: https://translate.thedesk.top
|
Crowdin project is available! Visit: https://translate.thedesk.top
|
||||||
|
|
||||||
## Development
|
## Build and Development
|
||||||
|
|
||||||
to launch developer version with console(if close dev mode, you may press Ctrl+C twice.)
|
See [Wiki](https://github.com/cutls/TheDesk/wiki)
|
||||||
|
|
||||||
**Strongly recommend to use yarn, not npm**
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone https://github.com/cutls/TheDesk
|
|
||||||
cd TheDesk/app
|
|
||||||
yarn install
|
|
||||||
|
|
||||||
yarn dev
|
|
||||||
```
|
|
||||||
|
|
||||||
## Build
|
|
||||||
|
|
||||||
**Strongly recommend to use yarn, not npm**
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone https://github.com/cutls/TheDesk
|
|
||||||
cd TheDesk/app
|
|
||||||
yarn install
|
|
||||||
|
|
||||||
yarn build
|
|
||||||
```
|
|
||||||
|
|
||||||
### Options
|
|
||||||
|
|
||||||
Look at `yarn build --help`
|
|
||||||
|
|
||||||
### Restriction with macOS build
|
|
||||||
|
|
||||||
Requires XCode(XCode Command Line Tools) to use iTunes NowPlaying
|
|
||||||
|
|
||||||
Built assets should be notarized after building by expensive Apple Developer user. To disable it, see `app/build/notarize.js` (beta)
|
|
||||||
|
|
||||||
### Programatic build
|
|
||||||
|
|
||||||
TheDesk builder has type declaration for TypeScript.
|
|
||||||
|
|
||||||
```ts
|
|
||||||
import build from './app/builder'
|
|
||||||
build()
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### PWA build
|
|
||||||
|
|
||||||
TheDesk is a web-based app, so you can run it on a browser. Of course, the main stream is as Electron. Some features won't work as well as Electron.
|
|
||||||
|
|
||||||
You can run `yarn build:pwa` to build as PWA, including `manifest.json` and the ServiceWorker.
|
|
||||||
|
|
||||||
**You have to rename `node_modules` to `dependencies` to run as a web application. (restricted by Netlify, but always you should do to run as PWA)**
|
|
||||||
|
|
||||||
Check the app on Chrome or Firefox: [Here](https://app.thedesk.top) (it follows the `master` branch, so not stable.)
|
|
||||||
[![Netlify Status](https://api.netlify.com/api/v1/badges/6916503b-2882-43f7-9681-ab814e6d28f9/deploy-status)](https://app.netlify.com/sites/thedesk/deploys)
|
|
||||||
|
|
||||||
## Pleroma support
|
## Pleroma support
|
||||||
|
|
||||||
|
|
60
README_ja.md
60
README_ja.md
|
@ -43,65 +43,7 @@ Crowdinから翻訳に参加してみませんか?: https://translate.thedesk.
|
||||||
|
|
||||||
## ビルドと開発
|
## ビルドと開発
|
||||||
|
|
||||||
**npmではなくyarnを使ってください。**
|
[Wiki](https://github.com/cutls/TheDesk/wiki)を参照。
|
||||||
|
|
||||||
### 開発
|
|
||||||
|
|
||||||
コンソールが出る開発モードで起動します。並行して監視が走る関係上、Ctrl+Cを2回押さないと終了しない場合があります。
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone https://github.com/cutls/TheDesk
|
|
||||||
cd TheDesk/app
|
|
||||||
yarn install
|
|
||||||
|
|
||||||
yarn dev
|
|
||||||
```
|
|
||||||
|
|
||||||
**npmではなくyarnを使ってください。**
|
|
||||||
|
|
||||||
### ビルド
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone https://github.com/cutls/TheDesk
|
|
||||||
cd TheDesk/app
|
|
||||||
yarn install
|
|
||||||
|
|
||||||
yarn build
|
|
||||||
```
|
|
||||||
|
|
||||||
### オプション
|
|
||||||
|
|
||||||
`yarn build --help`参照。
|
|
||||||
|
|
||||||
### macOSでビルドするときの制限
|
|
||||||
|
|
||||||
完全なビルドにはXCode(XCode Command Line Tools)が必要です。無いままビルドした場合でもおそらくビルドは完了しますが、iTunesのNowPlayingが利用できません。
|
|
||||||
|
|
||||||
Notarizeが入ります。つまり、認証された(課金したとも言う)デベロッパによるキーチェーンが必要で一般環境からビルドすることができません。配布版はCutlsが行っています。
|
|
||||||
これを解除する場合`app/build/notarize.js`を参照してください。**なお、試験実装なのでちゃんとNotarizeできているかどうかを保証しません。**
|
|
||||||
|
|
||||||
フォークを世に出す場合や、Cutlsが信用できない場合、自分でMac AppStoreに出す場合など、[自分でNotarizeする必要があるとき](https://kilianvalkhof.com/2019/electron/notarizing-your-electron-application/)、[それをCI等で自動化するとき](https://qiita.com/ktmouk/items/7fc27c9ad0e3caf7899d)。
|
|
||||||
|
|
||||||
|
|
||||||
### プログラムでビルド
|
|
||||||
|
|
||||||
TypeScript用の型定義を持っています。
|
|
||||||
|
|
||||||
```ts
|
|
||||||
import build from './app/builder'
|
|
||||||
build()
|
|
||||||
```
|
|
||||||
|
|
||||||
### PWAとしてビルド
|
|
||||||
|
|
||||||
TheDeskはウェブ技術を使用して作られているので、ブラウザで動かすこともできます。もちろん、Electron向けに設計されているので一部機能は動きません。
|
|
||||||
|
|
||||||
`yarn build:pwa`でビルドできます。PWAに必要な`manifest.json`やサービスワーカーなども用意されています。
|
|
||||||
|
|
||||||
**`node_modules`を`dependencies`にリネームしないと動きません。(Netlifyの制限ですが、Netlify以外で動かす場合にも必須です)**
|
|
||||||
|
|
||||||
ChromeまたはFirefoxでチェック: [こちら](https://app.thedesk.top) (`master`ブランチに追従しています。不安定です。)
|
|
||||||
[![Netlify Status](https://api.netlify.com/api/v1/badges/6916503b-2882-43f7-9681-ab814e6d28f9/deploy-status)](https://app.netlify.com/sites/thedesk/deploys)
|
|
||||||
|
|
||||||
## Pleromaのサポート
|
## Pleromaのサポート
|
||||||
|
|
||||||
|
|
7
app/build.d.ts
vendored
7
app/build.d.ts
vendored
|
@ -3,5 +3,12 @@ declare function _exports(options?: {
|
||||||
withStore?: boolean;
|
withStore?: boolean;
|
||||||
withIa32?: boolean;
|
withIa32?: boolean;
|
||||||
withArm64?: boolean;
|
withArm64?: boolean;
|
||||||
|
windows?: boolean;
|
||||||
|
linux?: boolean;
|
||||||
|
macOS?: boolean;
|
||||||
|
skipWindows?: boolean;
|
||||||
|
skipLinux?: boolean;
|
||||||
|
skipMacOS?: boolean;
|
||||||
|
unnotarize?: boolean;
|
||||||
}): void;
|
}): void;
|
||||||
export = _exports;
|
export = _exports;
|
||||||
|
|
40
app/build.js
40
app/build.js
|
@ -8,7 +8,6 @@ const version = data.version
|
||||||
const codename = data.codename
|
const codename = data.codename
|
||||||
const ver = `${version} (${codename})`
|
const ver = `${version} (${codename})`
|
||||||
const construct = require('./view/make/make.js')
|
const construct = require('./view/make/make.js')
|
||||||
const { ModuleResolutionKind } = require('typescript')
|
|
||||||
const { platform, arch } = process
|
const { platform, arch } = process
|
||||||
const Platform = builder.Platform
|
const Platform = builder.Platform
|
||||||
const Arch = builder.Arch
|
const Arch = builder.Arch
|
||||||
|
@ -70,7 +69,7 @@ async function cmd(options) {
|
||||||
if (isTrue(options, 'onlyStore') || isTrue(options, 'withStore')) {
|
if (isTrue(options, 'onlyStore') || isTrue(options, 'withStore')) {
|
||||||
console.log('start building for application stores')
|
console.log('start building for application stores')
|
||||||
construct(ver, basefile, false, true)
|
construct(ver, basefile, false, true)
|
||||||
if (platform == 'win32') {
|
if ((platform == 'win32' && !isTrue(options, 'skiWindows')) || isTrue(options, 'windows', 'w')) {
|
||||||
if ((isTrue(options, 'withIa32') && arch == 'x64') || arch == 'ia32') {
|
if ((isTrue(options, 'withIa32') && arch == 'x64') || arch == 'ia32') {
|
||||||
await build(Platform.WINDOWS, Arch.ia32, config)
|
await build(Platform.WINDOWS, Arch.ia32, config)
|
||||||
fs.renameSync(
|
fs.renameSync(
|
||||||
|
@ -93,7 +92,8 @@ async function cmd(options) {
|
||||||
'../build/TheDesk-setup-store.exe'
|
'../build/TheDesk-setup-store.exe'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else if (platform == 'linux') {
|
}
|
||||||
|
if ((platform == 'linux' && !isTrue(options, 'skipLinux')) || isTrue(options, 'linux', 'l')) {
|
||||||
if (arch == 'ia32') {
|
if (arch == 'ia32') {
|
||||||
await build(Platform.LINUX, Arch.ia32, config)
|
await build(Platform.LINUX, Arch.ia32, config)
|
||||||
}
|
}
|
||||||
|
@ -109,16 +109,12 @@ async function cmd(options) {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (platform == 'darwin') {
|
|
||||||
console.log('Mac App Store should be use electron-packager')
|
|
||||||
} else {
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!isTrue(options, 'onlyStore')) {
|
if (!isTrue(options, 'onlyStore')) {
|
||||||
console.log('start building for normal usage')
|
console.log('start building for normal usage')
|
||||||
construct(ver, basefile, false, false)
|
construct(ver, basefile, false, false)
|
||||||
if (platform == 'win32') {
|
if ((platform == 'win32' && !isTrue(options, 'skiWindows')) || isTrue(options, 'windows', 'w')) {
|
||||||
if ((isTrue(options, 'withIa32') && arch == 'x64') || arch == 'ia32') {
|
if ((isTrue(options, 'withIa32') && arch == 'x64') || arch == 'ia32') {
|
||||||
await build(Platform.WINDOWS, Arch.ia32, config)
|
await build(Platform.WINDOWS, Arch.ia32, config)
|
||||||
fs.renameSync(
|
fs.renameSync(
|
||||||
|
@ -148,7 +144,8 @@ async function cmd(options) {
|
||||||
'../build/TheDesk-setup-arm64.exe'
|
'../build/TheDesk-setup-arm64.exe'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else if (platform == 'linux') {
|
}
|
||||||
|
if ((platform == 'linux' && !isTrue(options, 'skipLinux')) || isTrue(options, 'linux', 'l')) {
|
||||||
if (arch == 'ia32') {
|
if (arch == 'ia32') {
|
||||||
await build(Platform.LINUX, Arch.ia32, config)
|
await build(Platform.LINUX, Arch.ia32, config)
|
||||||
}
|
}
|
||||||
|
@ -168,10 +165,10 @@ async function cmd(options) {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (platform == 'darwin') {
|
}
|
||||||
|
if (platform == 'darwin' && !isTrue(options, 'skipMacOS')) {
|
||||||
|
if(isTrue(options, 'unnotarize')) delete config.afterSign
|
||||||
await build(Platform.MAC, Arch.x64, config)
|
await build(Platform.MAC, Arch.x64, config)
|
||||||
} else {
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -190,16 +187,27 @@ TheDesk Builder command tool
|
||||||
|
|
||||||
--help or -h: show help
|
--help or -h: show help
|
||||||
|
|
||||||
--onlyStore: App Store of platforms assets(without update check)
|
[Build for other platforms]
|
||||||
--withStore: App Store assets and normal version
|
--windows (-w)
|
||||||
|
--linux (-l)
|
||||||
|
|
||||||
|
--skipWindows
|
||||||
|
--skipLinux
|
||||||
|
--skipMacOS
|
||||||
|
To skip building for itself platform.
|
||||||
|
|
||||||
|
|
||||||
|
[only Windows, Linux]
|
||||||
|
--onlyStore: application store of platforms assets(without update check)
|
||||||
|
--withStore: application store assets and normal version
|
||||||
|
|
||||||
[only Windows]
|
[only Windows]
|
||||||
if you pass these args on Linux or macOS, it just will be ignored...
|
|
||||||
|
|
||||||
--withIa32: ia32 build on x64 system(if your machine is ia32, it will be built if this arg is not passed)
|
--withIa32: ia32 build on x64 system(if your machine is ia32, it will be built if this arg is not passed)
|
||||||
--withArm64(beta) arm64 build on x64 system(if your machine is arm64, it will be built if this arg is not passed, and not build store build for arm64)
|
--withArm64(beta) arm64 build on x64 system(if your machine is arm64, it will be built if this arg is not passed, and not build store build for arm64)
|
||||||
|
|
||||||
Programatic usage
|
[only macOS]
|
||||||
|
--unnotarize: Without notarize
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user