{"id":548,"date":"2015-08-26T16:30:20","date_gmt":"2015-08-26T07:30:20","guid":{"rendered":"http:\/\/tech.at-iroha.jp\/?p=548"},"modified":"2019-10-25T14:57:25","modified_gmt":"2019-10-25T05:57:25","slug":"electron-%e3%81%a7%e9%96%8b%e7%99%ba%e3%81%97%e3%81%9f%e3%82%a2%e3%83%97%e3%83%aa%e3%81%ae-windows%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%a9%e3%81%ae%e4%bd%9c%e6%88%90","status":"publish","type":"post","link":"https:\/\/tech.at-iroha.jp\/?p=548","title":{"rendered":"Electron \u3067\u958b\u767a\u3057\u305f\u30a2\u30d7\u30ea\u306e Windows\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u306e\u4f5c\u6210"},"content":{"rendered":"\n<p>Electron \u306b\u306f electron-builder \u3068\u547c\u3070\u308c\u308b Windows \u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u306e\u4f5c\u6210\u30c4\u30fc\u30eb\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u30c4\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u3066\u3001\u958b\u767a\u3057\u305f Electron \u30a2\u30d7\u30ea\u3092\u5143\u306b\u3001Windows \u7528\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002MacOS\u7528\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3082\u3067\u304d\u308b\u3088\u3046\u3067\u3059\u304c\u3001\u307e\u3060\u8a66\u305b\u3066\u3044\u307e\u305b\u3093\u3002<br>\u516c\u5f0f\u30b5\u30a4\u30c8\u306b\u60c5\u5831\u304c\u63b2\u8f09\u3055\u308c\u3066\u304a\u308a\u307e\u3059\u304c\u3001\u5b9f\u969b\u306b\u4f7f\u7528\u3057\u3066\u307f\u308b\u3068\u30cf\u30de\u308a\u3069\u3053\u308d\u304c\u591a\u304f\u898b\u53d7\u3051\u3089\u308c\u305f\u306e\u3067\u9806\u306b\u8aac\u660e\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>electron-builder \u516c\u5f0f\u60c5\u5831<br><a href=\"https:\/\/www.npmjs.com\/package\/electron-builder\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.npmjs.com\/package\/electron-builder<\/a><\/p>\n\n\n\n<p>\u4e8b\u524d\u6e96\u5099<br>&#8211; Electron \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002(\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\uff1a<a href=\"http:\/\/tech.at-iroha.jp\/?p=403\" target=\"_blank\" rel=\"noopener noreferrer\">Electron \u3067\u5b9f\u73fe\u3059\u308b\u30af\u30ed\u30b9\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306a\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u30a2\u30d7\u30ea\u958b\u767a<\/a>)<br>&#8211; Node v0.12.0 \u4ee5\u4e0a\u3067\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002(\u305d\u308c\u3088\u308a\u4e0b\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u3001\u6b63\u5e38\u306b\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002)<br>&#8211; NSIS(Nullsoft Scriptable Install System) 2.46 \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br><a href=\"http:\/\/nsis.sourceforge.net\/Download\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/nsis.sourceforge.net\/Download<\/a><br>&#8211; NSIS \u306e\u30b3\u30de\u30f3\u30c9\u306e\u30d5\u30a9\u30eb\u30c0\u306e\u30d1\u30b9(C:\\Program Files (x86)\\NSIS\\)\u3092\u3001\u74b0\u5883\u5909\u6570\u306e Path \u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>1. electron-packager \u3092\u30a4\u30f3\u30b9\u30fc\u30eb\u3057\u307e\u3059\u3002<br>npm install electron-packager -g<\/p>\n\n\n\n<p>2. electron-builder \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br>npm install electron-builder -g<\/p>\n\n\n\n<p>3. \u4ee5\u4e0b\u306e\u69cb\u6210\u3067\u30d5\u30a9\u30eb\u30c0\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u9069\u5207\u306a\u30d5\u30a9\u30eb\u30c0\u304c\u306a\u3044\u3068\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u6642\u306b\u30a8\u30e9\u30fc\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\n\/app\/   (Electron \u30a2\u30d7\u30ea)\n|-- package.json\n|-- main.js\n|-- index.html\n\/assets\/ (\u30a2\u30a4\u30b3\u30f3\u30d5\u30a1\u30a4\u30eb)\n|-- \/osx\/\n    |-- mount.icns\n|-- \/win\/\n    |-- icon.ico\n\/dist\/ (\u30d1\u30c3\u30b1\u30fc\u30b8\u30f3\u30b0\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u3092\u51fa\u529b)\n|-- \/osx\/\n|-- \/win\/\n\/installer\/ (dist \u3092\u5143\u306b\u4f5c\u6210\u3055\u308c\u305f\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u304c\u51fa\u529b)\n|-- \/osx\/\n|-- \/win\/\n<\/pre><\/pre>\n\n\n\n<p>package.json<br>\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u30a2\u30d7\u30ea\u5074\u306e package.json \u3068\u306f\u7570\u306a\u308b\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n{\n  \"name\": \"hello-world\",\n  \"version\": \"0.1.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\"   exit 1\",\n    \"dev\": \"electron .\/irohanote\",\n\n    \"clean\": \"del .\\\\dist\",\n    \"clean:osx\": \"del .\\\\dist\\\\osx\",\n    \"clean:win\": \"del .\\\\dist\\\\win\",\n\n    \"build\": \"npm run clean   npm run build:osx   npm run build:win\",\n    \"build:osx\": \"npm run clean:osx   electron-packager .\/app \\\"hello-world\\\" --out=dist\/osx --platform=darwin --arch=x64 --version=0.25.3 --icon=assets\/osx\/loopline.icns\",\n    \"build:win\": \"npm run clean:win   electron-packager .\/app \\\"hello-world\\\" --out=dist\/win --platform=win32 --arch=ia32 --version=0.25.3 --icon=assets\/win\/icon.ico\",\n\n    \"pack\": \"npm run pack:osx   npm run pack:win\",\n    \"pack:osx\": \"npm run build:osx   electron-builder \\\"dist\/osx\/hello-world.app\\\" --platform=osx --out=\\\"installer\/osx\\\" --config=packager.json\",\n    \"pack:win\": \"npm run build:win   electron-builder \\\"dist\/win\/hello-world-win32-ia32\\\" --platform=win --out=\\\"installer\/win\\\" --config=packager.json\"\n  },\n  \"author\": \"\",\n  \"license\": \"BSD\",\n  \"dependencies\": {\n    \"grunt\": \"~0.4.2\",\n    \"electron-packager\": \"^4.0.2\",\n    \"electron-prebuilt\": \"^0.25.2\",\n    \"electron-builder\": \"^2.0.0\"\n  }\n}\n<\/pre><\/div>\n\n\n<p>packager.json<br>\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3002package.json \u3068\u540d\u79f0\u304c\u4f3c\u3066\u3044\u307e\u3059\u304c\u3001\u7570\u306a\u308b\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n{\n  \"osx\" : {\n    \"title\": \"hello-world\",\n    \"background\": \"assets\/osx\/installer.png\",\n    \"icon\": \"assets\/osx\/mount.icns\",\n    \"icon-size\": 80,\n    \"contents\": &#x5B;\n      { \"x\": 438, \"y\": 344, \"type\": \"link\", \"path\": \"\/Applications\" },\n      { \"x\": 192, \"y\": 344, \"type\": \"file\" }\n    ]\n  },\n  \"win\" : {\n    \"title\" : \"hello-world\",\n    \"icon\" : \"assets\/win\/icon.ico\"\n  }\n}\n<\/pre><\/pre>\n\n\n\n<p>4. \u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u306e\u4f5c\u6210\u3092\u884c\u3044\u307e\u3059\u3002<br>npm run pack:win<\/p>\n\n\n\n<p>\u30b3\u30de\u30f3\u30c9\u304c\u7121\u4e8b\u306b\u5b8c\u4e86\u3059\u308b\u3068 \/installer\/win\/ \u30d5\u30a9\u30eb\u30c0\u306b\u4ee5\u4e0b\u306e\u540d\u79f0\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<br>hello-world Setup.exe<\/p>\n\n\n\n<p>5. \u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u304c\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"http:\/\/tech.at-iroha.jp\/wp-content\/uploads\/2015\/08\/2015-08-26-16.33.16.png\"><img loading=\"lazy\" decoding=\"async\" width=\"597\" height=\"489\" src=\"http:\/\/tech.at-iroha.jp\/wp-content\/uploads\/2015\/08\/2015-08-26-16.33.16.png\" alt=\"2015-08-26 16.33.16\" class=\"wp-image-552\"\/><\/a><\/figure>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u958b\u59cb\u753b\u9762<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"http:\/\/tech.at-iroha.jp\/wp-content\/uploads\/2015\/08\/2015-08-26-16.33.23.png\"><img loading=\"lazy\" decoding=\"async\" width=\"597\" height=\"489\" src=\"http:\/\/tech.at-iroha.jp\/wp-content\/uploads\/2015\/08\/2015-08-26-16.33.23.png\" alt=\"2015-08-26 16.33.23\" class=\"wp-image-553\"\/><\/a><\/figure>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u7d42\u4e86\u753b\u9762<br><\/p>\n\n\n\n<p>\u6c17\u3065\u3044\u305f\u3053\u3068<br>&#8211; \u73fe\u72b6\u4f5c\u6210\u3055\u308c\u308b\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u306f\u82f1\u8a9e\u7248\u3068\u306a\u308a\u307e\u3059\u3002<br>&#8211; package.json \u3067\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b name (&#8220;name&#8221;: &#8220;hello-world&#8221;)\u3068\u3001title (&#8220;title&#8221; : &#8220;hello-world&#8221;) \u304c\u4e00\u81f4\u3057\u3066\u3044\u306a\u3044\u3068\u3001\u30a4\u30f3\u30b9\u30fc\u30eb\u7d42\u4e86\u5f8c\u3001\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u304b\u3089\u30a2\u30d7\u30ea\u304c\u8d77\u52d5\u3057\u307e\u305b\u3093\u3002\u307e\u305f\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u3082\u81ea\u52d5\u3067\u4f5c\u6210\u3055\u308c\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Electron \u306b\u306f electron-builder \u3068\u547c\u3070\u308c\u308b Windows \u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u306e\u4f5c\u6210\u30c4\u30fc\u30eb\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u30c4\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u3066\u3001\u958b\u767a\u3057\u305f Electron \u30a2\u30d7\u30ea\u3092\u5143\u306b\u3001Windows \u7528\u306e\u30a4\u30f3\u30b9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":553,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,12],"tags":[],"class_list":["post-548","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-electron","category-html5js"],"_links":{"self":[{"href":"https:\/\/tech.at-iroha.jp\/index.php?rest_route=\/wp\/v2\/posts\/548","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tech.at-iroha.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.at-iroha.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.at-iroha.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.at-iroha.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=548"}],"version-history":[{"count":20,"href":"https:\/\/tech.at-iroha.jp\/index.php?rest_route=\/wp\/v2\/posts\/548\/revisions"}],"predecessor-version":[{"id":1141,"href":"https:\/\/tech.at-iroha.jp\/index.php?rest_route=\/wp\/v2\/posts\/548\/revisions\/1141"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tech.at-iroha.jp\/index.php?rest_route=\/wp\/v2\/media\/553"}],"wp:attachment":[{"href":"https:\/\/tech.at-iroha.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=548"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.at-iroha.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=548"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.at-iroha.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=548"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}