提交 6b4d5523 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Show information about office configuration instead of fallback PDF generation mode

上级 d7f6efe9
...@@ -456,17 +456,18 @@ public class Build extends BuildBase { ...@@ -456,17 +456,18 @@ public class Build extends BuildBase {
exec("soffice", args("-invisible", "macro:///Standard.Module1.H2Pdf")); exec("soffice", args("-invisible", "macro:///Standard.Module1.H2Pdf"));
copy("docs", files("../h2web/h2.pdf"), "../h2web"); copy("docs", files("../h2web/h2.pdf"), "../h2web");
} catch (Exception e) { } catch (Exception e) {
print("OpenOffice is not available: " + e); println("OpenOffice / LibreOffice is not available or macros H2Pdf is not installed:");
try { println(e.toString());
if (exec("soffice", args("--convert-to", "pdf", "--outdir", "docs/html", println("********************************************************************************");
"docs/html/onePage.html")) == 0) { println("Install and run LibreOffice or OpenOffice.");
File f = new File("docs/html/onePage.pdf"); println("Open Tools - Macros - Organize Macros - LibreOffice Basic...");
if (f.exists()) { println("Navigate to My Macros / Standard / Module1 and press Edit button.");
f.renameTo(new File("docs/h2.pdf")); println("Put content of h2/src/installer/openoffice.txt here.");
} println("Edit BaseDir variable value:");
}
} catch (Exception ex) { println(" BaseDir = \"" + new File(System.getProperty("user.dir")).getParentFile().toURI() + '"');
} println("Close office application and try to build installer again.");
println("********************************************************************************");
} }
delete("docs/html/onePage.html"); delete("docs/html/onePage.html");
FileList files = files("../h2").keep("../h2/build.*"); FileList files = files("../h2").keep("../h2/build.*");
...@@ -480,7 +481,7 @@ public class Build extends BuildBase { ...@@ -480,7 +481,7 @@ public class Build extends BuildBase {
exec("makensis", args("/v2", "src/installer/h2.nsi")); exec("makensis", args("/v2", "src/installer/h2.nsi"));
installer = true; installer = true;
} catch (Exception e) { } catch (Exception e) {
print("NSIS is not available: " + e); println("NSIS is not available: " + e);
} }
String buildDate = getStaticField("org.h2.engine.Constants", "BUILD_DATE"); String buildDate = getStaticField("org.h2.engine.Constants", "BUILD_DATE");
byte[] data = readFile(new File("../h2web/h2.zip")); byte[] data = readFile(new File("../h2web/h2.zip"));
......
...@@ -766,3 +766,4 @@ interpolated thead ...@@ -766,3 +766,4 @@ interpolated thead
die weekdiff osx subprocess dow proleptic microsecond microseconds divisible cmp denormalized suppressed saturated mcs die weekdiff osx subprocess dow proleptic microsecond microseconds divisible cmp denormalized suppressed saturated mcs
london dfs weekdays intermittent looked msec tstz africa monrovia asia tokyo weekday joi callers multipliers ucn london dfs weekdays intermittent looked msec tstz africa monrovia asia tokyo weekday joi callers multipliers ucn
openoffice organize libre
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论