alqindiirsyam %!s(int64=2) %!d(string=hai) anos
pai
achega
c2dc39a682
Modificáronse 1 ficheiros con 12 adicións e 5 borrados
  1. 12 5
      src/mainPalio4.py

+ 12 - 5
src/mainPalio4.py

@@ -537,16 +537,23 @@ def change_huawei_file(path_dest, huawei_file, package_id):
             f.write(replaced)
             f.write(replaced)
 
 
 def change_fms_file(path_dest, fms_enable):
 def change_fms_file(path_dest, fms_enable):
-    if fms_enable == 0:
-        build_gradle = os.path.join(path_dest, 'app/build.gradle')
-        with open(build_gradle, "r") as f:
-            lines = f.readlines()
-        with open(build_gradle, "w") as f:
+    build_gradle = os.path.join(path_dest, 'app/build.gradle')
+    with open(build_gradle, "r") as f:
+        lines = f.readlines()
+    with open(build_gradle, "w") as f:
+        if fms_enable == 0:
             for line in lines:
             for line in lines:
                 if "withfcm" in line:
                 if "withfcm" in line:
                     continue
                     continue
                 else:
                 else:
                     f.write(line)
                     f.write(line)
+        else:
+            for line in lines:
+                if "-nofcm" in line:
+                    continue
+                else:
+                    f.write(line)
+
 
 
 
 
 def run_build(path_dest):
 def run_build(path_dest):