diff --git a/doc/build-ios-on-linux.md b/doc/build-ios-on-linux.md index 54525b3e..a8aa07cd 100644 --- a/doc/build-ios-on-linux.md +++ b/doc/build-ios-on-linux.md @@ -32,6 +32,7 @@ Instructions: You should check variables set in `runme-ios-onlinux.sh` script. + export IPHONE_IP="" export IOS_SDK=/usr/share/iPhoneOS6.0.sdk export ARCH=armv7 export TARGET=arm-apple-darwin11 @@ -64,11 +65,11 @@ See the Running instructions below. Running ------- -It's now available at `./twisterd`, provided that you are still in the `twister-core` -directory. We have to first create the RPC configuration file, though. +If you have been set IPHONE_IP before running script, it's now available at `/usr/bin/twisterd` on your device. +We have to first create the RPC configuration file, though. -Run `./twisterd` to get the filename where it should be put, or just try these -commands: +Run `/usr/bin/twisterd` from SSH or on [Mobile Terminal](http://cydia.saurik.com/package/mobileterminal/) to get +the filename where it should be put, or just try these commands: mkdir -p "/User/.twister" echo -e "rpcuser=user\nrpcpassword=pwd\nrpcallowip=127.0.0.1" > "/User/.twister/twister.conf" diff --git a/src/makefile.ios b/src/makefile.ios index 03da90a6..c343bd45 100755 --- a/src/makefile.ios +++ b/src/makefile.ios @@ -109,4 +109,13 @@ check: clean: rm -fr $(BLDDIR) +install: +ifeq ($(IPHONE_IP),) + echo "Please set IPHONE_IP" +else + ssh root@$(IPHONE_IP) 'rm -fr /usr/bin/twisterd' + scp -r $(BLDDIR)/twisterd root@$(IPHONE_IP):/usr/bin/twisterd + echo "twisterd installed, now you can run it in 'Mobile Terminal' or via SSH." +endif + .PHONY: all dist install uninstall clean diff --git a/src/runme-ios-onlinux.sh b/src/runme-ios-onlinux.sh index d40f1089..e8d724b5 100755 --- a/src/runme-ios-onlinux.sh +++ b/src/runme-ios-onlinux.sh @@ -1,5 +1,6 @@ #twister building script for IOS on linux +export IPHONE_IP="" export IOS_SDK=/usr/share/iPhoneOS6.0.sdk export ARCH=armv7 export TARGET=arm-apple-darwin11 @@ -90,3 +91,5 @@ echo 'Building libtorrent...' echo 'Building twister...' make -f makefile.ios -j$PJC +echo "Installing twisterd to your device..." +[ -n "$IPHONE_IP" ] && make -f makefile.ios install