Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

more permission changes, update doc

  • Loading branch information...
commit acf73a711ff5202391a37acfc0b9873e0136b263 1 parent bc03f8a
Jeff Haynie authored May 06, 2013
14  README.md
Source Rendered
... ...
@@ -1,11 +1,21 @@
1 1
 Titanium All-in-One Installer
2 2
 =============================
3 3
 
4  
-This is an *EXPERIMENTAL* project to build an all-in-one install script for Titanium.
  4
+This is an *EXPERIMENTAL* project to build an all-in-one install script for [Appcelerator Titanium](http://github.com/appcelerator/titanium_mobile).
5 5
 
6 6
 You can run the installer from a Unix/OSX command shell:
7 7
 
8  
-	> curl https://raw.github.com/jhaynie/ti-install/master/install.sh | sudo sh
  8
+	> sudo curl https://raw.github.com/jhaynie/ti-install/master/install.sh | sudo sh
  9
+
  10
+After installation, you should create a new project:
  11
+
  12
+	> titanium create --platforms android --id com.foo --name foo --type app --url http://foo.com -d .
  13
+
  14
+Then run the android simulator:
  15
+
  16
+	> cd foo
  17
+	> titanium build --platform android --avd-id 2
  18
+
9 19
 
10 20
 What does this installer do?
11 21
 ----------------------------
19  lib/postinstall.js
@@ -9,7 +9,8 @@
9 9
 var exec = require('child_process').exec,
10 10
 	fs = require('fs'),
11 11
 	appc = require('node-appc'),
12  
-	wrench = require('wrench');
  12
+	wrench = require('wrench'),
  13
+	path = require('path');
13 14
 
14 15
 exec('titanium config app.sdk', function(err,stdout,stderr)
15 16
 {
@@ -19,20 +20,24 @@ exec('titanium config app.sdk', function(err,stdout,stderr)
19 20
 	{
20 21
 		var config = JSON.parse(stdout),
21 22
 			entry = config.titanium[ver],
22  
-			path = entry ? entry.path : null;
  23
+			sdkPath = entry ? entry.path : null;
23 24
 
24  
-		if (path)
  25
+		if (sdkPath)
25 26
 		{
26 27
 			var home = appc.fs.home(),
27 28
 				stat = fs.statSync(home);
28 29
 				uid = parseInt(process.env.SUDO_UID || stat.uid),
29  
-				gid = parseInt(process.env.SUDO_GID || stat.gid);
  30
+				gid = parseInt(process.env.SUDO_GID || stat.gid),
  31
+				tilib = path.join(sdkPath, '..', '..');
30 32
 
31 33
 			// make sure that the owner owns the files not root
32  
-			wrench.chownSyncRecursive(path, uid, gid);
33  
-			wrench.chmodSyncRecursive(path, '0755');
  34
+			wrench.chownSyncRecursive(sdkPath, uid, gid);
  35
+			wrench.chmodSyncRecursive(sdkPath, '0755');
  36
+
  37
+			wrench.chownSyncRecursive(tilib, uid, gid);
  38
+			wrench.chmodSyncRecursive(tilib, '0755');
34 39
 		}
35  
-		process.exit(path ? 0 : 1);
  40
+		process.exit(sdkPath ? 0 : 1);
36 41
 	});
37 42
 });
38 43
 

0 notes on commit acf73a7

Please sign in to comment.
Something went wrong with that request. Please try again.