vue.js 如何解决此问题?请使用电子版附带createWindowsInstaller

tkclm6bt  于 2023-02-09  发布在  Vue.js
关注(0)|答案(1)|浏览(108)

Product/@Version属性的值"!(bind.FileVersion.quasar-electron.exe)“不是有效版本。法律的版本值应类似于”x.x.x.x“,其中x是0到65534之间的整数。
我尝试添加版本,但没有成功。

ffx8fchx

ffx8fchx1#

这是我的密码

const { join } = require('path');
const installer = require('electron-winstaller');
const pkg = require('../package.json');

(async function () {
  try {
    console.log('======== start build exe ========\n');

    await installer.createWindowsInstaller({
      appDirectory: join(
        __dirname,
        `../dist/electron/Packaged/${pkg.productName}-win32-x64`
      ),
      exe: `${pkg.productName}.exe`,
      iconUrl: join(__dirname, '../public/icons/favicon-96x96.png'),
      outputDirectory: join(__dirname, `./win/${pkg.version}`),
    });

    console.log('\x1B[32m%s\x1B[37m', '\n Build exe Compiled Successfully \n');
  } catch (e) {
    console.log(
      '\x1B[31m%s\x1B[37m',
      `\n Build exe Compiled Error: ${e.message || e}\n`
    );
  }

  setTimeout(() => {
    console.log('======== end build exe ========');
  }, 0);
})();

相关问题