diff --git a/README.md b/README.md index 85b45be..bfb9024 100644 --- a/README.md +++ b/README.md @@ -93,12 +93,13 @@ root # udevadm control --reload-rules && udevadm trigger ### Known bugs * Unable to interrupt transmission when libusb awaiting for read event (when user sent NSP list but didn't selected anything on NS). Also, sometimes, when network transmission started and nothing received from NS. -* Unable to use it on macOS version lower then Mojave. See: [Failing to claim interface on OSX](https://github.com/developersu/ns-usbloader/issues/2). Could be solved by using different build (different JAR). #### NOTES Table 'Status' = 'Uploaded' does not mean that file 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/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 shouldn't impact anyone except users of macOS High Sierra (and Sierra?) where previous versions of NS-USBloader didn't work. + ### Translators! Traductores! Übersetzer! Թարգմանիչներ! 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. @@ -111,6 +112,7 @@ Français by [Stephane Meden (JackFromNice)](https://github.com/JackFromNice) #### TODO (maybe): - [x] macOS QA v0.1 (Mojave) - [x] macOS QA v0.2.2 (Mojave) +- [x] macOS QA v0.2.3-DEV (High Sierra) - [ ] macOS QA v0.3 (Mojave, High Sierra) - [x] Windows support - [x] code refactoring diff --git a/pom.xml b/pom.xml index 4d25b3b..30bc6e0 100644 --- a/pom.xml +++ b/pom.xml @@ -140,7 +140,7 @@ org.usb4java usb4java - 1.3.0 + 1.2.0 compile diff --git a/src/main/java/nsusbloader/Controllers/NSLMainController.java b/src/main/java/nsusbloader/Controllers/NSLMainController.java index 70899ae..9787119 100644 --- a/src/main/java/nsusbloader/Controllers/NSLMainController.java +++ b/src/main/java/nsusbloader/Controllers/NSLMainController.java @@ -184,22 +184,24 @@ public class NSLMainController implements Initializable { * */ private void uploadBtnAction(){ if ((workThread == null || !workThread.isAlive())){ + // Collect files + List nspToUpload; + if ((nspToUpload = tableFilesListController.getFilesForUpload()) == null) { + logArea.setText(resourceBundle.getString("logsNoFolderFileSelected")); + return; + } + else { + logArea.setText(resourceBundle.getString("logsFilesToUploadTitle")+"\n"); + for (File item: nspToUpload) + logArea.appendText(" "+item.getAbsolutePath()+"\n"); + } + // If USB selected if (choiceProtocol.getSelectionModel().getSelectedItem().equals("GoldLeaf") || ( choiceProtocol.getSelectionModel().getSelectedItem().equals("TinFoil") && choiceNetUsb.getSelectionModel().getSelectedItem().equals("USB") ) ){ - List nspToUpload; - if ((nspToUpload = tableFilesListController.getFilesForUpload()) == null) { - logArea.setText(resourceBundle.getString("logsNoFolderFileSelected")); - return; - } - else { - logArea.setText(resourceBundle.getString("logsFilesToUploadTitle")+"\n"); - for (File item: nspToUpload) - logArea.appendText(" "+item.getAbsolutePath()+"\n"); - } usbNetCommunications = new UsbCommunications(nspToUpload, choiceProtocol.getSelectionModel().getSelectedItem()); workThread = new Thread(usbNetCommunications); workThread.setDaemon(true); @@ -209,18 +211,9 @@ public class NSLMainController implements Initializable { if (SettingsTabController.isNsIpValidate() && !nsIpTextField.getText().matches("^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.([01]?\\d\\d?|2[0-4]\\d|25[0-5])$")) if (!ServiceWindow.getConfirmationWindow(resourceBundle.getString("windowTitleBadIp"),resourceBundle.getString("windowBodyBadIp"))) return; + String nsIP = nsIpTextField.getText(); - List nspToUpload; - if ((nspToUpload = tableFilesListController.getFilesForUpload()) == null) { - logArea.setText(resourceBundle.getString("logsNoFolderFileSelected")); - return; - } - else { - logArea.setText(resourceBundle.getString("logsFilesToUploadTitle")+"\n"); - for (File item: nspToUpload) - logArea.appendText(" "+item.getAbsolutePath()+"\n"); - } if (!SettingsTabController.getExpertModeSelected()) usbNetCommunications = new NETCommunications(nspToUpload, nsIP, false, "", "", ""); else { diff --git a/src/main/resources/locale.properties b/src/main/resources/locale.properties index 25ec350..c48a58b 100644 --- a/src/main/resources/locale.properties +++ b/src/main/resources/locale.properties @@ -34,4 +34,4 @@ netTabDontServeRequestsCb=Don't serve requests netTabDontServeRequestsDescription=If selected, this computer won't reply to NSP files requests coming from NS (over the net) and use defined host settings to tell TinFoil where should it look for files. netTabHostExtraLbl=extra windowTitleErrorPort=Port set incorrectly! -windowBodyErrorPort=Port can't be 0 or greater then 65535. +windowBodyErrorPort=Port can't be 0 or greater than 65535. diff --git a/src/main/resources/locale_fra.properties b/src/main/resources/locale_fra.properties index 6f74a8b..81574f6 100644 --- a/src/main/resources/locale_fra.properties +++ b/src/main/resources/locale_fra.properties @@ -20,18 +20,18 @@ tableFileNameLbl=Nom de fichier tableStatusLbl=Statut contextMenuBtnDelete=Supprimer contextMenuBtnDeleteAll=Supprimer tout -netTabHostIPLbl=IP de l'ordinateur <-FIX? -NSIPlable=IP de NS: <-FIX? -netTabValidateNSHostNameCb=Always validate NS IP input. <-FIX -windowTitleBadIp=IP address of NS most likely incorrect <-FIX -windowBodyBadIp=Are you sure that you entered NS IP address correctly? <-FIX -netTabExpertModeCb=Expert mode<- FIX -netTabHostPortLbl=port <- fix -netTabAutoDetectIpCb=Auto-detect IP <- FIX -netTabRandSelectPortCb=Randomly get port <- FIX -netTabDontServeRequestsCb=Don't serve requests <- FIX -netTabDontServeRequestsDescription=If selected, this computer won't reply to NSP files requests coming from NS (over the net) and use defined host settings to tell TinFoil where should it look for files. <- Fix -netTabHostExtraLbl=extra <- FIX -windowTitleErrorPort=Port set incorrectly! <- FIX -windowBodyErrorPort=Port can't be 0 or greater then 65535. <- FIX +netTabHostIPLbl=IP de l'ordinateur +NSIPlable=IP de NS: +netTabValidateNSHostNameCb=Toujours v\u00E9rifier que l'adresse IP de NS entr\u00E9e est correcte +windowTitleBadIp=L'adresse IP de NS est probablement incorrecte +windowBodyBadIp=\u00CAtes-vous s\u00FBr que l'adresse IP de NS entr\u00E9e est correcte ? +netTabExpertModeCb=Mode expert +netTabHostPortLbl=port +netTabAutoDetectIpCb=D\u00E9tection automatique d'IP +netTabRandSelectPortCb=Obtenir un port al\u00E9atoire +netTabDontServeRequestsCb=Ne pas servir les demandes +netTabDontServeRequestsDescription=Si cette option est s\u00E9lectionn\u00E9e, cet ordinateur ne r\u00E9pond pas aux demandes de fichiers NSP provenant de NS (par le r\u00E9seau) et utilise les param\u00E8tres d\u2019h\u00F4te d\u00E9finis pour indiquer \u00E0 TinFoil o\u00F9 il doit rechercher les fichiers. +netTabHostExtraLbl=extra +windowTitleErrorPort=Port mal configur\u00E9! +windowBodyErrorPort=V\u00E9rifiez que le port est sup\u00E9rieur \u00E0 0 et inf\u00E9rieur ou \u00E9gal \u00E0 65535.