Skip to content

Commit c232558

Browse files
committed
Finished some things. Everything ready to generate release 2.0
1 parent d75189c commit c232558

File tree

12 files changed

+24
-18
lines changed

12 files changed

+24
-18
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ It supports standard MPLS operation as well as GoS/MPLS operation. See "Guarante
1616

1717
## Current version:
1818

19-
- <b>OpenSimMPLS 2.0</b> (Still unreleased. Only source code available) will be released under the terms of Apache Software License 2.0.
19+
- <b>OpenSimMPLS 2.0</b> was released under the terms of Apache Software License 2.0.
2020

2121
## Previous versions:
2222

@@ -59,15 +59,19 @@ cd binary-fat-release/opensimmpls
5959
```console
6060
java -jar openSimMPLS-bin-v{YourVersion}.jar
6161
```
62-
- Need some scenarios to try? There is not problem!! You'll find them at the examples folder (root of your cloned repository).
62+
- Need some scenarios to try? There is not problem!! You'll find them at the examples folder (root of your cloned repository). You can also download these examples, for your OpenSimMPLS version, in the Releases section of this repository.
63+
64+
65+
# How to use OpenSimMPLS
66+
67+
You can open a quick start guide directly from the simulator GUI. However, you can find the same guide in some languages at https://github.com/manolodd/opensimmpls/tree/master/src/com/manolodominguez/opensimmpls/resources/guides
6368

6469

6570
# THIRD-PARTY COMPONENTS
6671

6772
OpenSimMPLS uses third-party components each one of them having its own OSS license. License compatibility has been taken into account to allow OpenSimMPLS be released under its current OSS licence. They are:
6873

6974
- Jfreechart 1.5.0 - LGPL - http://www.jfree.org/jfreechart
70-
- Liquidlnf - Apache Software License 2.0 - https://sourceforge.net/projects/liquidlnf
7175
- slf4j-api 1.7.25 - MIT - https://www.slf4j.org
7276
- slf4j-simple 1.7.25 - MIT - https://www.slf4j.org
7377
- miglayout-swing 5.1 - BSD - https://github.com/mikaelgrev/miglayout

lib/liquidlnf.jar

-320 KB
Binary file not shown.

nbproject/build-impl.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ is divided into following sections:
10561056
<!-- You can override this target in the ../build.xml file. -->
10571057
</target>
10581058
<target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/>
1059-
<target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/>
1059+
<target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar" />
10601060
<!--
10611061
=================
10621062
EXECUTION SECTION

nbproject/project.properties

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ dist.javadoc.dir=${dist.dir}/javadoc
3434
endorsed.classpath=
3535
excludes=
3636
file.reference.jfreechart-1.5.0.jar=lib/jfreechart-1.5.0.jar
37-
file.reference.liquidlnf.jar=lib/liquidlnf.jar
3837
file.reference.miglayout-core-5.1.jar=lib/miglayout-core-5.1.jar
3938
file.reference.miglayout-swing-5.1.jar=lib/miglayout-swing-5.1.jar
4039
file.reference.netbeans.jar=lib/netbeans.jar
@@ -43,7 +42,6 @@ jar.archive.disabled=${jnlp.enabled}
4342
jar.compress=false
4443
jar.index=${jnlp.enabled}
4544
javac.classpath=\
46-
${file.reference.liquidlnf.jar}:\
4745
${file.reference.netbeans.jar}:\
4846
${file.reference.jfreechart-1.5.0.jar}:\
4947
${file.reference.miglayout-swing-5.1.jar}:\

src/com/manolodominguez/opensimmpls/gui/simulator/JOpenSimMPLS.java

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@
4040
import java.awt.event.WindowEvent;
4141
import java.io.File;
4242
import java.io.IOException;
43+
import java.io.InputStream;
4344
import java.net.URI;
4445
import java.net.URISyntaxException;
4546
import java.net.URL;
47+
import java.nio.file.Files;
48+
import java.nio.file.Path;
49+
import java.nio.file.StandardCopyOption;
4650
import java.util.ResourceBundle;
4751
import javax.swing.JDesktopPane;
4852
import javax.swing.JFileChooser;
@@ -364,20 +368,20 @@ private void handleClickOnQickGuide(ActionEvent evt) {
364368
if (Desktop.isDesktopSupported()) {
365369
if (Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
366370
try {
367-
URI uri = this.getClass().getResource(this.translations.getString("JSimulator.GuidePath")).toURI();
368-
uri = new URI(uri.toString().replace("file:", "file://"));
369-
System.out.println("URI: " + uri.toString());
370-
Desktop.getDesktop().browse(uri);
371+
String storedPDFGuide = this.translations.getString("JSimulator.GuidePath");
372+
String[] tokens = storedPDFGuide.split("/");
373+
String temporaryPDFGuide = tokens[tokens.length-1];
374+
Path tempOutput = Files.createTempFile(temporaryPDFGuide, ".pdf");
375+
tempOutput.toFile().deleteOnExit();
376+
try (InputStream is = this.getClass().getClassLoader().getResourceAsStream(storedPDFGuide)) {
377+
Files.copy(is, tempOutput, StandardCopyOption.REPLACE_EXISTING);
378+
}
379+
Desktop.getDesktop().open(tempOutput.toFile());
371380
} catch (IOException ex) {
372381
JErrorWindow errorWindow = new JErrorWindow(this, true, this.imageBroker);
373382
// FIX: i18N needed
374383
errorWindow.setErrorMessage("Cannot open Quick Guide");
375384
errorWindow.setVisible(true);
376-
} catch (URISyntaxException ex) {
377-
JErrorWindow errorWindow = new JErrorWindow(this, true, this.imageBroker);
378-
// FIX: i18N needed
379-
errorWindow.setErrorMessage("Cannot open Quick Guide");
380-
errorWindow.setVisible(true);
381385
} catch (UnsupportedOperationException ex) {
382386
JErrorWindow errorWindow = new JErrorWindow(this, true, this.imageBroker);
383387
// FIX: i18N needed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

src/com/manolodominguez/opensimmpls/resources/translations/translations.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,7 @@ JVentanaAyuda.Open_SimMPLS_1.0_Help=Open SimMPLS Help
12491249
JVentanaAyuda.WebPatanegra=http://opensimmpls.manolodominguez.com
12501250
VentanaconfigLERA.X\=_=X=
12511251
VentanaconfigLERA.Y\=_=Y=
1252-
JSimulator.GuidePath=/com/manolodominguez/opensimmpls/resources/guides/opensimmpls_quick_user_guide.pdf
1252+
JSimulator.GuidePath=com/manolodominguez/opensimmpls/resources/guides/opensimmpls_quick_user_guide.pdf
12531253
Menu.LetraResaltada.Contribuye=C
12541254
Contribute=Contribute
12551255
VentanaHija.Simulacion.slower=Slower

0 commit comments

Comments
 (0)