72 return "exe"; 73 } 74 75 @Override 76 public String getBundleType() { 77 return "INSTALLER"; 78 } 79 80 @Override 81 public File execute(Map<String, ? super Object> params, 82 File outputParentDir) throws PackagerException { 83 return bundle(params, outputParentDir); 84 } 85 86 @Override 87 public boolean supported(boolean platformInstaller) { 88 return WinMsiBundler.isSupported(); 89 } 90 91 @Override 92 public boolean validate(Map<String, ? super Object> params) 93 throws ConfigException { 94 return new WinMsiBundler().validate(params); 95 } 96 97 public File bundle(Map<String, ? super Object> params, File outdir) 98 throws PackagerException { 99 100 IOUtils.writableOutputDir(outdir.toPath()); 101 102 File exeImageDir = EXE_IMAGE_DIR.fetchFrom(params); 103 104 // Write msi to temporary directory. 105 File msi = new WinMsiBundler().bundle(params, exeImageDir); 106 107 try { 108 return buildEXE(msi, outdir); 109 } catch (IOException ex) { 110 Log.verbose(ex); 111 throw new PackagerException(ex); | 72 return "exe"; 73 } 74 75 @Override 76 public String getBundleType() { 77 return "INSTALLER"; 78 } 79 80 @Override 81 public File execute(Map<String, ? super Object> params, 82 File outputParentDir) throws PackagerException { 83 return bundle(params, outputParentDir); 84 } 85 86 @Override 87 public boolean supported(boolean platformInstaller) { 88 return WinMsiBundler.isSupported(); 89 } 90 91 @Override 92 public boolean isDefault() { 93 return true; 94 } 95 96 @Override 97 public boolean validate(Map<String, ? super Object> params) 98 throws ConfigException { 99 return new WinMsiBundler().validate(params); 100 } 101 102 public File bundle(Map<String, ? super Object> params, File outdir) 103 throws PackagerException { 104 105 IOUtils.writableOutputDir(outdir.toPath()); 106 107 File exeImageDir = EXE_IMAGE_DIR.fetchFrom(params); 108 109 // Write msi to temporary directory. 110 File msi = new WinMsiBundler().bundle(params, exeImageDir); 111 112 try { 113 return buildEXE(msi, outdir); 114 } catch (IOException ex) { 115 Log.verbose(ex); 116 throw new PackagerException(ex); |