Пример #1
0
if 1:
    try:
        import modulefinder, sys
        import win32com
        for p in win32com.__path__[1:]:
            modulefinder.AddPackagePath("win32com", p)
        for extra in ["win32com.shell"]:  #,"win32com.mapi"
            __import__(extra)
            m = sys.modules[extra]
            for p in m.__path__[1:]:
                modulefinder.AddPackagePath(extra, p)
    except ImportError:
        # no build path setup, no worries.
        pass

mfc = os.path.join(get_shell_dir(shellcon.CSIDL_SYSTEM),
                   "mfc71.dll").encode('utf8')
unicows = os.path.join(get_shell_dir(shellcon.CSIDL_SYSTEM),
                       "unicows.dll").encode('utf8')
ms = [
    mfc,
    unicows,
]

try:
    import psyco
    psyco.full()
except ImportError:
    pass

setup(
Пример #2
0
def get_shell_dir(value):
  return decode_from_filesystem(platform.get_shell_dir(value))
Пример #3
0
def get_shell_dir(value):
    return decode_from_filesystem(platform.get_shell_dir(value))
Пример #4
0
if 1:
    try:
        import modulefinder, sys
        import win32com
        for p in win32com.__path__[1:]:
            modulefinder.AddPackagePath("win32com", p)
        for extra in ["win32com.shell"]: #,"win32com.mapi"
            __import__(extra)
            m = sys.modules[extra]
            for p in m.__path__[1:]:
                modulefinder.AddPackagePath(extra, p)
    except ImportError:
        # no build path setup, no worries.
        pass

mfc = os.path.join(get_shell_dir(shellcon.CSIDL_SYSTEM), "mfc71.dll").encode('utf8')
unicows = os.path.join(get_shell_dir(shellcon.CSIDL_SYSTEM), "unicows.dll").encode('utf8')
ms = [mfc, unicows, ]

try:
    import psyco
    psyco.full()
except ImportError:
    pass

setup(windows=[{'script': 'bittorrent.py' ,
                "icon_resources": [(1, "images\\bittorrent.ico")]},
               {'script': 'maketorrent.py',
                "icon_resources": [(1, "images\\bittorrent.ico")]},
               {'script': 'choose_language.py',
                "icon_resources": [(1, "images\\bittorrent.ico")]},
Пример #5
0
# may obtain a copy of the License at http://www.bittorrent.com/license/.
#
# Software distributed under the License is distributed on an AS IS basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied.  See the License
# for the specific language governing rights and limitations under the
# License.

# written by Matt Chisholm

import os
import sys

from BitTorrent.platform import get_home_dir, get_shell_dir
if os.name == 'nt':
    from win32com.shell import shellcon
    
desktop = None

if os.name == 'nt':
    desktop = get_shell_dir(shellcon.CSIDL_DESKTOPDIRECTORY)
else:
    homedir = get_home_dir()
    if homedir == None :
        desktop = '/tmp/'
    else:
        desktop = homedir
        if os.name in ('mac', 'posix'):
            tmp_desktop = os.path.join(homedir, 'Desktop')
            if os.access(tmp_desktop, os.R_OK|os.W_OK):
                desktop = tmp_desktop + os.sep
Пример #6
0
# may obtain a copy of the License at http://www.bittorrent.com/license/.
#
# Software distributed under the License is distributed on an AS IS basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied.  See the License
# for the specific language governing rights and limitations under the
# License.

# written by Matt Chisholm

import os
import sys

from BitTorrent.platform import get_home_dir, get_shell_dir
if os.name == 'nt':
    from win32com.shell import shellcon

desktop = None

if os.name == 'nt':
    desktop = get_shell_dir(shellcon.CSIDL_DESKTOPDIRECTORY)
else:
    homedir = get_home_dir()
    if homedir == None:
        desktop = '/tmp/'
    else:
        desktop = homedir
        if os.name in ('mac', 'posix'):
            tmp_desktop = os.path.join(homedir, 'Desktop')
            if os.access(tmp_desktop, os.R_OK | os.W_OK):
                desktop = tmp_desktop + os.sep
Пример #7
0
if 1:
    try:
        import modulefinder, sys
        import win32com
        for p in win32com.__path__[1:]:
            modulefinder.AddPackagePath("win32com", p)
        for extra in ["win32com.shell"]:  #,"win32com.mapi"
            __import__(extra)
            m = sys.modules[extra]
            for p in m.__path__[1:]:
                modulefinder.AddPackagePath(extra, p)
    except ImportError:
        # no build path setup, no worries.
        pass

mfc = os.path.join(get_shell_dir(shellcon.CSIDL_SYSTEM), "mfc71.dll")
ms = [
    mfc,
]

translations = []
for l in languages:
    path = os.path.join('locale', l, 'LC_MESSAGES', 'bittorrent.mo')
    if os.access(path, os.F_OK):
        translations.append((
            "locale\\%s\\LC_MESSAGES" % l,
            [
                "locale\\%s\\LC_MESSAGES\\bittorrent.mo" % l,
                #"locale\\%s\\LC_MESSAGES\\bittorrent.po" % l,
            ]))
        gtk_mo = []
Пример #8
0
if 1:
    try:
        import modulefinder, sys
        import win32com
        for p in win32com.__path__[1:]:
            modulefinder.AddPackagePath("win32com", p)
        for extra in ["win32com.shell"]: #,"win32com.mapi"
            __import__(extra)
            m = sys.modules[extra]
            for p in m.__path__[1:]:
                modulefinder.AddPackagePath(extra, p)
    except ImportError:
        # no build path setup, no worries.
        pass

mfc = os.path.join(get_shell_dir(shellcon.CSIDL_SYSTEM), "mfc71.dll")
ms = [mfc, ]

translations = []
for l in languages:
    path = os.path.join('locale', l, 'LC_MESSAGES', 'bittorrent.mo')
    if os.access(path, os.F_OK):
        translations.append(("locale\\%s\\LC_MESSAGES"                 % l,
                             ["locale\\%s\\LC_MESSAGES\\bittorrent.mo" % l,
                              #"locale\\%s\\LC_MESSAGES\\bittorrent.po" % l,
                              ]))
        gtk_mo = []
        
        gtk_path = ""

        import gtk