Updated offline docs

This commit is contained in:
Cristian Maglie 2015-02-08 18:00:47 +01:00
parent e93be4855f
commit c4cd447283
6 changed files with 19 additions and 16 deletions

1
.gitignore vendored
View File

@ -37,6 +37,7 @@ build/linux/dist/*.tar.bz2
build/linux/*.tgz
build/linux/*.zip
build/linux/libastylej*
build/shared/reference*.zip
test-bin
*.iml
.idea

View File

@ -186,7 +186,6 @@ public class Base {
try {
Class.forName("com.sun.jdi.VirtualMachine");
} catch (ClassNotFoundException cnfe) {
showPlatforms();
showError(_("Please install JDK 1.5 or later"),
_("Arduino requires a full JDK (not just a JRE)\n" +
"to run. Please install JDK 1.5 or later.\n" +
@ -1901,43 +1900,40 @@ public class Base {
static public void showReference(String filename) {
File referenceFolder = getContentFile("reference");
File referenceFolder = getContentFile("reference/arduino.cc/en");
File referenceFile = new File(referenceFolder, filename);
if (!referenceFile.exists())
referenceFile = new File(referenceFolder, filename + ".html");
openURL(referenceFile.getAbsolutePath());
}
static public void showGettingStarted() {
if (OSUtils.isMacOS()) {
showReference(_("Guide_MacOSX.html"));
showReference("Guide/MacOSX");
} else if (OSUtils.isWindows()) {
showReference(_("Guide_Windows.html"));
showReference("Guide/Windows");
} else {
openURL(_("http://www.arduino.cc/playground/Learning/Linux"));
openURL("http://www.arduino.cc/playground/Learning/Linux");
}
}
static public void showReference() {
showReference(_("index.html"));
showReference("Reference/HomePage");
}
static public void showEnvironment() {
showReference(_("Guide_Environment.html"));
}
static public void showPlatforms() {
showReference(_("environment") + File.separator + _("platforms.html"));
showReference("Guide/Environment");
}
static public void showTroubleshooting() {
showReference(_("Guide_Troubleshooting.html"));
showReference("Guide/Troubleshooting");
}
static public void showFAQ() {
showReference(_("FAQ.html"));
showReference("Main/FAQ");
}

View File

@ -1881,7 +1881,7 @@ public class Editor extends JFrame implements RunnerListener {
if (referenceFile == null) {
statusNotice(I18n.format(_("No reference available for \"{0}\""), text));
} else {
Base.showReference(I18n.format(_("{0}.html"), referenceFile));
Base.showReference("Reference/" + referenceFile);
}
}

View File

@ -143,7 +143,12 @@
</copy>
<!-- Unzip documentation -->
<unzip dest="${target.path}" src="shared/reference.zip" overwrite="false"/>
<antcall target="unzip">
<param name="archive_file" value="shared/reference-1.6.0.zip" />
<param name="archive_url" value="http://arduino.cc/download.php?f=/reference-1.6.0.zip" />
<param name="final_folder" value="${target.path}/reference" />
<param name="dest_folder" value="${target.path}" />
</antcall>
<!-- Write the revision file! -->
<echo file="${target.path}/lib/version.txt" message="${version}" />

View File

@ -0,0 +1 @@
61699592ab44df789b98527f2d82e8defc8ce552

Binary file not shown.