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 "

Download

\n"; + +} +else +{ + print "
Error: $apkfile not found
\n"; +} + +?> + + +
+As IITC Mobile is regularly updated, you may want to consider trying the latest +test build. +
diff --git a/website/page/test.php b/website/page/test.php index 565df00e..7126f67f 100644 --- a/website/page/test.php +++ b/website/page/test.php @@ -16,6 +16,7 @@ builds. include_once ( "code/desktop-download.php" ); + $path = "test"; if ( $_REQUEST['build'] == 'dev' ) @@ -57,7 +58,30 @@ iitcDesktopPluginDownloadTable ( $path );

Mobile test build

-

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 "
Error: $apkfile not found
\n"; +} + +?> + -Download