[DEV] add versionCode
This commit is contained in:
parent
111ed6d4ea
commit
c7fe6ef117
@ -80,6 +80,7 @@ class Module:
|
||||
"PRIORITY" : set(""),
|
||||
"DESCRIPTION" : set(""),
|
||||
"VERSION" : set("0.0.0"),
|
||||
"VERSION_CODE" : "",
|
||||
"NAME" : set("no-name"), # name of the application
|
||||
"ANDROID_MANIFEST" : "", # By default generate the manifest
|
||||
"ANDROID_JAVA_FILES" : ["DEFAULT"], # when user want to create his own services and activities
|
||||
@ -658,6 +659,8 @@ class Module:
|
||||
self.packageProp[variable] = value
|
||||
elif "VERSION" == variable:
|
||||
self.packageProp[variable] = value
|
||||
elif "VERSION_CODE" == variable:
|
||||
self.packageProp[variable] = value
|
||||
elif "NAME" == variable:
|
||||
self.packageProp[variable] = value
|
||||
elif "ANDROID_MANIFEST" == variable:
|
||||
|
@ -307,13 +307,15 @@ class Target(lutinTarget.Target):
|
||||
debug.print_element("pkg", "AndroidManifest.xml", "<==", pkgProperties["ANDROID_MANIFEST"])
|
||||
lutinTools.copy_file(pkgProperties["ANDROID_MANIFEST"], self.get_staging_folder(pkgName) + "/AndroidManifest.xml", True)
|
||||
else:
|
||||
if "VERSION_CODE" not in pkgProperties:
|
||||
pkgProperties["VERSION_CODE"] = "1"
|
||||
debug.print_element("pkg", "AndroidManifest.xml", "<==", "package configurations")
|
||||
tmpFile = open(self.get_staging_folder(pkgName) + "/AndroidManifest.xml", 'w')
|
||||
tmpFile.write( '<?xml version="1.0" encoding="utf-8"?>\n')
|
||||
tmpFile.write( '<!-- Manifest is autoGenerated with Ewol ... do not patch it-->\n')
|
||||
tmpFile.write( '<manifest xmlns:android="http://schemas.android.com/apk/res/android" \n')
|
||||
tmpFile.write( ' package="' + compleatePackageName + '" \n')
|
||||
tmpFile.write( ' android:versionCode="1" \n')
|
||||
tmpFile.write( ' android:versionCode="'+pkgProperties["VERSION_CODE"]+'" \n')
|
||||
tmpFile.write( ' android:versionName="'+pkgProperties["VERSION"]+'"> \n')
|
||||
tmpFile.write( ' <uses-feature android:glEsVersion="0x00020000" android:required="true" />\n')
|
||||
tmpFile.write( ' <uses-sdk android:minSdkVersion="' + str(self.boardId) + '" \n')
|
||||
|
Loading…
x
Reference in New Issue
Block a user