524 new File(imageDir, configScriptSrc.getName());
525 IOUtils.copyFile(configScriptSrc, configScript);
526 Log.verbose(MessageFormat.format(
527 I18N.getString("message.running-wsh-script"),
528 configScript.getAbsolutePath()));
529 IOUtils.run("wscript",
530 configScript, false);
531 }
532 return buildMSI(p, outdir);
533 }
534 return null;
535 } catch (IOException ex) {
536 Log.verbose(ex);
537 return null;
538 }
539 }
540
541 // name of post-image script
542 private File getConfig_Script(Map<String, ? super Object> params) {
543 return new File(CONFIG_ROOT.fetchFrom(params),
544 APP_FS_NAME.fetchFrom(params) + "-post-image.wsf");
545 }
546
547 private boolean prepareBasicProjectConfig(
548 Map<String, ? super Object> params) throws IOException {
549 fetchResource(getConfig_Script(params).getName(),
550 I18N.getString("resource.post-install-script"),
551 (String) null,
552 getConfig_Script(params),
553 VERBOSE.fetchFrom(params),
554 RESOURCE_DIR.fetchFrom(params));
555 return true;
556 }
557
558 private String relativePath(File basedir, File file) {
559 return file.getAbsolutePath().substring(
560 basedir.getAbsolutePath().length() + 1);
561 }
562
563 boolean prepareMainProjectFile(
564 Map<String, ? super Object> params) throws IOException {
|
524 new File(imageDir, configScriptSrc.getName());
525 IOUtils.copyFile(configScriptSrc, configScript);
526 Log.verbose(MessageFormat.format(
527 I18N.getString("message.running-wsh-script"),
528 configScript.getAbsolutePath()));
529 IOUtils.run("wscript",
530 configScript, false);
531 }
532 return buildMSI(p, outdir);
533 }
534 return null;
535 } catch (IOException ex) {
536 Log.verbose(ex);
537 return null;
538 }
539 }
540
541 // name of post-image script
542 private File getConfig_Script(Map<String, ? super Object> params) {
543 return new File(CONFIG_ROOT.fetchFrom(params),
544 APP_NAME.fetchFrom(params) + "-post-image.wsf");
545 }
546
547 private boolean prepareBasicProjectConfig(
548 Map<String, ? super Object> params) throws IOException {
549 fetchResource(getConfig_Script(params).getName(),
550 I18N.getString("resource.post-install-script"),
551 (String) null,
552 getConfig_Script(params),
553 VERBOSE.fetchFrom(params),
554 RESOURCE_DIR.fetchFrom(params));
555 return true;
556 }
557
558 private String relativePath(File basedir, File file) {
559 return file.getAbsolutePath().substring(
560 basedir.getAbsolutePath().length() + 1);
561 }
562
563 boolean prepareMainProjectFile(
564 Map<String, ? super Object> params) throws IOException {
|