474 getBundleName(params): "Java Runtime Image"; |
474 getBundleName(params): "Java Runtime Image"; |
475 data.put("CF_BUNDLE_NAME", name); |
475 data.put("CF_BUNDLE_NAME", name); |
476 data.put("CF_BUNDLE_VERSION", VERSION.fetchFrom(params)); |
476 data.put("CF_BUNDLE_VERSION", VERSION.fetchFrom(params)); |
477 data.put("CF_BUNDLE_SHORT_VERSION_STRING", VERSION.fetchFrom(params)); |
477 data.put("CF_BUNDLE_SHORT_VERSION_STRING", VERSION.fetchFrom(params)); |
478 |
478 |
479 Writer w = new BufferedWriter(new FileWriter(file)); |
479 try (Writer w = Files.newBufferedWriter(file.toPath())) { |
480 w.write(preprocessTextResource("Runtime-Info.plist", |
480 w.write(preprocessTextResource("Runtime-Info.plist", |
481 I18N.getString("resource.runtime-info-plist"), |
481 I18N.getString("resource.runtime-info-plist"), |
482 TEMPLATE_RUNTIME_INFO_PLIST, |
482 TEMPLATE_RUNTIME_INFO_PLIST, |
483 data, |
483 data, |
484 VERBOSE.fetchFrom(params), |
484 VERBOSE.fetchFrom(params), |
485 RESOURCE_DIR.fetchFrom(params))); |
485 RESOURCE_DIR.fetchFrom(params))); |
486 w.close(); |
486 } |
487 } |
487 } |
488 |
488 |
489 private void writeInfoPlist(File file) throws IOException { |
489 private void writeInfoPlist(File file) throws IOException { |
490 Log.verbose(MessageFormat.format(I18N.getString( |
490 Log.verbose(MessageFormat.format(I18N.getString( |
491 "message.preparing-info-plist"), file.getAbsolutePath())); |
491 "message.preparing-info-plist"), file.getAbsolutePath())); |
688 associationData = ""; |
688 associationData = ""; |
689 } |
689 } |
690 data.put("DEPLOY_FILE_ASSOCIATIONS", associationData); |
690 data.put("DEPLOY_FILE_ASSOCIATIONS", associationData); |
691 |
691 |
692 |
692 |
693 Writer w = new BufferedWriter(new FileWriter(file)); |
693 try (Writer w = Files.newBufferedWriter(file.toPath())) { |
694 w.write(preprocessTextResource( |
694 w.write(preprocessTextResource( |
695 // getConfig_InfoPlist(params).getName(), |
695 // getConfig_InfoPlist(params).getName(), |
696 "Info.plist", |
696 "Info.plist", |
697 I18N.getString("resource.app-info-plist"), |
697 I18N.getString("resource.app-info-plist"), |
698 TEMPLATE_INFO_PLIST_LITE, |
698 TEMPLATE_INFO_PLIST_LITE, |
699 data, VERBOSE.fetchFrom(params), |
699 data, VERBOSE.fetchFrom(params), |
700 RESOURCE_DIR.fetchFrom(params))); |
700 RESOURCE_DIR.fetchFrom(params))); |
701 w.close(); |
701 } |
702 } |
702 } |
703 |
703 |
704 private void writePkgInfo(File file) throws IOException { |
704 private void writePkgInfo(File file) throws IOException { |
705 //hardcoded as it does not seem we need to change it ever |
705 //hardcoded as it does not seem we need to change it ever |
706 String signature = "????"; |
706 String signature = "????"; |
707 |
707 |
708 try (Writer out = new BufferedWriter(new FileWriter(file))) { |
708 try (Writer out = Files.newBufferedWriter(file.toPath())) { |
709 out.write(OS_TYPE_CODE + signature); |
709 out.write(OS_TYPE_CODE + signature); |
710 out.flush(); |
710 out.flush(); |
711 } |
711 } |
712 } |
712 } |
713 |
713 |