Conversation
|
So, it seems like |
ewpatton
left a comment
There was a problem hiding this comment.
This is mostly there. There are a few things to address but not much. Also, is protoc acutally used anywhere? If so, why is only the mac version checked in? If not, we should remove the binary since it just increases the repo size for no reason.
@barreeeiroo If you want me to make the changes, please let me know.
| @Description("Download button shown in barcode dialog") | ||
| String barcodeDownloadAab(); | ||
|
|
||
| @DefaultMessage("<b>Click the button to download the app, right-click on it to copy a download link, or scan the " + |
There was a problem hiding this comment.
Something we should check is whether this affects the translations. If so, we may want to keep it as two separate strings so we can reuse the existing translations.
There was a problem hiding this comment.
May want to check the other entries for issues as well.
There was a problem hiding this comment.
Humm, it will probably show the older version in the other languages until someone manually changes it. I have now moved it into a barcodeWarning2 key, to always force to display the updated one (although it will require a translation anyway) and don't show different content depending on language.
appinventor/buildserver/src/com/google/appinventor/buildserver/AabCompiler.java
Show resolved
Hide resolved
appinventor/appengine/src/com/google/appinventor/client/TopToolbar.java
Outdated
Show resolved
Hide resolved
appinventor/appengine/src/com/google/appinventor/client/TopToolbar.java
Outdated
Show resolved
Hide resolved
appinventor/buildserver/src/com/google/appinventor/buildserver/AabZipper.java
Outdated
Show resolved
Hide resolved
appinventor/buildserver/src/com/google/appinventor/buildserver/AabCompiler.java
Outdated
Show resolved
Hide resolved
appinventor/buildserver/src/com/google/appinventor/buildserver/AabCompiler.java
Outdated
Show resolved
Hide resolved
appinventor/buildserver/src/com/google/appinventor/buildserver/AabCompiler.java
Outdated
Show resolved
Hide resolved
appinventor/buildserver/src/com/google/appinventor/buildserver/Compiler.java
Outdated
Show resolved
Hide resolved
@ewpatton I would like to make the changes by myself, if possible. When do you wish to have them, so I can get some time for it? |
|
I'd like to put this into the upcoming release this month. We're planning to update the test server today but can put in this version without merging the change to master. If we could have a final version by next week that'd be helpful. |
|
@AppInventorWorkerBee retest this please |
jisqyv
left a comment
There was a problem hiding this comment.
When I run "ant PlayAppAab it fails:
[java] INFO: ____Executing null/bin/jarsigner -sigalg SHA256withRSA -digestalg SHA-256 -keystore /tmp/1607138147663_0.5920950606732425-0/android.keystore -storepass android /tmp/1607138147663_0.5920950606732425-0/youngandroidproject/../build/deploy/MIT AI2 Companion.aab AndroidKey
[java] Dec 04, 2020 10:16:18 PM com.google.appinventor.buildserver.Execution execute
[java] WARNING: ____Execution failure:
[java] java.io.IOException: Cannot run program "null/bin/jarsigner": error=2, No such file or directory
| if (osName.equals("Mac OS X")) { | ||
| jarsignerTool = System.getenv("JAVA_HOME") + "/bin/jarsigner"; | ||
| } else if (osName.equals("Linux")) { | ||
| jarsignerTool = System.getenv("JAVA_HOME") + "/bin/jarsigner"; |
There was a problem hiding this comment.
This doesn't work. JAVA_HOME isn't necessarily set in the buildserver environment. You should use System.getProperty("java.home"). However this gives you the JRE home. So you have to do a ../bin/jarsigner to get to it. You can construct the path identically for Mac OS and Linux. But you have to separate out Windows because of the need to add the .exe on the end of the jarsigner binary name.
There was a problem hiding this comment.
If we use the JDK in the Docker image, we can bypass all this by invoking jarsigner without any qualification as it'll be in the PATH. I've tried this on macOS 10.15, Windows 10, and Ubuntu 18.04 and it worked (no need to even specify .exe on Windows). However, since we only use the JRE in the buildserver image, we would need to embed the jarsigner executable similarly to other tools (aapt, apksigner, etc.). Since we don't have the rights to redistribute jarsigner, it seems like using the JDK in the buildserver is the safer route.
There was a problem hiding this comment.
We already embed jarsigner (the buildserver has the jre and a few additions from the jdk). We used to use it a few versions ago before we switched to apksigner.
|
Regarding my previous comment, here is the diff of what I tested. diff --git a/appinventor/buildserver/src/com/google/appinventor/buildserver/Compiler.java b/appinventor/buildserver/src/com/google/appinventor/buildserver/Compiler.java
index 2a4da1b803..bcca6e91f8 100644
--- a/appinventor/buildserver/src/com/google/appinventor/buildserver/Compiler.java
+++ b/appinventor/buildserver/src/com/google/appinventor/buildserver/Compiler.java
@@ -2454,20 +2454,7 @@ public final class Compiler {
private boolean bundleTool(File buildDir, int childProcessRam, String tmpPackageName,
String outputFileName, File deployDir, String keystoreFilePath, String dexedClassesDir) {
try {
- String osName = System.getProperty("os.name");
- String jarsignerTool;
- if (osName.equals("Mac OS X")) {
- jarsignerTool = System.getenv("JAVA_HOME") + "/bin/jarsigner";
- } else if (osName.equals("Linux")) {
- jarsignerTool = System.getenv("JAVA_HOME") + "/bin/jarsigner";
- } else if (osName.startsWith("Windows")) {
- jarsignerTool = System.getenv("JAVA_HOME") + "\\bin\\jarsigner.exe";
- } else {
- LOG.warning("YAIL compiler - cannot run Jarsigner on OS " + osName);
- err.println("YAIL compiler - cannot run AAPT2 on OS " + osName);
- userErrors.print(String.format(ERROR_IN_STAGE, "AabCompiler"));
- return false;
- }
+ String jarsignerTool = "jarsigner";
String fileName = outputFileName;
if (fileName == null) {
fileName = project.getProjectName() + ".aab"; |
|
With Evan's patch things seem to work with our normal buildserver (containerized) environment. |
- Added javadoc - Moved to util. package - Made private constructor
Closes #1903
This PR adds the feature to export MIT App Inventor 2 projects as Android App Bundles (.aab), to be distributed through Google Play Store. This is part of my Google Summer of Code 2020 project proposal.
Changes in this pull can be seen live at aab.appinventor.barreiro.xyz.
Some useful docs can be found in this folder.
Maybe this should be merged with "Squash & Merge" to just make a single commit with the feature.