electron:p5アプリを作る

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
electron [2021/09/17 09:04] babaelectron:p5アプリを作る [2021/11/23 03:31] (現在) baba
行 1: 行 1:
-====== Electron ====== +====== Electronでp5アプリを作る ====== 
-Electronの環境構築からいろいろ開発したときの馬場の覚書+Electronは、「jsでネイティブアプリを作りたい」ってときに使う開発フレームワークとなります。単一プログラムで 
 +windows, mac, linux等のマルチプラットフォーム対応ができます。このページでは開発環境構築からアプリの作成、 
 +さらにはp5jsをネイティブアプリケーションして書出すまでをやってみます。完成済みファイルは以下gitから。 
 +  * https://github.com/TetsuakiBaba/p5ElectronStarterTemplate
  
-まず最初は https://ics.media/entry/7298/ を参考にしてそのまま動作を確認。このままだとintelアーキテクチャでrosettaなので起動にめっちゃかかるので、最後のアプリケーションのパッケージングでは archオプションでは x64ではなく、arm64 にしてあげる。なお、パッケージングに限らず動作させる際のコマンドでもこのオプションを使ってM1チップネイティブで高速動作になる。+===== 前編 =====
  
-  npx electron ./src --arch=arm64 +<html> 
-   +<div style="position: relative; padding-bottom: 56.25%; height: 0;"><iframe src="https://www.loom.com/embed/f109e018ec714ce4ab2415f120df3c25" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe></div> 
-ってなかんじで。+</html>
  
-パッケージを作成するときのコマンドサンプルは以下 +==== 後編 ==== 
-   npx electron-packager src FirstApp --platform=darwin --arch=arm64 --overwrite + 
 +<html> 
 +<div style="position: relative; padding-bottom: 56.25%; height: 0;"><iframe src="https://www.loom.com/embed/a330fff2ebbf477895082355e327ff4c" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe></div> 
 + 
 +</html>
  • /home/users/2/lolipop.jp-4404d470cd64c603/web/ws/data/attic/electron/p5アプリを作る.1631837067.txt.gz
  • 最終更新: 2021/09/17 09:04
  • by baba