Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

lysis-java implementation to SPCode #72

Closed
wants to merge 21 commits into from
Closed

Conversation

maxijabase
Copy link
Member

@maxijabase maxijabase commented Feb 11, 2021

  • Lysis by dvander has been removed from the project
  • Upon clicking the decompile button, the program will perform a quick check of the Java installation
  • If it fails to detect Java in the PATH environment variable, it will prompt to download and install Java 15 SDK from https://adoptopenjdk.net/
  • The program downloads the x86 or x64 installer depending on the OS architecture of the user
  • lysis-java by Peace-Maker needs to be run against Java 11 SDK or greater - if SPCode finds that the installed java version is older than that, it will prompt the corresponding message
  • If all the Java checks were successful, the program will ask for the .smx file, decompile it, and open it in a new editor
  • Closes Replace Lysis with web-based version. #66

TO-DO:

  • Probably adapt the program to download the installation file internally and elegantly with a progress bar, and a button to open it afterwards
  • Add translations lines to all newly added messages
  • Update credits with Peace-Maker's name regarding lysis-java's utilization and https://adoptopenjdk.net/ for the usage of their API to provide the latest JDK binaries
  • Improve Java detection by exploring other methods that provide a more accurate status - look for ways of checking the java -version command as well.

@maxijabase maxijabase marked this pull request as draft February 11, 2021 05:14
@maxijabase maxijabase self-assigned this Feb 11, 2021
@maxijabase
Copy link
Member Author

These are the new lines required in the translation file (lang_0_spcode.xml)

language.Add("JavaInstallCheck", "Checking for Java installation");
language.Add("JavaNotFoundTitle", "Java was not found");
language.Add("JavaNotFoundMessage", 
                "SPCode needs Java to decompile plugins, but it couldn't get it to work properly - " +
                "perhaps an absent or incorrect Java installation. " +
                "Do you wish to download and install it now?");
language.Add("JavaOutdatedTitle", "Java version found is outdated");
language.Add("JavaOutdatedMessage", 
                "SPCode requires Java 11 SDK or later to decompile plugins. " +
                "We found an outdated version in your system. " +
                "Do you wish to download and upgrade it now?");
language.Add("FailedToDecompile", "failed to decompile");
language.Add("DownloadingJava", "Downloading Java");
language.Add("FetchingJava", "Fetching installation file from https://adoptopenjdk.net...");
language.Add("AmountCompleted", "completed");
language.Add("AmountDownloaded", "downloaded");
language.Add("JavaOpened", "Java installation file opened");
language.Add("JavaSuggestRestart", "After installing Java, it is highly recommended to restart SPCode.");
language.Add("JavaDownErrorTitle", "Java download error");
language.Add("JavaDownErrorMessage", "SPCode could not download Java by itself. Would you like to download it manually?");
language.Add("JavaOpenedBrowser", "Java download link opened in browser");

Following language.Add(param1, param2), param1 is the XML tag that represents uniquely that translation line, and param2 is the actual translation. Translating the first line to Spanish, for example, would be going to lang_0_spcode.xml, looking for the <es> tag, and inside there, adding the following:

<javainstallcheck>Verificando la instalación de Java</javainstallcheck>

Following this pattern, feel free to open Pull Requests to contribute with your translations!

@maxijabase
Copy link
Member Author

I just need lysis-java's license added in the About Window and this is ready for merging

@maxijabase maxijabase marked this pull request as ready for review February 14, 2021 01:27
Deploy/Compress.ps1 Show resolved Hide resolved
Deploy/SPCode.nsi Show resolved Hide resolved
@maxijabase
Copy link
Member Author

Merged to development

@maxijabase maxijabase closed this Feb 18, 2021
@maxijabase maxijabase deleted the #66_Lysis_Java branch February 25, 2021 01:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace Lysis with web-based version.
2 participants