11
11
12
12
class PackagingEnvironment (object ):
13
13
def __init__ (self , target_os , packaging_server = False ):
14
+ self .components_dir = None
14
15
self .version = __init__ .get_titanium_version ()
15
16
self .excludes = ['.pdb' , '.exp' , '.ilk' , '.lib' , '.svn' ,
16
17
'.git' , '.gitignore' , '.cvsignore' ]
@@ -27,19 +28,19 @@ def init_packaging_server_dirs(self, script_dir):
27
28
self .install_dirs = [p .join (script_dir , '..' , '..' , '..' )]
28
29
29
30
def init_normal_dirs (self , script_dir ):
30
- if (self .target_os is 'linux' ):
31
+ if (self .target_os == 'linux' ):
31
32
self .install_dirs = [
32
33
p .expanduser ('~/.titanium' ),
33
34
"/opt/titanium" ,
34
35
"/usr/local/lib/titanium" ,
35
36
"/usr/lib/titanium"
36
37
]
37
- elif (self .target_os is 'osx' ):
38
+ elif (self .target_os == 'osx' ):
38
39
self .install_dirs = [
39
40
p .expanduser ('~/Library/Application Support/Titanium' ),
40
41
'/Library/Application Support/Titanium'
41
42
]
42
- elif (self .target_os is 'win32' ):
43
+ elif (self .target_os == 'win32' ):
43
44
self .install_dirs = [
44
45
p .join (os .environ ['APPDATA' ], 'Titanium' ),
45
46
# TODO: Is there a better way to determine this directory?
@@ -61,11 +62,11 @@ def init_normal_dirs(self, script_dir):
61
62
self .components_dir = p .join (script_dir , '..' )
62
63
63
64
def create_app (self , path ):
64
- if self .target_os is 'linux' :
65
+ if self .target_os == 'linux' :
65
66
return linux_app .LinuxApp (self , path )
66
- if self .target_os is 'osx' :
67
+ if self .target_os == 'osx' :
67
68
return osx_app .OSXApp (self , path )
68
- if self .target_os is 'win32' :
69
+ if self .target_os == 'win32' :
69
70
return win32_app .Win32App (self , path )
70
71
71
72
def log (self , text ):
0 commit comments