tewi_log

Swift / Flutter / Ruby on Rails / xR

Electron版の伺か(如何か)を動かしてみた

私は普段Macを使っているので、PlayOnMacでSSPを動かしています。
ただし仮想環境ということもたまにバグったり、文字化けしたりしてどうにも不安定です。

「そういえば、Web上で伺かを動かす如何というのがあったなぁ」
「というかWeb上で動くと言うことはElectronで動くのでは?」と思ったところそういうプロジェクトがあるらしい。
https://github.com/Ikagaka/ikagaka-desktop

現在Windows環境で作っているようなので、BootCampで試してみました。

Gitのインストール

下記URLからインストールします。
https://git-scm.com/downloads

インストール時の設定は基本デフォルトのままで、下記の項目だけ変更しました。

  • 「Adjusting your PATH environment」-> 「Use Git from the Windows Command Prompt」
  • 「Configuring the line ending conversions」-> 「checkout as-is, commit Unix-style line ending」
  • 「Configuring the terminal emulator to use with Git Bash」 -> 「Use Windows' default console window」

Node.js(nodist)のインストール

Node.jsのバージョンを管理が出来るnodistをインストールします。 https://github.com/marcelklehr/nodist/releases

Windows PowerShellを起動します。 初期設定ではスクリプトの実行が禁止されているので、ポリシーを変更します。

> Set-ExecutionPolicy Unrestricted

インストール出来る、Node.jsの一覧を表示します。

> nodist dist

一覧の中から好きなバージョンをインストールします。 今回は10.5.0にしました。

> nodist + 10.5.0

使用するバージョンを指定。

> nodist 10.5.0

リポジトリのクローン

お好きなディレクトリで、リポジトリをクローンします。

> git clone https://github.com/Ikagaka/ikagaka-desktop.git

ikagaka-desktopディレクトリに移動して次のコマンドを実行します。

> cd ikagaka-desktop
> npm config set scripts-prepend-node-path true
> npm install
> npm run prepare:example
> npm run build
> npm run watchbuild

PowerShellをもう一つ起動し、次のコマンドを実行。

> npm run ndevw

無事起動。

f:id:R_Tewi:20180712010657p:plain