summary refs log tree commit diff
path: root/pkgs/development/mobile/titaniumenv/build-app.nix
diff options
context:
space:
mode:
authorSander van der Burg <svanderburg@gmail.com>2014-08-04 11:26:14 +0200
committerSander van der Burg <svanderburg@gmail.com>2014-08-04 11:26:14 +0200
commit7eb93f944b3c3f57369d9efdba0c8eef8f89e866 (patch)
treeb95e06654c5e0a32af0b1bfb75f27dc717f1399a /pkgs/development/mobile/titaniumenv/build-app.nix
parentbffdf03e4fab412b6e4a1e5497349f89a194f07f (diff)
downloadnixlib-7eb93f944b3c3f57369d9efdba0c8eef8f89e866.tar
nixlib-7eb93f944b3c3f57369d9efdba0c8eef8f89e866.tar.gz
nixlib-7eb93f944b3c3f57369d9efdba0c8eef8f89e866.tar.bz2
nixlib-7eb93f944b3c3f57369d9efdba0c8eef8f89e866.tar.lz
nixlib-7eb93f944b3c3f57369d9efdba0c8eef8f89e866.tar.xz
nixlib-7eb93f944b3c3f57369d9efdba0c8eef8f89e866.tar.zst
nixlib-7eb93f944b3c3f57369d9efdba0c8eef8f89e866.zip
Implemented wireless adhoc distribution support for titanium apps
Diffstat (limited to 'pkgs/development/mobile/titaniumenv/build-app.nix')
-rw-r--r--pkgs/development/mobile/titaniumenv/build-app.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/development/mobile/titaniumenv/build-app.nix b/pkgs/development/mobile/titaniumenv/build-app.nix
index 2443bfe9aed8..fa959035a9e9 100644
--- a/pkgs/development/mobile/titaniumenv/build-app.nix
+++ b/pkgs/development/mobile/titaniumenv/build-app.nix
@@ -2,10 +2,12 @@
 { name, src, target, androidPlatformVersions ? [ "8" ], androidAbiVersions ? [ "armeabi" "armeabi-v7a" ], tiVersion ? null
 , release ? false, androidKeyStore ? null, androidKeyAlias ? null, androidKeyStorePassword ? null
 , iosMobileProvisioningProfile ? null, iosCertificateName ? null, iosCertificate ? null, iosCertificatePassword ? null
+, enableWirelessDistribution ? false, installURL ? null
 }:
 
 assert (release && target == "android") -> androidKeyStore != null && androidKeyAlias != null && androidKeyStorePassword != null;
 assert (release && target == "iphone") -> iosMobileProvisioningProfile != null && iosCertificateName != null && iosCertificate != null && iosCertificatePassword != null;
+assert enableWirelessDistribution -> installURL != null;
 
 let
   androidsdkComposition = androidsdk {
@@ -132,6 +134,15 @@ stdenv.mkDerivation {
              cp -av build/iphone/build/* $out
              mkdir -p $out/nix-support
              echo "file binary-dist \"$(echo $out/Release-iphoneos/*.ipa)\"" > $out/nix-support/hydra-build-products
+             
+             ${stdenv.lib.optionalString enableWirelessDistribution ''
+               appname=$(basename $out/Release-iphoneos/*.ipa .ipa)
+               bundleId=$(grep '<id>[a-zA-Z0-9.]*</id>' tiapp.xml | sed -e 's|<id>||' -e 's|</id>||' -e 's/ //g')
+               version=$(grep '<version>[a-zA-Z0-9.]*</version>' tiapp.xml | sed -e 's|<version>||' -e 's|</version>||' -e 's/ //g')
+               
+               sed -e "s|@INSTALL_URL@|${installURL}?bundleId=$bundleId\&amp;version=$version\&amp;title=$appname|" ${../xcodeenv/install.html.template} > $out/$appname.html
+               echo "doc install \"$out/$appname.html\"" >> $out/nix-support/hydra-build-products
+             ''}
            ''
         else if target == "iphone" then ""
         else throw "Target: ${target} is not supported!"}