Skip to content

Commit 666ba09

Browse files
committed
Merge branch 'master' of github.com:appcelerator/titanium_desktop into v1.1.x
2 parents dab80e9 + 09cb2d5 commit 666ba09

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

SConscript.dist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import tarfile
66
import zipfile
77
import sys
88
from glob import glob
9+
from StringIO import StringIO
910

1011
sdk_dir = path.join(build.dir, 'sdk')
1112
excludes = ['.pdb', '.exp', '.ilk', '.db', '.gitignore','.psd', '.xib'
@@ -80,6 +81,9 @@ def build_packaging_tools(target, source, env):
8081
print "Packing packaging tools (%s) " % tgz_file_path
8182
tgz_file = tarfile.open(tgz_file_path, 'w:gz')
8283
add_files_to_archive(tgz_file, effess.add_to_tgz)
84+
tgz_file.addfile(tarfile.TarInfo(
85+
'/'.join(['sdk', build.os, build.version, '.packager'])),
86+
StringIO('#'))
8387
tgz_file.close()
8488

8589
# Builder for all module and runtime component zip files

sdk/env.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
class PackagingEnvironment(object):
1313
def __init__(self, target_os, packaging_server=False):
14+
self.components_dir = None
1415
self.version = __init__.get_titanium_version()
1516
self.excludes = ['.pdb', '.exp', '.ilk', '.lib', '.svn',
1617
'.git', '.gitignore', '.cvsignore']
@@ -27,19 +28,19 @@ def init_packaging_server_dirs(self, script_dir):
2728
self.install_dirs = [p.join(script_dir, '..', '..', '..')]
2829

2930
def init_normal_dirs(self, script_dir):
30-
if (self.target_os is 'linux'):
31+
if (self.target_os == 'linux'):
3132
self.install_dirs = [
3233
p.expanduser('~/.titanium'),
3334
"/opt/titanium",
3435
"/usr/local/lib/titanium",
3536
"/usr/lib/titanium"
3637
]
37-
elif (self.target_os is 'osx'):
38+
elif (self.target_os == 'osx'):
3839
self.install_dirs = [
3940
p.expanduser('~/Library/Application Support/Titanium'),
4041
'/Library/Application Support/Titanium'
4142
]
42-
elif (self.target_os is 'win32'):
43+
elif (self.target_os == 'win32'):
4344
self.install_dirs = [
4445
p.join(os.environ['APPDATA'], 'Titanium'),
4546
# TODO: Is there a better way to determine this directory?
@@ -61,11 +62,11 @@ def init_normal_dirs(self, script_dir):
6162
self.components_dir = p.join(script_dir, '..')
6263

6364
def create_app(self, path):
64-
if self.target_os is 'linux':
65+
if self.target_os == 'linux':
6566
return linux_app.LinuxApp(self, path)
66-
if self.target_os is 'osx':
67+
if self.target_os == 'osx':
6768
return osx_app.OSXApp(self, path)
68-
if self.target_os is 'win32':
69+
if self.target_os == 'win32':
6970
return win32_app.Win32App(self, path)
7071

7172
def log(self, text):

sdk/linux_app.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ def package(self, package_dir, bundle=False):
1616
longname = self.name + "-" + self.version
1717
def tar_callback(f, tar_file):
1818
print f
19-
tar_file.add(f, longname + "/" + f.replace(self.stage_dir + os.sep, ""))
19+
# tar paths in <= 2.5 must be non unicode
20+
f = f.encode('ascii', 'ignore')
21+
tarname = longname + "/" + f.replace(self.stage_dir + os.sep, "")
22+
tarname = tarname.encode('ascii', 'ignore')
23+
tar_file.add(f, tarname)
2024

2125
effess.make_tgz(self.stage_dir, p.join(package_dir, longname + '.tgz'),
2226
callback=tar_callback)

0 commit comments

Comments
 (0)