119 |
119 |
120 public File bundle(Map<String, ? super Object> params, |
120 public File bundle(Map<String, ? super Object> params, |
121 File outdir) throws PackagerException { |
121 File outdir) throws PackagerException { |
122 Log.verbose(MessageFormat.format(I18N.getString( |
122 Log.verbose(MessageFormat.format(I18N.getString( |
123 "message.building-bundle"), APP_NAME.fetchFrom(params))); |
123 "message.building-bundle"), APP_NAME.fetchFrom(params))); |
124 if (!outdir.isDirectory() && !outdir.mkdirs()) { |
124 |
125 throw new PackagerException( |
125 IOUtils.writableOutputDir(outdir.toPath()); |
126 "error.cannot-create-output-dir", |
|
127 outdir.getAbsolutePath()); |
|
128 } |
|
129 if (!outdir.canWrite()) { |
|
130 throw new PackagerException( |
|
131 "error.cannot-write-to-output-dir", |
|
132 outdir.getAbsolutePath()); |
|
133 } |
|
134 |
126 |
135 // first, load in some overrides |
127 // first, load in some overrides |
136 // icns needs @2 versions, so load in the @2 default |
128 // icns needs @2 versions, so load in the @2 default |
137 params.put(DEFAULT_ICNS_ICON.getID(), TEMPLATE_BUNDLE_ICON_HIDPI); |
129 params.put(DEFAULT_ICNS_ICON.getID(), TEMPLATE_BUNDLE_ICON_HIDPI); |
138 |
130 |