v0.5 ready

This commit is contained in:
Dmitry Isaenko 2019-06-15 03:27:03 +03:00
parent 6c0adbfc6f
commit 187da6a4e6
5 changed files with 46 additions and 30 deletions

View file

@ -10,21 +10,26 @@ Sometimes I add new posts about this project [on my home page](https://developer
![Screenshot](https://farm8.staticflickr.com/7809/46703921964_53f60f04ed_o.png) ![Screenshot](https://farm8.staticflickr.com/7809/46703921964_53f60f04ed_o.png)
### License #### License
[GNU General Public License v3](https://github.com/developersu/ns-usbloader/blob/master/LICENSE) [GNU General Public License v3](https://github.com/developersu/ns-usbloader/blob/master/LICENSE)
### Used libraries & resources #### Used libraries & resources
* [OpenJFX](https://wiki.openjdk.java.net/display/OpenJFX/Main) * [OpenJFX](https://wiki.openjdk.java.net/display/OpenJFX/Main)
* [usb4java](https://mvnrepository.com/artifact/org.usb4java/usb4java) * [usb4java](https://mvnrepository.com/artifact/org.usb4java/usb4java)
* Few icons taken from: [materialdesignicons.com](http://materialdesignicons.com/) * Few icons taken from: [materialdesignicons.com](http://materialdesignicons.com/)
#### Thanks for the great work done by our translators!
* Italian by [unbranched](https://github.com/unbranched)
* Korean by [DDinghoya](https://github.com/DDinghoya)
* Portuguese by [almircanella](https://github.com/almircanella)
### System requirements ### System requirements
JRE/JDK 8u60 or higher. JRE/JDK 8u60 or higher.
### Usage ### Usage
#### How to start it on..
##### Linux: ##### Linux:
1. Install JRE/JDK 8u60 or higher (openJDK is good. Oracle's one is also good). JavaFX not needed (it's embedded). 1. Install JRE/JDK 8u60 or higher (openJDK is good. Oracle's one is also good). JavaFX not needed (it's embedded).
@ -85,40 +90,30 @@ Why when 'NET' once started it never ends?
Because there is HTTP server inside of application. It can't determine the moment when all transmissions finishes (unless they failed). So you have to look on your NS screen and 'Interrupt' it once done. Because there is HTTP server inside of application. It can't determine the moment when all transmissions finishes (unless they failed). So you have to look on your NS screen and 'Interrupt' it once done.
### Tips&tricks #### Tips&tricks
#### Linux: Add user to 'udev' rules to use NS not-from-root-account ##### Linux: Add user to 'udev' rules to use NS not-from-root-account
``` ```
root # vim /etc/udev/rules.d/99-NS.rules root # vim /etc/udev/rules.d/99-NS.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="3000", GROUP="plugdev" SUBSYSTEM=="usb", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="3000", GROUP="plugdev"
root # udevadm control --reload-rules && udevadm trigger root # udevadm control --reload-rules && udevadm trigger
``` ```
### Known bugs #### Known bugs
* Unable to interrupt transmission when libusb awaiting for read event (when user sent NSP list but didn't select anything on NS). Sometimes this issue also appears when network transmission started and nothing received from NS. * Unable to interrupt transmission when libusb awaiting for read event (when user sent NSP list but didn't select anything on NS). Sometimes this issue also appears when network transmission started and nothing received from NS.
### Other notes #### Other notes
'Status' = 'Uploaded' that appears in the table does not mean that file has been installed. It means that it has been sent to NS without any issues! That's what this app about. 'Status' = 'Uploaded' that appears in the table does not mean that file has been installed. It means that it has been sent to NS without any issues! That's what this app about.
Handling successful/failed installation is a purpose of the other side application: TinFoil or GoldLeaf. And they don't provide any feedback interfaces so I can't detect success/failure. Handling successful/failed installation is a purpose of the other side application: TinFoil or GoldLeaf. And they don't provide any feedback interfaces so I can't detect success/failure.
usb4java since NS-USBloader-v0.2.3 switched to 1.2.0 instead of 1.3.0. This should not impact anyone except users of macOS High Sierra (and Sierra, and El Capitan) where previous versions of NS-USBloader didn't work. usb4java since NS-USBloader-v0.2.3 switched to 1.2.0 instead of 1.3.0. This should not impact anyone except users of macOS High Sierra (and Sierra, and El Capitan) where previous versions of NS-USBloader didn't work.
### Translators! Traductores! Übersetzer! Թարգմանիչներ! #### Translators!
If you want to see this app translated to your language, go grab [this file](https://github.com/developersu/ns-usbloader/blob/master/src/main/resources/locale.properties) and translate it. If you want to see this app translated to your language, go grab [this file](https://github.com/developersu/ns-usbloader/blob/master/src/main/resources/locale.properties) and translate it.
Upload somewhere (pastebin? google drive? whatever else). [Create new issue](https://github.com/developersu/ns-usbloader/issues) and post a link. I'll grab it and add. Upload somewhere (pastebin? google drive? whatever else). [Create new issue](https://github.com/developersu/ns-usbloader/issues) and post a link. I'll grab it and add.
NOTE: actually it's not gonna work in real, because we should stay in touch and I'll need you when add something that should be translated =( NOTE: actually it's not gonna work in real, because we should stay in touch and I'll need you when add something that should be translated =(
### Thanks for great work done by our translators! ##### TODO (maybe):
Français by [Stephane Meden (JackFromNice)](https://github.com/JackFromNice)
Italian by [unbranched](https://github.com/unbranched)
Korean by [DDinghoya](https://github.com/DDinghoya)
Portuguese by [almircanella](https://github.com/almircanella)
#### TODO (maybe):
- [x] macOS QA v0.1 (Mojave) - [x] macOS QA v0.1 (Mojave)
- [x] macOS QA v0.2.2 (Mojave) - [x] macOS QA v0.2.2 (Mojave)
- [x] macOS QA v0.2.3-DEV (High Sierra) - [x] macOS QA v0.2.3-DEV (High Sierra)
@ -133,7 +128,7 @@ Portuguese by [almircanella](https://github.com/almircanella)
- [x] 'Check for application updates' functionality - [x] 'Check for application updates' functionality
#### Thanks ##### Thanks
Appreciate assistance and support of both Vitaliy and Konstantin. Without you all this magic would not have happened. Appreciate assistance and support of both Vitaliy and Konstantin. Without you all this magic would not have happened.
[Konstanin Kelemen](https://github.com/konstantin-kelemen) [Konstanin Kelemen](https://github.com/konstantin-kelemen)

View file

@ -8,7 +8,7 @@
<name>NS-USBloader</name> <name>NS-USBloader</name>
<artifactId>ns-usbloader</artifactId> <artifactId>ns-usbloader</artifactId>
<version>0.4.1-SNAPSHOT</version> <version>0.5-SNAPSHOT</version>
<url>https://github.com/developersu/ns-usbloader/</url> <url>https://github.com/developersu/ns-usbloader/</url>
<description> <description>

View file

@ -13,10 +13,12 @@ import nsusbloader.AppPreferences;
import nsusbloader.ServiceWindow; import nsusbloader.ServiceWindow;
import nsusbloader.ModelControllers.UpdatesChecker; import nsusbloader.ModelControllers.UpdatesChecker;
import javax.security.auth.callback.Callback;
import java.io.File; import java.io.File;
import java.io.IOException;
import java.net.URL; import java.net.URL;
import java.util.*; import java.util.*;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
public class SettingsController implements Initializable { public class SettingsController implements Initializable {
@ -189,15 +191,34 @@ public class SettingsController implements Initializable {
tfXciSpprtCb.setSelected(AppPreferences.getInstance().getTfXCI()); tfXciSpprtCb.setSelected(AppPreferences.getInstance().getTfXCI());
// Language settings area // Language settings area
URL resourceURL = this.getClass().getResource("/");
String[] filesList = new File(resourceURL.getFile()).list(); // Screw it. This WON'T produce NullPointerException
ObservableList<String> langCBObsList = FXCollections.observableArrayList(); ObservableList<String> langCBObsList = FXCollections.observableArrayList();
langCBObsList.add("eng"); langCBObsList.add("eng");
File jarFile = new File(getClass().getProtectionDomain().getCodeSource().getLocation().getPath());
if(jarFile.isFile()) { // Run with JAR file
try {
JarFile jar = new JarFile(jarFile);
Enumeration<JarEntry> entries = jar.entries(); //gives ALL entries in jar
while (entries.hasMoreElements()) {
String name = entries.nextElement().getName();
if (name.startsWith("locale_"))
langCBObsList.add(name.substring(7, 10));
}
jar.close();
}
catch (IOException ioe){
ioe.printStackTrace(); // TODO: think about better solution?
}
}
else { // Run within IDE
URL resourceURL = this.getClass().getResource("/");
String[] filesList = new File(resourceURL.getFile()).list(); // Screw it. This WON'T produce NullPointerException
for (String jarFileName : filesList) for (String jarFileName : filesList)
if (jarFileName.startsWith("locale_")) if (jarFileName.startsWith("locale_"))
langCBObsList.add(jarFileName.substring(7, 10)); langCBObsList.add(jarFileName.substring(7, 10));
}
langCB.setItems(langCBObsList); langCB.setItems(langCBObsList);
if (langCBObsList.contains(AppPreferences.getInstance().getLanguage())) if (langCBObsList.contains(AppPreferences.getInstance().getLanguage()))

View file

@ -12,7 +12,7 @@ import java.util.Locale;
import java.util.ResourceBundle; import java.util.ResourceBundle;
public class NSLMain extends Application { public class NSLMain extends Application {
public static final String appVersion = "v0.4.1"; public static final String appVersion = "v0.5";
@Override @Override
public void start(Stage primaryStage) throws Exception{ public void start(Stage primaryStage) throws Exception{

View file

@ -87,7 +87,7 @@
<HBox alignment="CENTER_LEFT" spacing="5.0"> <HBox alignment="CENTER_LEFT" spacing="5.0">
<children> <children>
<Label text="%netTabLanguage" /> <Label text="%netTabLanguage" />
<ChoiceBox fx:id="langCB" prefWidth="150.0" /> <ChoiceBox fx:id="langCB" prefWidth="100.0" />
<Button fx:id="langBtn" mnemonicParsing="false" text="OK" /> <Button fx:id="langBtn" mnemonicParsing="false" text="OK" />
</children> </children>
</HBox> </HBox>