diff --git a/website/page/code/mobile-version.php b/website/page/code/mobile-version.php new file mode 100644 index 00000000..ffabba55 --- /dev/null +++ b/website/page/code/mobile-version.php @@ -0,0 +1,32 @@ +getManifest(); + + $result['apk_version'] = $manifest->getVersionName(); + + + $archive = $apkinfo->getApkArchive(); + $iitc_file = "assets/total-conversion-build.user.js"; + if ( $archive->statName ( $iitc_file ) === FALSE ); + $iitc_file = "assets/iitc.js"; + + $stream = $archive->getStream ( $iitc_file ); + + $header = loadUserScriptHeader ( $stream ); + + $result['iitc_version'] = $header['@version']; + + return $result; +} + +?> diff --git a/website/page/code/userscript.php b/website/page/code/userscript.php index 7fb570aa..c229df76 100644 --- a/website/page/code/userscript.php +++ b/website/page/code/userscript.php @@ -1,11 +1,14 @@ Download -
-IITC Mobile version 0.3 (with IITC version 0.11.2). -
+Download +include_once ( "code/mobile-version.php" ); +$apkfile = "mobile/IITC-Mobile-0.3.apk"; + + +if ( file_exists($apkfile) ) +{ + $version = getMobileVersion ( $apkfile ); + + $apk_version = $version['apk_version']; + $iitc_version = preg_replace ( '/^(\d+\.\d+\.\d+)\.(\d{8}\.\d{6})/', '\1.\2', $version['iitc_version'] ); + + print "IITC Mobile version $apk_version, with IITC version $iitc_version
\n"; + + print "\n"; + +} +else +{ + print "IITC Mobile version informpation - not currently available for test builds
+.\2', $version['iitc_version'] ); + + print "IITC Mobile version $apk_version, with IITC version $iitc_version
\n"; + + print "Download\n"; + +} +else +{ + print "