<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                [electron-packager](https://github.com/electron/electron-packager) [參數詳情](https://github.com/electron/electron-packager/blob/master/usage.txt) ## **一、打包流程** ### **1.定位到當前項目目錄下,輸入命令:** `cd D:\nodejs\electron-quick-start\` ~~~ npm install --save-dev electron-packager ~~~ ~~~ npm install electron-packager -g ~~~ 安裝成功后,該項目的devDependencies選項下多出一個類似`"electron-packager": "^14.2.0"`的選項 ``` .... "devDependencies": { "electron": "^7.1.9", "electron-packager": "^14.2.0" } .... ``` ### **2.開始打包** >./代表的是當前目錄,當前目錄代表本項目的當前目錄。 --win代表打包成windows當前類型 --all代表打包成所有類型 ../App輸出路徑代表打包輸出到與項目名稱同級別的目錄文件夾下 前提:換鏡像源,否則會因為網絡問題卡住 ~~~ # macOS export ELECTRON_MIRROR="https://npm.taobao.org/mirrors/electron/" # Windows set ELECTRON_MIRROR="https://npm.taobao.org/mirrors/electron/" ~~~ **方式一(直接打包):** 項目目錄下輸入命令:其中`應用目錄`是必須的參數,其他為可選 ~~~ electron-packager <應用目錄> <應用名稱> <打包平臺種類> --out <輸出目錄> <架構> ~~~ **方式二(推薦):** **在package.json下進行相應配置:** **配置成功后輸入命令:** ~~~ electron-packager <sourcedir> <appname> --platform=<platform> --arch=<arch> [optional flags...] electron-packager <應用目錄> <應用名稱> <打包平臺> --out <輸出目錄> <架構> <應用版本> ~~~ ``` //注意electron-version的參數為當前electron的版本electron --version可查 ... "scripts": { "start": "electron --inspect=5858 .", "package":"electron-packager ./ --all --out ../dash --electron-version=0.01 --overwrite --icon=./icon/favicon.ico --ignore=node_modules --arch=x64" }, ... ``` ![](https://img.kancloud.cn/3c/7f/3c7fb3be9ec07f9a0c8bf01a5cff209b_1102x146.png) 上面配置項的含義: * `sourcedir`:項目源文件所在路徑(.demo) * `platform`:要構建哪個平臺的應用是Windows、Mac 還是 Linux(--win) * `distdir`:項目目的文件所在路徑(./dash ) * `arch`:決定了使用 x86 (ia32)還是 x64(x64),還是兩個架構都用(x64) * `--overwrite`:覆蓋打包文件而打包 * `--ignore`:打包的時候忽略的文件 * `--icon`:打包應用的圖標 ~~~ npm run-script package ~~~ ## **electron-packager-interactive** 基于electron-packager,且有提示 ``` npm install electron-packager-interactive -g ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看