-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release of version 1.4-stable: added '-compactInstall' as a main feat…
…ure, allowing users to install a compact and precompiled version of all required tools
- Loading branch information
1 parent
d230c5b
commit 7a4b029
Showing
6 changed files
with
79 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
package apc; | ||
|
||
import command.Assembler; | ||
import command.CompactInstaller; | ||
import command.Installer; | ||
import command.Decompiler; | ||
import command.Updater; | ||
|
@@ -64,6 +65,17 @@ public void execute(ArgumentPackage arguments) { | |
//Usage is shown after the installation has successfully been completed | ||
showUsage(); | ||
break; | ||
case COMPACT_INSTALL: | ||
/** | ||
* Clones all tools into the library folder from a Github | ||
* repository that is occasionally updated. All tools on | ||
* that repository are precompiled, meaning one only has to | ||
* download the files, resulting in a compacter installation | ||
* in both disk space and time. | ||
*/ | ||
CompactInstaller compactInstaller = new CompactInstaller(); | ||
compactInstaller.install(); | ||
break; | ||
case UPDATE: | ||
/** | ||
* Updating the library is done by pulling the repository | ||
|
@@ -126,6 +138,9 @@ public void showUsage() { | |
for (DecompilerType decompilerType : DecompilerType.values()) { | ||
usage.append("\t\t\t" + decompilerType + "\n"); | ||
} | ||
usage.append("\t-compactInstall\n"); | ||
usage.append("\t\tDownloads precompiled instances of the tools that are listed at \"-install\" from a repository that is mainted by me.\n"); | ||
usage.append("\t\tThis is faster than installing it yourself, but the the \"-update\" will not work. Tools will also be a bit older.\n"); | ||
usage.append("\t-update\n"); | ||
usage.append("\t\tUpdating the library folder is equal to reinstalling the library using the -install function.\n"); | ||
usage.append("\t-decompile\n"); | ||
|
@@ -158,7 +173,7 @@ private void showError(Exception ex) { | |
* Display the version information | ||
*/ | ||
public void showVersion() { | ||
String versionNumber = "1.3.1-stable"; | ||
String versionNumber = "1.4-stable"; | ||
StringBuilder version = new StringBuilder(); | ||
version.append("[+]AndroidProjectCreator " + versionNumber + " [developed by Max 'Libra' Kersten <[email protected]> or @LibraAnalysis on Twitter]\n"); | ||
System.out.println(version.toString()); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* Copyright (C) 2020 Max 'Libra' Kersten | ||
* | ||
* This program 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. | ||
* | ||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package command; | ||
|
||
import apc.RepositoryManager; | ||
import java.io.File; | ||
import java.io.IOException; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
import library.Constants; | ||
import model.Repository; | ||
|
||
/** | ||
* Handles the compact installation of all required tools for | ||
* AndroidProjectCreator. | ||
* | ||
* @author Max 'Libra' Kersten | ||
*/ | ||
public class CompactInstaller { | ||
|
||
/** | ||
* Performs the compact installation of the required tools by cloning a | ||
* repository directly into the library folder | ||
*/ | ||
public void install() throws IOException, InterruptedException, Exception { | ||
System.out.println("[+]Starting the installation"); | ||
RepositoryManager repositoryManager = new RepositoryManager(); | ||
System.out.println("[+]Starting cloning the repositories"); | ||
List<Repository> repository = new ArrayList<>(); | ||
String name = "CompactInstall version 1.0 (dated 28-07-2020)"; | ||
String url = "https://github.com/thisislibra/apc-compact.git"; | ||
File directory = new File(Constants.LIBRARY_FOLDER); | ||
String branch = "28-07-2020"; | ||
repository.add(new Repository(name, url, directory, branch)); | ||
repositoryManager.cloneRepositories(repository); | ||
System.out.println("[+]Cloning finished"); | ||
System.out.println("[+]Verifying the toolset"); | ||
repositoryManager.verifyInstallation(); | ||
System.out.println("[+]Verification succesful!"); | ||
System.out.println("[+]Installation complete!"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ | |
*/ | ||
public enum Action { | ||
INSTALL, | ||
COMPACT_INSTALL, | ||
UPDATE, | ||
DECOMPILE, | ||
ERROR | ||
|
Binary file renamed
BIN
+3.07 MB
...or-1.3.1-stable-jar-with-dependencies.jar → ...ator-1.4-stable-jar-with-dependencies.jar
Binary file not shown.