diff options
author | Peter Simons <simons@cryp.to> | 2014-08-04 16:51:47 +0200 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2014-08-04 16:51:47 +0200 |
commit | 2d326e5032fda2210ff84118a526195f0a68bd24 (patch) | |
tree | d3af676b9948c865f1e942e1db51862da5e19ad5 /pkgs/development/mobile | |
parent | 9253a95f6b3f65ecc701ebb10620acfb6d251f17 (diff) | |
parent | b35770818d70924b2b71ae41ead270fe0be8c826 (diff) | |
download | nixlib-2d326e5032fda2210ff84118a526195f0a68bd24.tar nixlib-2d326e5032fda2210ff84118a526195f0a68bd24.tar.gz nixlib-2d326e5032fda2210ff84118a526195f0a68bd24.tar.bz2 nixlib-2d326e5032fda2210ff84118a526195f0a68bd24.tar.lz nixlib-2d326e5032fda2210ff84118a526195f0a68bd24.tar.xz nixlib-2d326e5032fda2210ff84118a526195f0a68bd24.tar.zst nixlib-2d326e5032fda2210ff84118a526195f0a68bd24.zip |
Merge remote-tracking branch 'origin/master' into staging.
Conflicts: pkgs/desktops/e18/enlightenment.nix
Diffstat (limited to 'pkgs/development/mobile')
5 files changed, 52 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\&version=$version\&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!"} diff --git a/pkgs/development/mobile/titaniumenv/examples/default.nix b/pkgs/development/mobile/titaniumenv/examples/default.nix index e5b439364535..d595db408178 100644 --- a/pkgs/development/mobile/titaniumenv/examples/default.nix +++ b/pkgs/development/mobile/titaniumenv/examples/default.nix @@ -5,6 +5,7 @@ , rename ? false , newBundleId ? "com.example.kitchensink", iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? "Example", iosCertificatePassword ? "" , allowUnfree ? false +, enableWirelessDistribution ? false, installURL ? null }: let @@ -90,6 +91,7 @@ rec { release = true; rename = true; inherit newBundleId iosMobileProvisioningProfile iosCertificate iosCertificateName iosCertificatePassword; + inherit enableWirelessDistribution installURL; }; } diff --git a/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix b/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix index 1725c826a52a..953726709694 100644 --- a/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix +++ b/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix @@ -1,5 +1,6 @@ { titaniumenv, fetchgit, target, androidPlatformVersions ? [ "14" ], tiVersion ? "3.2.3.GA", release ? false , rename ? false, stdenv ? null, newBundleId ? null, iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? null, iosCertificatePassword ? null +, enableWirelessDistribution ? false, installURL ? null }: assert rename -> (stdenv != null && newBundleId != null && iosMobileProvisioningProfile != null && iosCertificate != null && iosCertificateName != null && iosCertificatePassword != null); @@ -37,4 +38,5 @@ titaniumenv.buildApp { androidKeyStorePassword = "mykeystore"; inherit iosMobileProvisioningProfile iosCertificate iosCertificateName iosCertificatePassword; + inherit enableWirelessDistribution installURL; } diff --git a/pkgs/development/mobile/xcodeenv/build-app.nix b/pkgs/development/mobile/xcodeenv/build-app.nix index b5766c805522..1b4940b0c3d9 100644 --- a/pkgs/development/mobile/xcodeenv/build-app.nix +++ b/pkgs/development/mobile/xcodeenv/build-app.nix @@ -15,9 +15,15 @@ , provisioningProfile ? null , generateIPA ? false , generateXCArchive ? false +, enableWirelessDistribution ? false +, installURL ? null +, bundleId ? null +, version ? null +, title ? null }: assert release -> codeSignIdentity != null && certificateFile != null && certificatePassword != null && provisioningProfile != null; +assert enableWirelessDistribution -> installURL != null && bundleId != null && version != null && title != null; let # Set some default values here @@ -84,6 +90,12 @@ stdenv.mkDerivation { # Add IPA to Hydra build products mkdir -p $out/nix-support echo "file binary-dist \"$(echo $out/*.ipa)\"" > $out/nix-support/hydra-build-products + + ${stdenv.lib.optionalString enableWirelessDistribution '' + appname=$(basename $out/*.ipa .ipa) + sed -e "s|@INSTALL_URL@|${installURL}?bundleId=${bundleId}\&version=${version}\&title=$appname|" ${./install.html.template} > $out/$appname.html + echo "doc install \"$out/$appname.html\"" >> $out/nix-support/hydra-build-products + ''} ''} # Delete our temp keychain diff --git a/pkgs/development/mobile/xcodeenv/install.html.template b/pkgs/development/mobile/xcodeenv/install.html.template new file mode 100644 index 000000000000..833b1994162c --- /dev/null +++ b/pkgs/development/mobile/xcodeenv/install.html.template @@ -0,0 +1,25 @@ +<!DOCTYPE html> + +<html> + <head> + <title>Install IPA</title> + </head> + + <body> + <a id="forwardlink" href="@INSTALL_URL@">Go to the install page or wait a second</a> + + <script type="text/javascript"> + setTimeout(function() { + var link = document.getElementById('forwardlink'); + + if(document.createEvent) { + var eventObj = document.createEvent('MouseEvents'); + eventObj.initEvent('click', true, false); + link.dispatchEvent(eventObj); + } else if(document.createEventObject) { + link.fireEvent('onclick'); + } + }, 1000); + </script> + </body> +</html> |