Compare commits

..

No commits in common. "master" and "v7.1" have entirely different histories.
master ... v7.1

33 changed files with 393 additions and 771 deletions

View file

@ -1,82 +0,0 @@
steps:
- name: test-standard
when:
event: [tag, push]
image: maven:3-openjdk-17
commands:
- mvn -B -DskipTests clean package
- mvn test -B
- echo target/ns-usbloader-*jar
- mkdir artifacts
- cp target/ns-usbloader-*jar artifacts
volumes:
- /home/docker/woodpecker/files/m2:/root/.m2
- name: make-windows-installer
when:
event: [tag, push]
image: wheatstalk/makensis:3
commands:
- cp target/NS-USBloader.exe misc/windows/NSIS/
- misc/windows/update_version.sh
- cd misc/windows/NSIS
- makensis -V4 ./installer.nsi
- echo Installer-*.exe
- cp Installer-*.exe "../../../artifacts"
- rm ./NS-USBloader.exe
- rm ./Installer-*.exe
- cd ../../../
volumes:
- /home/docker/woodpecker/files/assembly/openjdk-19.0.2:/assembly/jdk
- /home/docker/woodpecker/files/assembly/Drivers_set.exe:/assembly/Drivers_set.exe
- name: emerge-legacy-artifact
when:
event: [tag, push]
image: maven:3-openjdk-17
commands:
- . ./.make_legacy
- mvn -B -DskipTests clean package
- echo target/ns-usbloader-*jar
- cp target/ns-usbloader-*jar artifacts
volumes:
- /home/docker/woodpecker/files/m2:/root/.m2
- name: make-legacy-windows-installer
when:
event: [tag, push]
image: wheatstalk/makensis:3
commands:
- cp target/NS-USBloader.exe misc/windows/NSIS/
- misc/windows/update_version.sh legacy
- cd misc/windows/NSIS
- makensis -V4 ./installer.nsi
- echo Installer-*.exe
- cp Installer-*.exe "../../../artifacts"
- cd ../../../
volumes:
- /home/docker/woodpecker/files/assembly/openjdk-19.0.2:/assembly/jdk
- /home/docker/woodpecker/files/assembly/Drivers_set.exe:/assembly/Drivers_set.exe
- name: emerge-mac-m1-artifact
when:
event: [tag, push]
image: maven:3-openjdk-17
commands:
- . ./.make_m1
- mvn -B -DskipTests clean package
- echo target/ns-usbloader-*jar
- cp target/ns-usbloader-*jar artifacts
volumes:
- /home/docker/woodpecker/files/m2:/root/.m2
- name: save-artifacts
when:
event: [tag, push]
image: alpine:latest
commands:
- export ARTIFACTS_DIR="$(date -d @$CI_PIPELINE_CREATED +'%Y-%m-%d %H:%m %Z')"
- mkdir -p /builds/ns-usbloader/
- mv artifacts "/builds/ns-usbloader/$ARTIFACTS_DIR"
volumes:
- /home/www/builds:/builds

View file

@ -1,6 +1,6 @@
<h1 align="center"><img src="screenshots/ApplicationLogo.svg" alt="NS-USBloader" width="450px"/></h1>
![License](https://img.shields.io/badge/License-GPLv3-blue.svg) ![Releases](https://img.shields.io/github/downloads/developersu/ns-usbloader/total.svg) ![LatestVer](https://img.shields.io/github/release/developersu/ns-usbloader.svg) [![status-badge](https://ci.redrise.ru/api/badges/12/status.svg)](https://ci.redrise.ru/repos/12)
![License](https://img.shields.io/badge/License-GPLv3-blue.svg) ![Releases](https://img.shields.io/github/downloads/developersu/ns-usbloader/total.svg) ![LatestVer](https://img.shields.io/github/release/developersu/ns-usbloader.svg) [![Build Status](https://ci.redrise.ru/api/badges/desu/ns-usbloader/status.svg)](https://ci.redrise.ru/desu/ns-usbloader)
NS-USBloader is:
* A PC-side installer for **[Huntereb/Awoo-Installer](https://github.com/Huntereb/Awoo-Installer)** / other compatible installers (USB and Network supported) and **[XorTroll/Goldleaf](https://github.com/XorTroll/Goldleaf)** (USB) NSP installer.
@ -59,16 +59,13 @@ Sometimes I add new posts about this project [on my blog page](https://developer
* Swedish by [Daniel Nylander](https://github.com/yeager)
* Japanese by [kuragehime](https://github.com/kuragehimekurara1)
* Ryukyuan languages by [kuragehime](https://github.com/kuragehimekurara1)
* Turkish language by [Erimsaholut](https://github.com/Erimsaholut)
* Serbian (Latin) translation [BlytheScythe](https://github.com/BlytheScythe)
* Angelo Elias Dalzotto makes packages in AUR
* Phoenix[Msc] provides his shiny Mac M1 for debug
### System requirements
- JDK 11 for macOS and Linux
- libusb, if you have a Mac with Apple Silicon (install via `brew install libusb`)
JDK 11 for macOS and Linux
### Supported Goldleaf versions
| Goldleaf version | NS-USBloader version |
@ -130,8 +127,6 @@ Set 'Security & Privacy' settings if needed.
Download application with `-m1.jar` postfix.
Manually install libusb with Homebrew by running `brew install libusb` in your Terminal.
##### Windows:
* Once application opens click on 'Gear' icon.
@ -248,7 +243,7 @@ We have this situation because of weird behaviour inside usb4java library used i
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're familiar with pull request, go ahead and create it! No worries it you are not. Just upload somewhere (like 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 (create PR, use 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.
To convert files of any locale to readable format (and vise-versa) you can use this site [https://itpro.cz/juniconv/](https://itpro.cz/juniconv/)
@ -258,6 +253,17 @@ If you like this app, just give a star (@ GitHub).
This is non-commercial project.
Nevertheless, I'll be more than happy if you find a chance to make a donation for charity to people I trust:
* BTC → 1BnErE3n6LEdEjvvFrt4FMdXd1UGa5L7Ge
* ETH → 0x9c29418129553bE171181bb6245151aa0576A3b7
* DOT → 15BWSwmA4xEHZdq3gGftWg7dctMQk9vXwqA92Pg22gsxDweF
* LTC → ltc1qfjvzxm04tax077ra9rvmxdnsum8alws2n20fag
* ETC → 0xe9064De288C8454942533a005AB72515e689226E
* USDT (TRC20) → TKgp5SvJGiqYNFtvJfEDGLFbezFEHq1tBy
* USDT (ERC20) → 0x9c29418129553bE171181bb6245151aa0576A3b7
* XRP → rGmGaLsKmSUbxWfyi4mujtVamTzj3Nqxbw.
Thanks!
Appreciate assistance and support of both [Vitaliy](https://github.com/SebastianUA) and [Konstantin](https://github.com/konstantin-kelemen). Without you all this magic would not have happened.

View file

@ -91,8 +91,8 @@
Section "NS-USBloader" Install
SetOutPath "$INSTDIR"
file /r \assembly\jdk
file \assembly\Drivers_set.exe
file /r jdk
file Drivers_set.exe
file NS-USBloader.exe
file logo.ico

View file

@ -8,7 +8,7 @@
<name>NS-USBloader</name>
<artifactId>ns-usbloader</artifactId>
<version>7.3</version> <!-- linked via script to NSIS system. Should have format of 2 blocks of numbers -->
<version>7.1</version> <!-- linked via script to NSIS system. Should have format of 2 blocks of numbers -->
<url>https://redrise.ru</url>
<description>NS multi-tool</description>

View file

@ -1,5 +1,5 @@
/*
Copyright 2019-2024 Dmitry Isaenko
Copyright 2019-2020 Dmitry Isaenko
This file is part of NS-USBloader.
@ -39,13 +39,10 @@ import java.util.ResourceBundle;
public class FilesDropHandle {
public FilesDropHandle(List<File> files,
String filesRegex,
String foldersRegex,
NSTableViewController tableController){
public FilesDropHandle(List<File> files, String filesRegex, String foldersRegex){
FilesDropHandleTask filesDropHandleTask = new FilesDropHandleTask(files, filesRegex, foldersRegex);
ResourceBundle resourceBundle = MediatorControl.INSTANCE.getResourceBundle();
ResourceBundle resourceBundle = MediatorControl.getInstance().getResourceBundle();
Button cancelButton = new Button(resourceBundle.getString("btn_Cancel"));
ProgressIndicator progressIndicator = new ProgressIndicator();
@ -104,7 +101,7 @@ public class FilesDropHandle {
List<File> allFiles = filesDropHandleTask.getValue();
if (! allFiles.isEmpty()) {
tableController.setFiles(allFiles);
MediatorControl.getInstance().getGamesController().tableFilesListController.setFiles(allFiles);
}
stage.close();
});

View file

@ -1,5 +1,5 @@
/*
Copyright 2019-2024 Dmitry Isaenko
Copyright 2019-2020 Dmitry Isaenko
This file is part of NS-USBloader.
@ -32,7 +32,7 @@ public class FilesDropHandleTask extends Task<List<File>> {
private final List<File> filesDropped;
private final List<File> allFiles;
private final String messageTemplate;
private String messageTemplate;
private long filesScanned = 0;
private long filesAdded = 0;
@ -43,12 +43,12 @@ public class FilesDropHandleTask extends Task<List<File>> {
this.filesRegex = filesRegex;
this.foldersRegex = foldersRegex;
this.allFiles = new ArrayList<>();
this.messageTemplate = MediatorControl.INSTANCE.getResourceBundle().getString("windowBodyFilesScanned");
this.messageTemplate = MediatorControl.getInstance().getResourceBundle().getString("windowBodyFilesScanned");
}
@Override
protected List<File> call() {
if (filesDropped == null || filesDropped.isEmpty())
if (filesDropped == null || filesDropped.size() == 0)
return allFiles;
for (File file : filesDropped){

View file

@ -1,5 +1,5 @@
/*
Copyright 2019-2024 Dmitry Isaenko
Copyright 2019-2023 Dmitry Isaenko
This file is part of NS-USBloader.
@ -142,9 +142,7 @@ public class FontSettingsController implements Initializable {
final double fontSize = fontSizeSpinner.getValue().intValue();
preferences.setFontStyle(fontFamily, fontSize);
MediatorControl.INSTANCE.getLogArea().getScene().getRoot().setStyle(
String.format("-fx-font-family: \"%s\"; -fx-font-size: %.0f;", fontFamily, fontSize));
MediatorControl.getInstance().updateApplicationFont(fontFamily, fontSize);
closeWindow();
}

View file

@ -1,5 +1,5 @@
/*
Copyright 2019-2024 Dmitry Isaenko, wolfposd
Copyright 2019-2020 Dmitry Isaenko, wolfposd
This file is part of NS-USBloader.
@ -31,7 +31,6 @@ import javafx.scene.layout.Region;
import javafx.stage.DirectoryChooser;
import javafx.stage.FileChooser;
import nsusbloader.AppPreferences;
import nsusbloader.NSLDataTypes.EFileStatus;
import nsusbloader.com.net.NETCommunications;
import nsusbloader.com.usb.UsbCommunications;
import nsusbloader.FilesHelper;
@ -46,14 +45,12 @@ import java.util.*;
import java.util.function.Consumer;
import java.util.function.Supplier;
public class GamesController implements Initializable, ISubscriber {
public class GamesController implements Initializable {
private static final String REGEX_ONLY_NSP = ".*\\.nsp$";
private static final String REGEX_ALLFILES_TINFOIL = ".*\\.(nsp$|xci$|nsz$|xcz$)";
private static final String REGEX_ALLFILES = ".*";
private static final MediatorControl mediator = MediatorControl.INSTANCE;
@FXML
private AnchorPane usbNetPane;
@ -66,7 +63,7 @@ public class GamesController implements Initializable, ISubscriber {
@FXML
private Button switchThemeBtn;
@FXML
private NSTableViewController tableFilesListController;
public NSTableViewController tableFilesListController; // Accessible from Mediator (for drag-n-drop support)
@FXML
private Button selectNspBtn, selectSplitBtn, uploadStopBtn;
@ -104,7 +101,6 @@ public class GamesController implements Initializable, ISubscriber {
disableUploadStopBtn(tableFilesListController.isFilesForUploadListEmpty());
}); // Add listener to notify tableView controller
tableFilesListController.setNewProtocol(getSelectedProtocolByName()); // Notify tableView controller
tableFilesListController.setGamesController(this);
ObservableList<String> choiceNetUsbList = FXCollections.observableArrayList("USB", "NET");
choiceNetUsb.setItems(choiceNetUsbList);
@ -208,11 +204,11 @@ public class GamesController implements Initializable, ISubscriber {
}
private boolean isAllFiletypesAllowedForGL() {
return ! mediator.getSettingsController().getGoldleafSettings().getNSPFileFilterForGL();
return ! MediatorControl.getInstance().getSettingsController().getGoldleafSettings().getNSPFileFilterForGL();
}
private boolean isXciNszXczSupport() {
return mediator.getSettingsController().getTinfoilSettings().isXciNszXczSupport();
return MediatorControl.getInstance().getSettingsController().getTinfoilSettings().isXciNszXczSupport();
}
/**
@ -220,7 +216,7 @@ public class GamesController implements Initializable, ISubscriber {
* tinfoil + xcinszxcz </br>
* tinfoil + nsponly </br>
* goldleaf </br>
* etc...
* etc..
*/
private String getRegexForFiles() {
if (isTinfoil() && isXciNszXczSupport())
@ -372,58 +368,56 @@ public class GamesController implements Initializable, ISubscriber {
if (workThread != null && workThread.isAlive())
return;
// Collect files
List<File> nspToUpload;
TextArea logArea = MediatorControl.getInstance().getContoller().logArea;
if (isTinfoil() && tableFilesListController.getFilesForUpload() == null) {
ServiceWindow.getInfoNotification("(o_o\")", resourceBundle.getString("tab3_Txt_NoFolderOrFileSelected"));
logArea.setText(resourceBundle.getString("tab3_Txt_NoFolderOrFileSelected"));
return;
}
// Collect files
List<File> nspToUpload = tableFilesListController.getFilesForUpload();
if (nspToUpload == null)
nspToUpload = new ArrayList<>();
//todo: add to make it visible
/*
else {
TextArea logArea = mediator.getLogArea();
if ((nspToUpload = tableFilesListController.getFilesForUpload()) != null){
logArea.setText(resourceBundle.getString("tab3_Txt_FilesToUploadTitle")+"\n");
nspToUpload.forEach(item -> logArea.appendText(" "+item.getAbsolutePath()+"\n"));
}
*/
else {
logArea.clear();
nspToUpload = new LinkedList<>();
}
SettingsController settings = mediator.getSettingsController();
SettingsController settings = MediatorControl.getInstance().getSettingsController();
// If USB selected
if (isGoldLeaf()){
final SettingsBlockGoldleafController goldleafSettings = settings.getGoldleafSettings();
usbNetCommunications = new UsbCommunications(nspToUpload, "GoldLeaf" + goldleafSettings.getGlVer(), goldleafSettings.getNSPFileFilterForGL());
}
else {
if (getSelectedNetUsb().equals("USB")){
usbNetCommunications = new UsbCommunications(nspToUpload, "TinFoil", false);
else if (( isTinfoil() && getSelectedNetUsb().equals("USB") )){
usbNetCommunications = new UsbCommunications(nspToUpload, "TinFoil", false);
}
else { // NET INSTALL OVER TINFOIL
final String ipValidationPattern = "^([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])$";
final SettingsBlockTinfoilController tinfoilSettings = settings.getTinfoilSettings();
if (tinfoilSettings.isValidateNSHostName() && ! getNsIp().matches(ipValidationPattern)) {
if (!ServiceWindow.getConfirmationWindow(resourceBundle.getString("windowTitleBadIp"), resourceBundle.getString("windowBodyBadIp")))
return;
}
else { // NET INSTALL OVER TINFOIL
final String ipValidationPattern = "^([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])$";
final SettingsBlockTinfoilController tinfoilSettings = settings.getTinfoilSettings();
if (tinfoilSettings.isValidateNSHostName() && ! getNsIp().matches(ipValidationPattern)) {
if (!ServiceWindow.getConfirmationWindow(resourceBundle.getString("windowTitleBadIp"), resourceBundle.getString("windowBodyBadIp")))
return;
}
String nsIP = getNsIp();
String nsIP = getNsIp();
if (! tinfoilSettings.isExpertModeSelected())
usbNetCommunications = new NETCommunications(nspToUpload, nsIP, false, "", "", "");
else {
usbNetCommunications = new NETCommunications(
nspToUpload,
nsIP,
tinfoilSettings.isNoRequestsServe(),
tinfoilSettings.isAutoDetectIp()?"":tinfoilSettings.getHostIp(),
tinfoilSettings.isRandomlySelectPort()?"":tinfoilSettings.getHostPort(),
tinfoilSettings.isNoRequestsServe()?tinfoilSettings.getHostExtra():""
);
}
if (! tinfoilSettings.isExpertModeSelected())
usbNetCommunications = new NETCommunications(nspToUpload, nsIP, false, "", "", "");
else {
usbNetCommunications = new NETCommunications(
nspToUpload,
nsIP,
tinfoilSettings.isNoRequestsServe(),
tinfoilSettings.isAutoDetectIp()?"":tinfoilSettings.getHostIp(),
tinfoilSettings.isRandomlySelectPort()?"":tinfoilSettings.getHostPort(),
tinfoilSettings.isNoRequestsServe()?tinfoilSettings.getHostExtra():""
);
}
}
workThread = new Thread(usbNetCommunications);
@ -452,7 +446,7 @@ public class GamesController implements Initializable, ISubscriber {
* */
@FXML
private void handleDragOver(DragEvent event){
if (event.getDragboard().hasFiles() && ! mediator.getTransferActive())
if (event.getDragboard().hasFiles() && ! MediatorControl.getInstance().getTransferActive())
event.acceptTransferModes(TransferMode.ANY);
event.consume();
}
@ -462,15 +456,47 @@ public class GamesController implements Initializable, ISubscriber {
@FXML
private void handleDrop(DragEvent event) {
List<File> files = event.getDragboard().getFiles();
new FilesDropHandle(files, getRegexForFiles(), getRegexForFolders(), tableFilesListController);
new FilesDropHandle(files, getRegexForFiles(), getRegexForFolders());
event.setDropCompleted(true);
event.consume();
}
/**
* This function called from NSTableViewController
* This thing modify UI for reusing 'Upload to NS' button and make functionality set for "Stop transmission"
* Called from mediator
* TODO: remove shitcoding practices
* */
void disableUploadStopBtn(boolean disable){
public void notifyThreadStarted(boolean isActive, EModule type){
if (! type.equals(EModule.USB_NET_TRANSFERS)){
usbNetPane.setDisable(isActive);
return;
}
selectNspBtn.setDisable(isActive);
selectSplitBtn.setDisable(isActive);
btnUpStopImage.getStyleClass().clear();
if (isActive) {
btnUpStopImage.getStyleClass().add("regionStop");
uploadStopBtn.setOnAction(e-> stopBtnAction());
uploadStopBtn.setText(resourceBundle.getString("btn_Stop"));
uploadStopBtn.getStyleClass().remove("buttonUp");
uploadStopBtn.getStyleClass().add("buttonStop");
}
else {
btnUpStopImage.getStyleClass().add("regionUpload");
uploadStopBtn.setOnAction(e-> uploadBtnAction());
uploadStopBtn.setText(resourceBundle.getString("btn_Upload"));
uploadStopBtn.getStyleClass().remove("buttonStop");
uploadStopBtn.getStyleClass().add("buttonUp");
}
}
/**
* Crunch. This function called from NSTableViewController
* */
public void disableUploadStopBtn(boolean disable){
if (isTinfoil())
uploadStopBtn.setDisable(disable);
else
@ -489,8 +515,11 @@ public class GamesController implements Initializable, ISubscriber {
}).start();
}
void setFilesSelectorButtonBehaviour(boolean isDirectoryChooser){
public void updateFilesSelectorButtonBehaviour(boolean isDirectoryChooser){
btnSelectImage.getStyleClass().clear();
setFilesSelectorButtonBehaviour(isDirectoryChooser);
}
private void setFilesSelectorButtonBehaviour(boolean isDirectoryChooser){
if (isDirectoryChooser){
selectNspBtn.setOnAction(e -> selectFoldersBtnAction());
btnSelectImage.getStyleClass().add("regionScanFolders");
@ -506,7 +535,7 @@ public class GamesController implements Initializable, ISubscriber {
/**
* Get 'Recent' path
*/
private String getRecentPath(){
public String getRecentPath(){
return previouslyOpenedPath;
}
@ -518,42 +547,4 @@ public class GamesController implements Initializable, ISubscriber {
preferences.setNetUsb(getSelectedNetUsb());
preferences.setNsIp(getNsIp());
}
/**
* This thing modifies UI for reusing 'Upload to NS' button and make functionality set for "Stop transmission"
* */
@Override
public void notify(EModule type, boolean isActive, Payload payload) {
if (! type.equals(EModule.USB_NET_TRANSFERS)){
usbNetPane.setDisable(isActive);
return;
}
selectNspBtn.setDisable(isActive);
selectSplitBtn.setDisable(isActive);
btnUpStopImage.getStyleClass().clear();
if (isActive) {
btnUpStopImage.getStyleClass().add("regionStop");
uploadStopBtn.setOnAction(e-> stopBtnAction());
uploadStopBtn.setText(resourceBundle.getString("btn_Stop"));
uploadStopBtn.getStyleClass().remove("buttonUp");
uploadStopBtn.getStyleClass().add("buttonStop");
return;
}
btnUpStopImage.getStyleClass().add("regionUpload");
uploadStopBtn.setOnAction(e-> uploadBtnAction());
uploadStopBtn.setText(resourceBundle.getString("btn_Upload"));
uploadStopBtn.getStyleClass().remove("buttonStop");
uploadStopBtn.getStyleClass().add("buttonUp");
Map<String, EFileStatus> statusMap = payload.getStatusMap();
if (! statusMap.isEmpty()) {
for (String key : statusMap.keySet())
tableFilesListController.setFileStatus(key, statusMap.get(key));
}
}
}

View file

@ -1,25 +0,0 @@
/*
Copyright 2019-2024 Dmitry Isaenko
This file is part of NS-USBloader.
NS-USBloader is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
NS-USBloader is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with NS-USBloader. If not, see <https://www.gnu.org/licenses/>.
*/
package nsusbloader.Controllers;
import nsusbloader.NSLDataTypes.EModule;
public interface ISubscriber {
void notify(EModule type, boolean status, Payload payload);
}

View file

@ -1,5 +1,5 @@
/*
Copyright 2019-2024 Dmitry Isaenko
Copyright 2019-2020 Dmitry Isaenko
This file is part of NS-USBloader.
@ -18,6 +18,7 @@
*/
package nsusbloader.Controllers;
import javafx.application.HostServices;
import javafx.concurrent.Task;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
@ -34,10 +35,10 @@ public class NSLMainController implements Initializable {
private ResourceBundle resourceBundle;
@FXML
private TextArea logArea;
public TextArea logArea; // Accessible from Mediator
@FXML
private ProgressBar progressBar;
public ProgressBar progressBar; // Accessible from Mediator
@FXML
private TabPane mainTabPane;
@ -67,6 +68,8 @@ public class NSLMainController implements Initializable {
logArea.appendText(rb.getString("tab3_Txt_GreetingsMessage2")+"\n");
MediatorControl.getInstance().setController(this);
AppPreferences preferences = AppPreferences.getInstance();
if (preferences.getAutoCheckUpdates())
@ -76,22 +79,6 @@ public class NSLMainController implements Initializable {
mainTabPane.getTabs().remove(3);
openLastOpenedTab();
TransfersPublisher transfersPublisher = new TransfersPublisher(
GamesTabController,
SplitMergeTabController,
RcmTabController,
NXDTabController,
PatchesTabController);
MediatorControl.INSTANCE.configure(
resourceBundle,
SettingsTabController,
logArea,
progressBar,
GamesTabController,
transfersPublisher);
}
private void checkForUpdates(){
Task<List<String>> updTask = new UpdatesChecker();
@ -114,7 +101,40 @@ public class NSLMainController implements Initializable {
updates.setDaemon(true);
updates.start();
}
/**
* Get resources
* TODO: Find better solution; used in UsbCommunications() -> GL -> SelectFile command
* @return ResourceBundle
*/
public ResourceBundle getResourceBundle() {
return resourceBundle;
}
/**
* Provide hostServices to Settings tab
* */
public void setHostServices(HostServices hs ){ SettingsTabController.getGenericSettings().registerHostServices(hs);}
/**
* Get 'Settings' controller
* Used by FrontController
* */
public SettingsController getSettingsCtrlr(){
return SettingsTabController;
}
public GamesController getGamesCtrlr(){
return GamesTabController;
}
public SplitMergeController getSmCtrlr(){
return SplitMergeTabController;
}
public RcmController getRcmCtrlr(){ return RcmTabController; }
public NxdtController getNXDTabController(){ return NXDTabController; }
public PatchesController getPatchesTabController(){ return PatchesTabController; }
/**
* Save preferences before exit
* */

View file

@ -1,5 +1,5 @@
/*
Copyright 2019-2024 Dmitry Isaenko, wolfposd
Copyright 2019-2020 Dmitry Isaenko, wolfposd
This file is part of NS-USBloader.
@ -42,8 +42,6 @@ public class NSTableViewController implements Initializable {
private TableView<NSLRowModel> table;
private ObservableList<NSLRowModel> rowsObsLst;
private GamesController gamesController;
@Override
public void initialize(URL url, ResourceBundle resourceBundle) {
rowsObsLst = FXCollections.observableArrayList();
@ -54,10 +52,10 @@ public class NSTableViewController implements Initializable {
table.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
table.setOnKeyPressed(keyEvent -> {
if (!rowsObsLst.isEmpty()) {
if (keyEvent.getCode() == KeyCode.DELETE && !MediatorControl.INSTANCE.getTransferActive()) {
if (keyEvent.getCode() == KeyCode.DELETE && !MediatorControl.getInstance().getTransferActive()) {
rowsObsLst.removeAll(table.getSelectionModel().getSelectedItems());
if (rowsObsLst.isEmpty())
gamesController.disableUploadStopBtn(true);
MediatorControl.getInstance().getGamesController().disableUploadStopBtn(true); // TODO: change to something better
table.refresh();
} else if (keyEvent.getCode() == KeyCode.SPACE) {
for (NSLRowModel item : table.getSelectionModel().getSelectedItems()) {
@ -175,13 +173,13 @@ public class NSTableViewController implements Initializable {
deleteMenuItem.setOnAction(actionEvent -> {
rowsObsLst.remove(row.getItem());
if (rowsObsLst.isEmpty())
gamesController.disableUploadStopBtn(true);
MediatorControl.getInstance().getGamesController().disableUploadStopBtn(true); // TODO: change to something better
table.refresh();
});
MenuItem deleteAllMenuItem = new MenuItem(resourceBundle.getString("tab1_table_contextMenu_Btn_DeleteAll"));
deleteAllMenuItem.setOnAction(actionEvent -> {
rowsObsLst.clear();
gamesController.disableUploadStopBtn(true);
MediatorControl.getInstance().getGamesController().disableUploadStopBtn(true); // TODO: change to something better
table.refresh();
});
contextMenu.getItems().addAll(deleteMenuItem, deleteAllMenuItem);
@ -191,7 +189,7 @@ public class NSTableViewController implements Initializable {
Bindings.when(
Bindings.isNotNull(
row.itemProperty()))
.then(MediatorControl.INSTANCE.getTransferActive()?null:contextMenu)
.then(MediatorControl.getInstance().getTransferActive()?null:contextMenu)
.otherwise((ContextMenu) null)
);
// Just.. don't ask..
@ -212,11 +210,6 @@ public class NSTableViewController implements Initializable {
table.getColumns().add(fileSizeColumn);
table.getColumns().add(uploadColumn);
}
public void setGamesController(GamesController gamesController) {
this.gamesController = gamesController;
}
/**
* Add single file when user selected it (Split file usually)
* */
@ -231,7 +224,7 @@ public class NSTableViewController implements Initializable {
}
else {
rowsObsLst.add(new NSLRowModel(file, true));
gamesController.disableUploadStopBtn(false);
MediatorControl.getInstance().getGamesController().disableUploadStopBtn(false); // TODO: change to something better
}
table.refresh();
}
@ -251,7 +244,7 @@ public class NSTableViewController implements Initializable {
else {
for (File file: newFiles)
rowsObsLst.add(new NSLRowModel(file, true));
gamesController.disableUploadStopBtn(false);
MediatorControl.getInstance().getGamesController().disableUploadStopBtn(false); // TODO: change to something better
}
//rowsObsLst.get(0).setMarkForUpload(true);
table.refresh();

View file

@ -25,6 +25,8 @@ import javafx.scene.control.Label;
import javafx.scene.layout.Region;
import javafx.stage.DirectoryChooser;
import nsusbloader.AppPreferences;
import nsusbloader.FilesHelper;
import nsusbloader.MediatorControl;
import nsusbloader.ModelControllers.CancellableRunnable;
import nsusbloader.NSLDataTypes.EModule;
import nsusbloader.Utilities.nxdumptool.NxdtTask;
@ -33,7 +35,7 @@ import java.io.File;
import java.net.URL;
import java.util.ResourceBundle;
public class NxdtController implements Initializable, ISubscriber {
public class NxdtController implements Initializable {
@FXML
private Label saveToLocationLbl, statusLbl;
@ -77,6 +79,7 @@ public class NxdtController implements Initializable, ISubscriber {
* */
private void startDumpProcess(){
if ((workThread == null || ! workThread.isAlive())){
MediatorControl.getInstance().getContoller().logArea.clear();
nxdtTask = new NxdtTask(saveToLocationLbl.getText());
workThread = new Thread(nxdtTask);
@ -94,22 +97,12 @@ public class NxdtController implements Initializable, ISubscriber {
}
}
/**
* Save application settings on exit
* */
public void updatePreferencesOnExit(){
AppPreferences.getInstance().setNXDTSaveToLocation(saveToLocationLbl.getText());
}
@Override
public void notify(EModule type, boolean isActive, Payload payload) {
public void notifyThreadStarted(boolean isActive, EModule type){
if (! type.equals(EModule.NXDT)){
injectPldBtn.setDisable(isActive);
return;
}
statusLbl.setText(payload.getMessage());
if (isActive) {
btnDumpStopImage.getStyleClass().clear();
btnDumpStopImage.getStyleClass().add("regionStop");
@ -128,4 +121,16 @@ public class NxdtController implements Initializable, ISubscriber {
injectPldBtn.getStyleClass().remove("buttonStop");
injectPldBtn.getStyleClass().add("buttonUp");
}
public void setOneLineStatus(boolean status){
if (status)
statusLbl.setText(rb.getString("done_txt"));
else
statusLbl.setText(rb.getString("failure_txt"));
}
/**
* Save application settings on exit
* */
public void updatePreferencesOnExit(){
AppPreferences.getInstance().setNXDTSaveToLocation(saveToLocationLbl.getText());
}
}

View file

@ -1,5 +1,5 @@
/*
Copyright 2018-2024 Dmitry Isaenko
Copyright 2018-2022 Dmitry Isaenko
This file is part of NS-USBloader.
@ -46,7 +46,7 @@ import nsusbloader.Utilities.patches.fs.FsPatchMaker;
import nsusbloader.Utilities.patches.loader.LoaderPatchMaker;
// TODO: CLI SUPPORT
public class PatchesController implements Initializable, ISubscriber {
public class PatchesController implements Initializable {
@FXML
private VBox patchesToolPane;
@FXML
@ -237,8 +237,9 @@ public class PatchesController implements Initializable, ISubscriber {
if (workThread != null && workThread.isAlive())
return;
statusLbl.setText("");
if (MediatorControl.INSTANCE.getTransferActive()) {
if (MediatorControl.getInstance().getTransferActive()) {
ServiceWindow.getErrorNotification(resourceBundle.getString("windowTitleError"),
resourceBundle.getString("windowBodyPleaseStopOtherProcessFirst"));
return;
@ -260,8 +261,9 @@ public class PatchesController implements Initializable, ISubscriber {
if (workThread != null && workThread.isAlive())
return;
statusLbl.setText("");
if (MediatorControl.INSTANCE.getTransferActive()) {
if (MediatorControl.getInstance().getTransferActive()) {
ServiceWindow.getErrorNotification(resourceBundle.getString("windowTitleError"),
resourceBundle.getString("windowBodyPleaseStopOtherProcessFirst"));
return;
@ -283,8 +285,9 @@ public class PatchesController implements Initializable, ISubscriber {
if (workThread != null && workThread.isAlive())
return;
statusLbl.setText("");
if (MediatorControl.INSTANCE.getTransferActive()) {
if (MediatorControl.getInstance().getTransferActive()) {
ServiceWindow.getErrorNotification(resourceBundle.getString("windowTitleError"),
resourceBundle.getString("windowBodyPleaseStopOtherProcessFirst"));
return;
@ -303,20 +306,18 @@ public class PatchesController implements Initializable, ISubscriber {
workThread.interrupt();
}
@Override
public void notify(EModule type, boolean isActive, Payload payload) {
public void notifyThreadStarted(boolean isActive, EModule type) {
if (! type.equals(EModule.PATCHES)) {
patchesToolPane.setDisable(isActive);
return;
}
statusLbl.setText(payload.getMessage());
convertRegionEs.getStyleClass().clear();
makeFsBtn.setVisible(! isActive);
makeLoaderBtn.setVisible(! isActive);
if (isActive) {
MediatorControl.getInstance().getContoller().logArea.clear();
convertRegionEs.getStyleClass().add("regionStop");
makeEsBtn.setOnAction(e-> interruptProcessOfPatchMaking());
@ -333,6 +334,13 @@ public class PatchesController implements Initializable, ISubscriber {
makeEsBtn.getStyleClass().add("buttonUp");
}
public void setOneLineStatus(boolean statusSuccess){
if (statusSuccess)
statusLbl.setText(resourceBundle.getString("done_txt"));
else
statusLbl.setText(resourceBundle.getString("failure_txt"));
}
void updatePreferencesOnExit(){
AppPreferences.getInstance().setPatchesSaveToLocation(saveToLbl.getText());
if (locationKeysLbl.getText().isEmpty())

View file

@ -1,48 +0,0 @@
/*
Copyright 2019-2024 Dmitry Isaenko
This file is part of NS-USBloader.
NS-USBloader is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
NS-USBloader is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with NS-USBloader. If not, see <https://www.gnu.org/licenses/>.
*/
package nsusbloader.Controllers;
import nsusbloader.NSLDataTypes.EFileStatus;
import java.util.Collections;
import java.util.Map;
public class Payload {
private final String message;
private final Map<String, EFileStatus> statusMap;
public Payload(){
this("");
}
public Payload(String message){
this(message, Collections.emptyMap());
}
public Payload(String message, Map<String, EFileStatus> statusMap){
this.message = message;
this.statusMap = statusMap;
}
public String getMessage() {
return message;
}
public Map<String, EFileStatus> getStatusMap() {
return statusMap;
}
}

View file

@ -1,5 +1,5 @@
/*
Copyright 2019-2024 Dmitry Isaenko
Copyright 2019-2020 Dmitry Isaenko
This file is part of NS-USBloader.
@ -41,7 +41,7 @@ import java.io.File;
import java.net.URL;
import java.util.ResourceBundle;
public class RcmController implements Initializable, ISubscriber {
public class RcmController implements Initializable {
@FXML
private ToggleGroup rcmToggleGrp;
@ -68,14 +68,12 @@ public class RcmController implements Initializable, ISubscriber {
@FXML
private Label statusLbl;
private AppPreferences preferences;
private ResourceBundle rb;
private String myRegexp;
@Override
public void initialize(URL url, ResourceBundle resourceBundle) {
this.rb = resourceBundle;
this.preferences = AppPreferences.getInstance();
final AppPreferences preferences = AppPreferences.getInstance();
rcmToggleGrp.selectToggle(pldrRadio1);
pldrRadio1.setOnAction(e -> statusLbl.setText(""));
@ -195,7 +193,8 @@ public class RcmController implements Initializable, ISubscriber {
}
private void smash(){
if (MediatorControl.INSTANCE.getTransferActive()) {
statusLbl.setText("");
if (MediatorControl.getInstance().getTransferActive()) {
ServiceWindow.getErrorNotification(rb.getString("windowTitleError"),
rb.getString("windowBodyPleaseStopOtherProcessFirst"));
return;
@ -274,28 +273,31 @@ public class RcmController implements Initializable, ISubscriber {
private void bntResetPayloader(ActionEvent event){
final Node btn = (Node)event.getSource();
statusLbl.setText("");
switch (btn.getId()){
case "resPldBtn1":
payloadFNameLbl1.setText("");
payloadFPathLbl1.setText("");
statusLbl.setText("");
break;
case "resPldBtn2":
payloadFNameLbl2.setText("");
payloadFPathLbl2.setText("");
statusLbl.setText("");
break;
case "resPldBtn3":
payloadFNameLbl3.setText("");
payloadFPathLbl3.setText("");
statusLbl.setText("");
break;
case "resPldBtn4":
payloadFNameLbl4.setText("");
payloadFPathLbl4.setText("");
statusLbl.setText("");
break;
case "resPldBtn5":
payloadFNameLbl5.setText("");
payloadFPathLbl5.setText("");
statusLbl.setText("");
}
}
@ -322,20 +324,27 @@ public class RcmController implements Initializable, ISubscriber {
}
}
@Override
public void notify(EModule type, boolean isActive, Payload payload) {
rcmToolPane.setDisable(isActive);
if (type.equals(EModule.RCM))
statusLbl.setText(payload.getMessage());
public void setOneLineStatus(boolean statusSuccess){
if (statusSuccess)
statusLbl.setText(rb.getString("done_txt"));
else
statusLbl.setText(rb.getString("failure_txt"));
}
public void notifyThreadStarted(boolean isStart, EModule type){
rcmToolPane.setDisable(isStart);
if (type.equals(EModule.RCM) && isStart){
MediatorControl.getInstance().getContoller().logArea.clear();
}
}
/**
* Save application settings on exit
* */
public void updatePreferencesOnExit(){
preferences.setRecentRcm(1, payloadFPathLbl1.getText());
preferences.setRecentRcm(2, payloadFPathLbl2.getText());
preferences.setRecentRcm(3, payloadFPathLbl3.getText());
preferences.setRecentRcm(4, payloadFPathLbl4.getText());
preferences.setRecentRcm(5, payloadFPathLbl5.getText());
AppPreferences.getInstance().setRecentRcm(1, payloadFPathLbl1.getText());
AppPreferences.getInstance().setRecentRcm(2, payloadFPathLbl2.getText());
AppPreferences.getInstance().setRecentRcm(3, payloadFPathLbl3.getText());
AppPreferences.getInstance().setRecentRcm(4, payloadFPathLbl4.getText());
AppPreferences.getInstance().setRecentRcm(5, payloadFPathLbl5.getText());
}
}

View file

@ -1,5 +1,5 @@
/*
Copyright 2019-2024 Dmitry Isaenko
Copyright 2019-2020 Dmitry Isaenko
This file is part of NS-USBloader.
@ -55,7 +55,9 @@ public class SettingsBlockGenericController implements Initializable {
direcroriesChooserForRomsCB;
@FXML
private Hyperlink newVersionHyperlink;
private ResourceBundle resourceBundle;
private HostServices hostServices;
@Override
@ -66,8 +68,8 @@ public class SettingsBlockGenericController implements Initializable {
autoCheckForUpdatesCB.setSelected(preferences.getAutoCheckUpdates());
direcroriesChooserForRomsCB.setSelected(preferences.getDirectoriesChooserForRoms());
direcroriesChooserForRomsCB.setOnAction(actionEvent ->
MediatorControl.INSTANCE.getGamesController().setFilesSelectorButtonBehaviour(direcroriesChooserForRomsCB.isSelected())
);
MediatorControl.getInstance().getGamesController().updateFilesSelectorButtonBehaviour(direcroriesChooserForRomsCB.isSelected())
);
Region btnSwitchImage = new Region();
btnSwitchImage.getStyleClass().add("regionUpdatesCheck");
@ -79,7 +81,6 @@ public class SettingsBlockGenericController implements Initializable {
languagesChB.setItems(settingsLanguagesSetup.getLanguages());
languagesChB.getSelectionModel().select(settingsLanguagesSetup.getRecentLanguage());
hostServices = MediatorControl.INSTANCE.getHostServices();
newVersionHyperlink.setOnAction(e-> hostServices.showDocument(newVersionHyperlink.getText()));
checkForUpdBtn.setOnAction(e->checkForUpdatesAction());
submitLanguageBtn.setOnAction(e->languageButtonAction());
@ -148,6 +149,8 @@ public class SettingsBlockGenericController implements Initializable {
return direcroriesChooserForRomsCB.isSelected();
}
protected void registerHostServices(HostServices hostServices){ this.hostServices = hostServices;}
void setNewVersionLink(String newVer){
newVersionHyperlink.setVisible(true);
newVersionHyperlink.setText("https://github.com/developersu/ns-usbloader/releases/tag/"+newVer);

View file

@ -1,5 +1,5 @@
/*
Copyright 2019-2024 Dmitry Isaenko
Copyright 2019-2020 Dmitry Isaenko
This file is part of NS-USBloader.
@ -31,6 +31,7 @@ import javafx.stage.FileChooser;
import nsusbloader.AppPreferences;
import nsusbloader.FilesHelper;
import nsusbloader.MediatorControl;
import nsusbloader.ModelControllers.CancellableRunnable;
import nsusbloader.NSLDataTypes.EModule;
import nsusbloader.ServiceWindow;
import nsusbloader.Utilities.splitmerge.SplitMergeTaskExecutor;
@ -40,7 +41,7 @@ import java.net.URL;
import java.util.List;
import java.util.ResourceBundle;
public class SplitMergeController implements Initializable, ISubscriber {
public class SplitMergeController implements Initializable {
@FXML
private ToggleGroup splitMergeTogGrp;
@FXML
@ -146,87 +147,13 @@ public class SplitMergeController implements Initializable, ISubscriber {
convertBtn.setOnAction(actionEvent -> setConvertBtnAction());
}
/**
* It's button listener when convert-process in progress
* */
private void stopBtnAction(){
if (smThread != null && smThread.isAlive()) {
smThread.interrupt();
}
}
/**
* It's button listener when convert-process NOT in progress
* */
private void setConvertBtnAction(){
if (MediatorControl.INSTANCE.getTransferActive()) {
ServiceWindow.getErrorNotification(
resourceBundle.getString("windowTitleError"),
resourceBundle.getString("windowBodyPleaseFinishTransfersFirst")
);
return;
}
if (splitRad.isSelected())
smTask = new SplitMergeTaskExecutor(true, BlockListViewController.getItems(), saveToPathLbl.getText());
else
smTask = new SplitMergeTaskExecutor(false, BlockListViewController.getItems(), saveToPathLbl.getText());
smThread = new Thread(smTask);
smThread.setDaemon(true);
smThread.start();
}
/**
* Drag-n-drop support (dragOver consumer)
* */
@FXML
private void handleDragOver(DragEvent event){
if (event.getDragboard().hasFiles() && ! MediatorControl.INSTANCE.getTransferActive())
event.acceptTransferModes(TransferMode.ANY);
event.consume();
}
/**
* Drag-n-drop support (drop consumer)
* */
@FXML
private void handleDrop(DragEvent event) {
List<File> files = event.getDragboard().getFiles();
File firstFile = files.get(0);
if (firstFile.isDirectory())
mergeRad.fire();
else
splitRad.fire();
this.BlockListViewController.addAll(files);
event.setDropCompleted(true);
event.consume();
}
/**
* Save application settings on exit
* */
public void updatePreferencesOnExit(){
if (splitRad.isSelected())
AppPreferences.getInstance().setSplitMergeType(0);
else
AppPreferences.getInstance().setSplitMergeType(1);
AppPreferences.getInstance().setSplitMergeRecent(saveToPathLbl.getText());
}
@Override
public void notify(EModule type, boolean isActive, Payload payload) {
// todo: refactor: remove everything, place to separate container and just disable.
public void notifyThreadStarted(boolean isStart, EModule type){ // todo: refactor: remove everything, place to separate container and just disable.
if (! type.equals(EModule.SPLIT_MERGE_TOOL)){
smToolPane.setDisable(isActive);
smToolPane.setDisable(isStart);
return;
}
statusLbl.setText(payload.getMessage());
if (isActive){
if (isStart){
MediatorControl.getInstance().getContoller().logArea.clear();
splitRad.setDisable(true);
mergeRad.setDisable(true);
selectFileFolderBtn.setDisable(true);
@ -255,4 +182,79 @@ public class SplitMergeController implements Initializable, ISubscriber {
else
convertRegion.getStyleClass().add("regionOneToSplit");
}
/**
* It's button listener when convert-process in progress
* */
private void stopBtnAction(){
if (smThread != null && smThread.isAlive()) {
smThread.interrupt();
}
}
/**
* It's button listener when convert-process NOT in progress
* */
private void setConvertBtnAction(){
statusLbl.setText("");
if (MediatorControl.getInstance().getTransferActive()) {
ServiceWindow.getErrorNotification(
resourceBundle.getString("windowTitleError"),
resourceBundle.getString("windowBodyPleaseFinishTransfersFirst")
);
return;
}
if (splitRad.isSelected())
smTask = new SplitMergeTaskExecutor(true, BlockListViewController.getItems(), saveToPathLbl.getText());
else
smTask = new SplitMergeTaskExecutor(false, BlockListViewController.getItems(), saveToPathLbl.getText());
smThread = new Thread(smTask);
smThread.setDaemon(true);
smThread.start();
}
/**
* Drag-n-drop support (dragOver consumer)
* */
@FXML
private void handleDragOver(DragEvent event){
if (event.getDragboard().hasFiles() && ! MediatorControl.getInstance().getTransferActive())
event.acceptTransferModes(TransferMode.ANY);
event.consume();
}
/**
* Drag-n-drop support (drop consumer)
* */
@FXML
private void handleDrop(DragEvent event) {
List<File> files = event.getDragboard().getFiles();
File firstFile = files.get(0);
if (firstFile.isDirectory())
mergeRad.fire();
else
splitRad.fire();
this.BlockListViewController.addAll(files);
event.setDropCompleted(true);
event.consume();
}
public void setOneLineStatus(boolean status){
if (status)
statusLbl.setText(resourceBundle.getString("done_txt"));
else
statusLbl.setText(resourceBundle.getString("failure_txt"));
}
/**
* Save application settings on exit
* */
public void updatePreferencesOnExit(){
if (splitRad.isSelected())
AppPreferences.getInstance().setSplitMergeType(0);
else
AppPreferences.getInstance().setSplitMergeType(1);
AppPreferences.getInstance().setSplitMergeRecent(saveToPathLbl.getText());
}
}

View file

@ -1,5 +1,5 @@
/*
Copyright 2019-2024 Dmitry Isaenko
Copyright 2019-2020 Dmitry Isaenko
This file is part of NS-USBloader.
@ -18,57 +18,50 @@
*/
package nsusbloader;
import javafx.application.HostServices;
import javafx.scene.control.ProgressBar;
import javafx.scene.control.TextArea;
import nsusbloader.Controllers.*;
import nsusbloader.NSLDataTypes.EModule;
import java.util.ResourceBundle;
import java.util.concurrent.atomic.AtomicBoolean;
public class MediatorControl {
public static final MediatorControl INSTANCE = new MediatorControl();
private final AtomicBoolean isTransferActive = new AtomicBoolean(false); // Overcoded just for sure
private NSLMainController mainController;
private ResourceBundle resourceBundle;
private TransfersPublisher transfersPublisher;
private HostServices hostServices;
private GamesController gamesController;
private SettingsController settingsController;
private TextArea logArea;
private ProgressBar progressBar;
private MediatorControl(){}
public void configure(ResourceBundle resourceBundle,
SettingsController settingsController,
TextArea logArea,
ProgressBar progressBar,
GamesController gamesController,
TransfersPublisher transfersPublisher) {
this.resourceBundle = resourceBundle;
this.settingsController = settingsController;
this.gamesController = gamesController;
this.logArea = logArea;
this.progressBar = progressBar;
this.transfersPublisher = transfersPublisher;
}
public void setHostServices(HostServices hostServices) {
this.hostServices = hostServices;
public static MediatorControl getInstance(){
return MediatorControlHold.INSTANCE;
}
public HostServices getHostServices() { return hostServices; }
public ResourceBundle getResourceBundle(){ return resourceBundle; }
public SettingsController getSettingsController() { return settingsController; }
public GamesController getGamesController() { return gamesController; }
public TextArea getLogArea() { return logArea; }
public ProgressBar getProgressBar() { return progressBar; }
public synchronized void setTransferActive(EModule appModuleType, boolean isActive, Payload payload) {
transfersPublisher.setTransferActive(appModuleType, isActive, payload);
private static class MediatorControlHold {
private static final MediatorControl INSTANCE = new MediatorControl();
}
public void setController(NSLMainController controller){
this.mainController = controller;
}
public synchronized boolean getTransferActive() {
return transfersPublisher.getTransferActive();
public NSLMainController getContoller(){ return mainController; }
public GamesController getGamesController(){ return mainController.getGamesCtrlr(); }
public SettingsController getSettingsController(){ return mainController.getSettingsCtrlr(); }
public SplitMergeController getSplitMergeController(){ return mainController.getSmCtrlr(); }
public RcmController getRcmController(){ return mainController.getRcmCtrlr(); }
public NxdtController getNxdtController(){ return mainController.getNXDTabController(); }
public PatchesController getPatchesController(){ return mainController.getPatchesTabController(); }
public ResourceBundle getResourceBundle(){
return mainController.getResourceBundle();
}
public synchronized void setBgThreadActive(boolean isActive, EModule appModuleType) {
isTransferActive.set(isActive);
getGamesController().notifyThreadStarted(isActive, appModuleType);
getSplitMergeController().notifyThreadStarted(isActive, appModuleType);
getRcmController().notifyThreadStarted(isActive, appModuleType);
getNxdtController().notifyThreadStarted(isActive, appModuleType);
getPatchesController().notifyThreadStarted(isActive, appModuleType);
}
public synchronized boolean getTransferActive() { return this.isTransferActive.get(); }
public void updateApplicationFont(String fontFamily, double fontSize){
mainController.logArea.getScene().getRoot().setStyle(
String.format("-fx-font-family: \"%s\"; -fx-font-size: %.0f;", fontFamily, fontSize));
}
}

View file

@ -1,5 +1,5 @@
/*
Copyright 2019-2024 Dmitry Isaenko
Copyright 2019-2020 Dmitry Isaenko
This file is part of NS-USBloader.
@ -40,13 +40,9 @@ public class LogPrinterGui implements ILogPrinter {
LogPrinterGui(EModule whoIsAsking){
this.msgQueue = new LinkedBlockingQueue<>();
this.progressQueue = new LinkedBlockingQueue<>();
this.statusMap = new HashMap<>();
this.statusMap = new HashMap<>();
this.oneLinerStatus = new AtomicBoolean();
this.msgConsumer = new MessagesConsumer(whoIsAsking,
this.msgQueue,
this.progressQueue,
this.statusMap,
this.oneLinerStatus);
this.msgConsumer = new MessagesConsumer(whoIsAsking, this.msgQueue, this.progressQueue, this.statusMap, this.oneLinerStatus);
this.msgConsumer.start();
}
/**

View file

@ -1,5 +1,5 @@
/*
Copyright 2019-2024 Dmitry Isaenko
Copyright 2019-2020 Dmitry Isaenko
This file is part of NS-USBloader.
@ -22,26 +22,24 @@ import javafx.animation.AnimationTimer;
import javafx.scene.control.ProgressBar;
import javafx.scene.control.ProgressIndicator;
import javafx.scene.control.TextArea;
import nsusbloader.Controllers.Payload;
import nsusbloader.Controllers.NSTableViewController;
import nsusbloader.MediatorControl;
import nsusbloader.NSLDataTypes.EFileStatus;
import nsusbloader.NSLDataTypes.EModule;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.ResourceBundle;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.atomic.AtomicBoolean;
public class MessagesConsumer extends AnimationTimer {
private static final MediatorControl mediator = MediatorControl.INSTANCE;
private static final TextArea logsArea = mediator.getLogArea();
private static final ProgressBar progressBar = mediator.getProgressBar();;
private static final ResourceBundle resourceBundle = mediator.getResourceBundle();
private final BlockingQueue<String> msgQueue;
private final TextArea logsArea;
private final BlockingQueue<Double> progressQueue;
private final ProgressBar progressBar;
private final HashMap<String, EFileStatus> statusMap;
private final NSTableViewController tableViewController;
private final EModule appModuleType;
private final AtomicBoolean oneLinerStatus;
@ -55,16 +53,22 @@ public class MessagesConsumer extends AnimationTimer {
AtomicBoolean oneLinerStatus){
this.appModuleType = appModuleType;
this.isInterrupted = false;
this.msgQueue = msgQueue;
this.logsArea = MediatorControl.getInstance().getContoller().logArea;
this.progressQueue = progressQueue;
this.progressBar = MediatorControl.getInstance().getContoller().progressBar;
this.statusMap = statusMap;
this.tableViewController = MediatorControl.getInstance().getGamesController().tableFilesListController;
this.oneLinerStatus = oneLinerStatus;
progressBar.setProgress(0.0);
progressBar.setProgress(ProgressIndicator.INDETERMINATE_PROGRESS);
logsArea.clear();
mediator.setTransferActive(appModuleType, true, new Payload());
progressBar.setProgress(ProgressIndicator.INDETERMINATE_PROGRESS);
MediatorControl.getInstance().setBgThreadActive(true, appModuleType);
}
@Override
@ -85,18 +89,32 @@ public class MessagesConsumer extends AnimationTimer {
});
}
if (isInterrupted) // safe, could not be interrupted while HashMap populating
if (isInterrupted) // It's safe 'cuz it's could't be interrupted while HashMap populating
updateElementsAndStop();
}
private void updateElementsAndStop(){
Payload payload = new Payload(
resourceBundle.getString(oneLinerStatus.get() ? "done_txt" : "failure_txt"),
statusMap);
mediator.setTransferActive(appModuleType, false, payload);
MediatorControl.getInstance().setBgThreadActive(false, appModuleType);
progressBar.setProgress(0.0);
if (statusMap.size() > 0){
for (String key : statusMap.keySet())
tableViewController.setFileStatus(key, statusMap.get(key));
}
switch (appModuleType){
case RCM:
MediatorControl.getInstance().getRcmController().setOneLineStatus(oneLinerStatus.get());
break;
case NXDT:
MediatorControl.getInstance().getNxdtController().setOneLineStatus(oneLinerStatus.get());
break;
case SPLIT_MERGE_TOOL:
MediatorControl.getInstance().getSplitMergeController().setOneLineStatus(oneLinerStatus.get());
break;
case PATCHES:
MediatorControl.getInstance().getPatchesController().setOneLineStatus(oneLinerStatus.get());
}
this.stop();
}

View file

@ -1,5 +1,5 @@
/*
Copyright 2019-2024 Dmitry Isaenko
Copyright 2019-2020 Dmitry Isaenko
This file is part of NS-USBloader.
@ -68,15 +68,14 @@ public class NSLMain extends Application {
primaryStage.show();
primaryStage.setOnCloseRequest(e->{
if (MediatorControl.INSTANCE.getTransferActive())
if (MediatorControl.getInstance().getTransferActive())
if(! ServiceWindow.getConfirmationWindow(rb.getString("windowTitleConfirmExit"),
rb.getString("windowBodyConfirmExit")))
e.consume();
});
NSLMainController controller = loader.getController();
MediatorControl.INSTANCE.setHostServices(getHostServices());
controller.setHostServices(getHostServices());
primaryStage.setOnHidden(e-> {
AppPreferences.getInstance().setSceneHeight(mainScene.getHeight());
AppPreferences.getInstance().setSceneWidth(mainScene.getWidth());

View file

@ -1,47 +0,0 @@
/*
Copyright 2019-2024 Dmitry Isaenko
This file is part of NS-USBloader.
NS-USBloader is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
NS-USBloader is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with NS-USBloader. If not, see <https://www.gnu.org/licenses/>.
*/
package nsusbloader;
import nsusbloader.Controllers.ISubscriber;
import nsusbloader.Controllers.Payload;
import nsusbloader.NSLDataTypes.EModule;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
public class TransfersPublisher {
private final AtomicBoolean isTransferActive = new AtomicBoolean(false);
private final List<ISubscriber> subscribers = new ArrayList<>();
public TransfersPublisher(ISubscriber... subscriber){
subscribers.addAll(Arrays.asList(subscriber));
}
public void setTransferActive(EModule appModuleType, boolean isActive, Payload payload) {
isTransferActive.set(isActive);
subscribers.forEach(s->s.notify(appModuleType, isActive, payload));
}
public boolean getTransferActive() {
return isTransferActive.get();
}
}

View file

@ -1,5 +1,5 @@
/*
Copyright 2019-2024 Dmitry Isaenko
Copyright 2019-2022 Dmitry Isaenko
This file is part of NS-USBloader.
@ -933,7 +933,7 @@ class GoldLeaf_010 extends TransferModule {
private boolean selectFile(){
File selectedFile = CompletableFuture.supplyAsync(() -> {
FileChooser fChooser = new FileChooser();
fChooser.setTitle(MediatorControl.INSTANCE.getResourceBundle().getString("btn_OpenFile")); // TODO: FIX BAD IMPLEMENTATION
fChooser.setTitle(MediatorControl.getInstance().getResourceBundle().getString("btn_OpenFile")); // TODO: FIX BAD IMPLEMENTATION
fChooser.setInitialDirectory(new File(System.getProperty("user.home")));// TODO: Consider fixing; not a priority.
fChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("*", "*"));
return fChooser.showOpenDialog(null); // Leave as is for now.

View file

@ -1,5 +1,5 @@
/*
Copyright 2019-2024 Dmitry Isaenko
Copyright 2019-2020 Dmitry Isaenko
This file is part of NS-USBloader.
@ -918,7 +918,7 @@ class GoldLeaf_07 extends TransferModule {
private boolean selectFile(){
File selectedFile = CompletableFuture.supplyAsync(() -> {
FileChooser fChooser = new FileChooser();
fChooser.setTitle(MediatorControl.INSTANCE.getResourceBundle().getString("btn_OpenFile")); // TODO: FIX BAD IMPLEMENTATION
fChooser.setTitle(MediatorControl.getInstance().getResourceBundle().getString("btn_OpenFile")); // TODO: FIX BAD IMPLEMENTATION
fChooser.setInitialDirectory(new File(System.getProperty("user.home"))); // TODO: Consider fixing; not a prio.
fChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("*", "*"));
return fChooser.showOpenDialog(null); // Leave as is for now.

View file

@ -1,5 +1,5 @@
/*
Copyright 2019-2024 Dmitry Isaenko
Copyright 2019-2020 Dmitry Isaenko
This file is part of NS-USBloader.
@ -941,7 +941,7 @@ class GoldLeaf_08 extends TransferModule {
private boolean selectFile(){
File selectedFile = CompletableFuture.supplyAsync(() -> {
FileChooser fChooser = new FileChooser();
fChooser.setTitle(MediatorControl.INSTANCE.getResourceBundle().getString("btn_OpenFile")); // TODO: FIX BAD IMPLEMENTATION
fChooser.setTitle(MediatorControl.getInstance().getResourceBundle().getString("btn_OpenFile")); // TODO: FIX BAD IMPLEMENTATION
fChooser.setInitialDirectory(new File(System.getProperty("user.home")));// TODO: Consider fixing; not a prio.
fChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("*", "*"));
return fChooser.showOpenDialog(null); // Leave as is for now.

View file

@ -169,7 +169,7 @@ public class UsbConnect {
"Double check that you have administrator privileges (you're 'root') or check 'udev' rules set for this user (linux only)!\n\n" +
"Steps to set 'udev' rules:\n" +
"root # vim /etc/udev/rules.d/99-NS" + ((RCM_VID == VENDOR_ID) ? "RCM" : "") + ".rules\n" +
"SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", MODE=\"0666\"\n" +
"SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", GROUP=\"plugdev\"\n" +
"root # udevadm control --reload-rules && udevadm trigger\n", UsbErrorCodes.getErrCode(returningValue), VENDOR_ID, PRODUCT_ID));
}
else

View file

@ -15,8 +15,8 @@
<Label text="%tab2_Lbl_ApplicationSettings" />
<HBox alignment="CENTER_LEFT" spacing="5.0">
<children>
<Label minWidth="35.0" text="%tab2_Lbl_Language" />
<ChoiceBox fx:id="languagesChB" prefWidth="240.0" />
<Label text="%tab2_Lbl_Language" />
<ChoiceBox fx:id="languagesChB" prefWidth="180.0" />
<Button fx:id="submitLanguageBtn" mnemonicParsing="false" text="OK" />
<VBox alignment="CENTER_RIGHT" HBox.hgrow="ALWAYS">
<children>

View file

@ -91,7 +91,3 @@ tabPatches_Btn_MakeAtmo=\uB85C\uB354 \uB9CC\uB4E4\uAE30 (Atmosphere)
tabPatches_Btn_MakeAll=\uBAA8\uB450 \uB9CC\uB4E4\uAE30
tabPatches_ServiceWindowMessageEsFs=\uD38C\uC6E8\uC5B4\uC640 \uD0A4 \uBAA8\uB450 \uD328\uCE58\uB97C \uC0DD\uC131\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4. \uADF8\uB807\uC9C0 \uC54A\uC73C\uBA74 \uBB34\uC5C7\uC744 \uD328\uCE58\uD560\uC9C0 \uBA85\uD655\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.
tabPatches_ServiceWindowMessageLoader='\uB85C\uB354' \uD328\uCE58\uB97C \uC0DD\uC131\uD558\uB824\uBA74 Atmosphere \uD3F4\uB354\uB97C \uC815\uC758\uD574\uC57C \uD569\uB2C8\uB2E4.
tab2_Btn_ApplicationFont=\uC751\uC6A9 \uD504\uB85C\uADF8\uB7A8 \uAE00\uAF34 \uBCC0\uACBD
btn_ResetToDefaults=\uC7AC\uC124\uC815
fontPreviewText=\uD14D\uC2A4\uD2B8 \uBBF8\uB9AC\uBCF4\uAE30
fontSize=\uAE00\uAF34 \uC0AC\uC774\uC988:

View file

@ -1,97 +0,0 @@
btn_OpenFile=Izaberite datoteke
btn_OpenFolders=Izaberite fasciklu
btn_Upload=Otpremi na NS
btn_OpenFolders_tooltip=Izaberite fasciklu koju \u017Eelite da se skenira.\nIzabrana fascikla i sve podfascikle \u0107e biti skenirane.\nSve odgovaraju\u0107e datoteke \u0107e biti dodane na listu.
tab3_Txt_EnteredAsMsg1=Upisani ste kao:
tab3_Txt_EnteredAsMsg2=Potrebno je imati root privilegije ili podesiti "udev" pravila za ovog korisnika kako bi se izbegli bilo kakvi problemi.
tab3_Txt_FilesToUploadTitle=Datoteke za otpremanje:
tab3_Txt_GreetingsMessage=Dobrodo\u0161li u NS-USBloader
tab3_Txt_NoFolderOrFileSelected=Nije izabrana nijedna datoteka: Nema ni\u0161ta za otpremanje.
windowBodyConfirmExit=Prenos podataka je u toku i zatvaranje ove aplikacije \u0107e je prekinuti.\nTo je najgore \u0161to mo\u017Eete u\u010Diniti u ovom trenutku.\Da li \u017Eelite da prekinete proces i iza\u0111ete?
windowTitleConfirmExit=Ne, nemoj to uraditi!
btn_Stop=Prekini
tab3_Txt_GreetingsMessage2=--\n\
Source: https://git.redrise.ru/desu/ns-usbloader\n\
Mirror: https://github.com/developersu/ns-usbloader/\n\
Site: https://redrise.ru\n\
Dmitry Isaenko [developer.su]
tab1_table_Lbl_Status=Status
tab1_table_Lbl_FileName=Naziv datoteke
tab1_table_Lbl_Size=Veli\u010Dina
tab1_table_Lbl_Upload=Otpremi?
tab1_table_contextMenu_Btn_BtnDelete=Ukloni
tab1_table_contextMenu_Btn_DeleteAll=Ukloni sve
tab2_Lbl_HostIP=Host IP
tab1_Lbl_NSIP=NS IP:
tab2_Cb_ValidateNSHostName=Uvijek proverite uneseni NS IP.
windowBodyBadIp=Da li ste sigurni da ste ispravno uneli NS IP adresu?
windowTitleBadIp=NS IP adresa je verovatno neta\u010Dna.
tab2_Cb_ExpertMode=Napredni re\u017Eim (NET pode\u0161avanje)
tab2_Lbl_HostPort=port
tab2_Cb_AutoDetectIp=Automatski prona\u0111i IP
tab2_Cb_RandSelectPort=Nasumi\u010Dno dodeli port
tab2_Cb_DontServeRequests=Ne uslu\u017Euj zahteve
tab2_Lbl_DontServeRequestsDesc=Ako je opcija izabrana, ovaj ra\u010Dunar nec\u0301e odgovarati na zahteve NSP datoteka koje dolaze od NS-a (preko mre\u017Ee) i koristiti definisana pode\u0161avanja host-a da ka\u017Ee Awoo Installer-u (ili kompatibilnim aplikacijama) gde treba da tra\u017Ei datoteke.
tab2_Lbl_HostExtra=dodatno
windowTitleErrorPort=Port je pogre\u0161no pode\u0161en!
windowBodyErrorPort=Port ne mo\u017Ee biti 0 ili vec\u0301i od 65535.
tab2_Cb_AutoCheckForUpdates=Automatski proveri a\u017Euriranja
windowTitleNewVersionAval=Nova verzija dostupna
windowTitleNewVersionNOTAval=Nema dostupnih novih verzija
windowTitleNewVersionUnknown=Nije moguc\u0301e proveriti da li postoje nove verzije
windowBodyNewVersionUnknown=Ne\u0161to nije u redu\nMo\u017Eda Internet konekcija nije dostupna ili GitHub ne radi
windowBodyNewVersionNOTAval=Koristite najnoviju verziju
tab2_Cb_AllowXciNszXcz=Dozvolite izbor XCI / NSZ / XCZ datoteka za Awoo
tab2_Lbl_AllowXciNszXczDesc=Kori\u0161teno od strane aplikacija koje podr\u017Eavaju XCI/NSZ/XCZ i koriste Awoo (poznatiji kao Adubbz/TinFoil) protokol za prenos. Ne menjajte ako niste sigurni. Omoguc\u0301i za Awoo Installer.
tab2_Lbl_Language=Jezik
windowBodyRestartToApplyLang=Ponovo pokrenite aplikaciju da biste primenili promene.
btn_OpenSplitFile=Izaberite razdvojene
tab2_Lbl_ApplicationSettings=Glavna pode\u0161avanja
tabSplMrg_Lbl_SplitNMergeTitle=Alat za razdvajanje i spajanje datoteka
tabSplMrg_RadioBtn_Split=Razdvoji
tabSplMrg_RadioBtn_Merge=Spoji
tabSplMrg_Txt_File=Datoteka:
tabSplMrg_Txt_Folder=Razdvoji datoteku (fasciklu):
tabSplMrg_Btn_SelectFile=Izaberite datoteku
tabSplMrg_Btn_SelectFolder=Izaberite fasciklu
tabSplMrg_Lbl_SaveToLocation=Sa\u010Duvaj na:
tabSplMrg_Btn_ChangeSaveToLocation=Promeni
tabSplMrg_Btn_Convert=Pretvori
windowTitleError=Gre\u0161ka
windowBodyPleaseFinishTransfersFirst=Nije moguc\u0301e razdvojiti/spojiti datoteke kada je aktivan USB/mre\u017Eni proces aplikacije. Najpre prekinite aktivne transfere.
done_txt=Gotovo!
failure_txt=Nije uspelo
btn_Select=Izaberi
btn_InjectPayloader=Po\u0161alji payloadbtn_OpenSplitFile
tabNXDT_Btn_Start=Po\u010Dni!
tab2_Btn_InstallDrivers=Preuzmi i instaliraj drajvere
windowTitleDownloadDrivers=Preuzmi i instaliraj drajvere
windowBodyDownloadDrivers=Preuzimanje drajvera (libusbK v3.0.7.0)...
btn_Cancel=Otka\u017Ei
btn_Close=Zatvori
tab2_Cb_GlVersion=GoldLeaf verzija
tab2_Cb_GLshowNspOnly=Prika\u017Ei samo *.nsp u GoldLeaf-u.
windowBodyPleaseStopOtherProcessFirst=Zaustavite druge aktivne procese pre nego \u0161to nastavite.
tab2_Cb_foldersSelectorForRoms=Izaberite fasciklu sa ROM datotekama umesto da birate ROM datoteke pojedina\u010Dno.
tab2_Cb_foldersSelectorForRomsDesc=Menja pona\u0161anje dugmeta "Izaberi datoteke" na kartici "Igre": umesto da birate ROM datoteke jednu po jednu, mo\u017Eete izabrati fasciklu da biste dodali sve podr\u017Eane datoteke odjednom.
windowTitleAddingFiles=Tra\u017Eenje datoteka...
windowBodyFilesScanned=Skenirano datoteka: %d\nBi\u0107e dodano: %d
tab2_Lbl_AwooBlockTitle=Awoo Installer i kompatibilni
tabRcm_Lbl_Payload=Payload:
tabRcm_Lbl_FuseeGelee=Fus\u00E9e Gel\u00E9e RCM
tabPatches_Lbl_Firmware=Firmware:
tabPatches_Lbl_Atmo=Atmosphere:
tabPatches_Btn_fromFolder=Iz fascikle
tabPatches_Btn_asZipFile=kao ZIP datoteka
tabPatches_Lbl_Title=Zakrpe
tabPatches_Lbl_Keys=Klju\u010Devi:
tabPatches_Btn_MakeEs=Napravi ES
tabPatches_Btn_MakeFs=Napravi FS
tabPatches_Btn_MakeAtmo=Napravi Loader (Atmosphere)
tabPatches_Btn_MakeAll=Napravi sve
tabPatches_ServiceWindowMessageEsFs=I firmware i klju\u010Devi treba da budu pode\u0161eni da bi se generisale zakrpe. U suprotnom, nije jasno \u0161ta treba zakrpiti.
tabPatches_ServiceWindowMessageLoader=Fascikla Atmosphere treba da bude definisana da bi se generisala "Loader" zakrpa.
tab2_Btn_ApplicationFont=Promenite font aplikacije
btn_ResetToDefaults=Resetuj
fontPreviewText=Pregled teksta
fontSize=Veli\u010Dina fonta:

View file

@ -1,97 +0,0 @@
btn_OpenFile=Dosya secimi
btn_OpenFolders=Klasor secimi
btn_Upload=NS'e yukle
btn_OpenFolders_tooltip=Taranmasi icin bir klasor secin.\nBu klasor ve butun alt klasorleri taranacaktir.\nButun uyusan dosyalar listeye eklenecektir.
tab3_Txt_EnteredAsMsg1=Olarak giris yaptiniz:
tab3_Txt_EnteredAsMsg2=Bir cok hatadan kacinmak icin root olmaniz ya da bu kullanici icin 'udev' kurallarini ayarlamaniz gerekmektedir.
tab3_Txt_FilesToUploadTitle=Yuklenecek dosyalar:
tab3_Txt_GreetingsMessage= NS-USBloader'a Hos Geldiniz
tab3_Txt_NoFolderOrFileSelected=Hicbir dosya secilmedi: hicbir sey yuklenmedi.
windowBodyConfirmExit=Data transferi devam ediyor ve uygulamayi kapatmak bunu yarida kesecek.\nBu su an yapabileceginiz en kotu sey.\nIslemi yardida kes ve cik ?
windowTitleConfirmExit=Hayir,Bunu yapma!
btn_Stop=Hata
tab3_Txt_GreetingsMessage2=--\n\
Source: https://git.redrise.ru/desu/ns-usbloader\n\
Mirror: https://github.com/developersu/ns-usbloader/\n\
Site: https://redrise.ru\n\
Dmitry Isaenko [developer.su]
tab1_table_Lbl_Status=Durum
tab1_table_Lbl_FileName=Dosya Ismi
tab1_table_Lbl_Size=Boyut
tab1_table_Lbl_Upload=Yukle?
tab1_table_contextMenu_Btn_BtnDelete=Kaldir
tab1_table_contextMenu_Btn_DeleteAll=Hepsini kaldir
tab2_Lbl_HostIP=Host IP
tab1_Lbl_NSIP=NS IP:
tab2_Cb_ValidateNSHostName= NS IP girislerinizi her zaman dogrulayin.
windowBodyBadIp=Girilen NS IP adresinin dogru olduguna emin misiniz?
windowTitleBadIp=NS'in IP adressi buyuk ihtimalle yanlis
tab2_Cb_ExpertMode=Uzman modu (NET setup)
tab2_Lbl_HostPort=Port
tab2_Cb_AutoDetectIp=Oto-Tespit IP
tab2_Cb_RandSelectPort=Portu rastgele al
tab2_Cb_DontServeRequests=Istekleri yerine getirme
tab2_Lbl_DontServeRequestsDesc=Eger secili ise, bu bilgisayar NS'den (ag uzerinden) gelen NSP dosyalarinin isteklerine yanit vermez ve Awoo Installer'a (veya uyumlu uygulamalara) dosyalari nerede aramasi gerektigini soylemek icin tanimlanmis ana bilgisayar ayarlarini kullanir.
tab2_Lbl_HostExtra=Ekstra
windowTitleErrorPort=Port seti hatali!
windowBodyErrorPort=Port 0 olamaz ve 65535'den buyuk olamaz.
tab2_Cb_AutoCheckForUpdates=Guncellemeleri otomatik kontrol et
windowTitleNewVersionAval=Yeni versiyon mevcut
windowTitleNewVersionNOTAval=Yeni versiyon mevcut degil
windowTitleNewVersionUnknown=Yeni versiyon kontrolu yapilamiyor
windowBodyNewVersionUnknown=Bir sey ters gitti\nBelki internet yoktur ya da GitHub cokmustur
windowBodyNewVersionNOTAval=En son versiyonu kullaniyorsunuz
tab2_Cb_AllowXciNszXcz=XCI / NSZ / XCZ dosyalaninin Awoo icin seciminine izin ver.
tab2_Lbl_AllowXciNszXczDesc=XCI/NSZ/XCZ'yi destekleyen uygulamalar tarafindan kullanilir ve Awoo (Adubbz/TinFoil olarak da bilinir) transfer protokolunu uygular. Emin degilseniz degistirmeyin. Installer icin AWOO'yu etkinlestirin.
tab2_Lbl_Language=Dil
windowBodyRestartToApplyLang=Lutfen degisikliklerin uygulanabilmesi icin uygulamayi yendiden baslatin.
btn_OpenSplitFile=Bolme sec
tab2_Lbl_ApplicationSettings=Ana ayarlar
tabSplMrg_Lbl_SplitNMergeTitle=Dosyalari bolme & birlestirme araci
tabSplMrg_RadioBtn_Split=Ayir
tabSplMrg_RadioBtn_Merge=Birlestir
tabSplMrg_Txt_File=Dosya:
tabSplMrg_Txt_Folder=Dosyayi ayir (klasor):
tabSplMrg_Btn_SelectFile=Dosya sec
tabSplMrg_Btn_SelectFolder=Klasor Sec
tabSplMrg_Lbl_SaveToLocation=Buraya kaydet:
tabSplMrg_Btn_ChangeSaveToLocation=Degistir
tabSplMrg_Btn_Convert=Cevir
windowTitleError=Hata
windowBodyPleaseFinishTransfersFirst=Bolme/Birlestirme islemleri USB/Network transfer sureci aktifken yapilamaz. Lutfen once aktif transfer isleminizi bitiriniz.
done_txt=Hazir!
failure_txt=Basarisiz
btn_Select=Secim yap
btn_InjectPayloader=payload yukle (enject)
tabNXDT_Btn_Start=Basla!
tab2_Btn_InstallDrivers=Suruculeri indir ve yukle
windowTitleDownloadDrivers=Suruculeri indir ve yukle
windowBodyDownloadDrivers=Suruculer indiriliyor (libusbK v3.0.7.0)...
btn_Cancel=Iptal
btn_Close=Kapat
tab2_Cb_GlVersion=GoldLeaf versiyonu
tab2_Cb_GLshowNspOnly=Goldleaf'ta sadece *.nsp goster.
windowBodyPleaseStopOtherProcessFirst=Lutfen devam etmeden once butun diger aktif islemleri durdurun.
tab2_Cb_foldersSelectorForRoms=Direkt ROM dosyalini secmek yerine ROM klasorunu sec
tab2_Cb_foldersSelectorForRomsDesc=Oyunlar' sekmesinde 'Dosyalari Sec' dugmesi davranisini degistirir: Tek tek ROM dosyalarini secmek yerine, desteklenen her dosyayi bir klasor secerek ekleyebilirsiniz.
windowTitleAddingFiles=Dosyalar araniyor...
windowBodyFilesScanned=Dosyalar tarandi: %d\nEklenecek: %d
tab2_Lbl_AwooBlockTitle=Awoo Yukleyicisi ve Uyumu
tabRcm_Lbl_Payload=Payload:
tabRcm_Lbl_FuseeGelee=Fus\u00E9e Gel\u00E9e RCM
tabPatches_Lbl_Firmware=Firmware:
tabPatches_Lbl_Atmo=Atmosphere:
tabPatches_Btn_fromFolder=Klasorden
tabPatches_Btn_asZipFile=ZIP dosyasi olarak
tabPatches_Lbl_Title=Yamalar
tabPatches_Lbl_Keys=Anahtarlar:
tabPatches_Btn_MakeEs=ES yap
tabPatches_Btn_MakeFs=FS yap
tabPatches_Btn_MakeAtmo=Loader yap (Atmosphere)
tabPatches_Btn_MakeAll=Hepsini yap
tabPatches_ServiceWindowMessageEsFs=Firmware ve anahtarlar, yamalari olusturmak icin ayarlanmalidir. Aksi takdirde, neyi duzeltecegi belirsiz olacaktir.
tabPatches_ServiceWindowMessageLoader='Loader' yamasi olusturmak icin Atmosphere klasoru tanimlanmalidir.
tab2_Btn_ApplicationFont=Uygulama yazi tipini degistir
btn_ResetToDefaults=Reset
fontPreviewText=Yazi Onizlemesi
fontSize=Yazi boyutu:

View file

@ -79,20 +79,4 @@ windowBodyFilesScanned=\u626B\u63CF\u6587\u4EF6: %25d\n\u88AB\u6DFB\u52A0: %25d
tab2_Lbl_AwooBlockTitle=awoo installer \u5B8C\u6210
tabRcm_Lbl_Payload=Payload:
tabRcm_Lbl_FuseeGelee=Fus\u00E9e Gel\u00E9e RCM
tabPatches_Lbl_Firmware=Firmware:
tabPatches_Lbl_Atmo=Atmosphere:
tabPatches_Btn_fromFolder=From folder
tabPatches_Btn_asZipFile=as ZIP file
tabPatches_Lbl_Title=Patches
tabPatches_Lbl_Keys=Keys:
tabPatches_Btn_MakeEs=Make ES
tabPatches_Btn_MakeFs=Make FS
tabPatches_Btn_MakeAtmo=Make Loader (Atmosphere)
tabPatches_Btn_MakeAll=Make all
tabPatches_ServiceWindowMessageEsFs=Both firmware and keys should be set to generate patches. Otherwise, it's not clear what to patch.
tabPatches_ServiceWindowMessageLoader=Atmosphere folder should be defined to generate 'Loader' patch.
tab2_Btn_ApplicationFont=\u4fee\u6539\u7a0b\u5e8f\u5b57\u4f53
btn_ResetToDefaults=\u91cd\u7f6e
fontPreviewText=\u6587\u5b57\u9884\u89c8
fontSize=\u5b57\u53f7:

View file

@ -22,7 +22,7 @@ public class EsIntegrationTest {
pathToKeysFile = environment.getProdkeysLocation();
saveTo = environment.getSaveToLocation() + File.separator + "ES_LPR";
pathToFirmwares = environment.getFirmwaresLocation();
pathToFirmware = environment.getFirmwaresLocation() + File.separator + "Firmware 17.0.0";
pathToFirmware = pathToFirmware + File.separator + "Firmware 14.1.0";
}
@DisplayName("ES Integration validation - everything")

View file

@ -25,7 +25,7 @@ public class FsIntegrationTest {
pathToKeysFile = environment.getProdkeysLocation();
saveTo = environment.getSaveToLocation() + File.separator + "FS_LPR";
pathToFirmwares = environment.getFirmwaresLocation();
pathToFirmware = environment.getFirmwaresLocation() + File.separator + "Firmware 17.0.0";
pathToFirmware = pathToFirmware + File.separator + "Firmware 13.0.0";
}
@DisplayName("FS Integration validation - everything")