create-msi.js 924 B

1234567891011121314151617181920212223242526272829
  1. const MSICreator = require('electron-wix-msi').MSICreator
  2. const path = require('path')
  3. // Step 1: Instantiate the MSICreator
  4. const msiCreator = new MSICreator({
  5. appDirectory: path.resolve(__dirname, 'dist/electron/schild.report-win32-ia32'),
  6. description: 'Desktop Anwendung zum Erstellen von Schild-Reports',
  7. exe: 'schild.report.exe',
  8. name: 'schild.report',
  9. manufacturer: process.env['AUTHOR'],
  10. upgradeCode: process.env['UPGRADECODE'],
  11. version: process.env['APPVEYOR_BUILD_VERSION'],
  12. outputDirectory: path.resolve(__dirname, 'dist/msi'),
  13. shortcutFolderName: 'schild.report',
  14. language: 1031
  15. })
  16. async function createMSI () {
  17. // Step 2: Create a .wxs template file
  18. await msiCreator.create()
  19. // Step 3: Compile the template to a .msi file
  20. await msiCreator.compile()
  21. }
  22. createMSI().then(() => {
  23. console.log('MSI erfolgreich erstellt')
  24. }, (e) => {
  25. console.log('Fehler beim erstellen der MSI')
  26. })