Changeset 935:79a441954367
Legend:
- Unmodified
- Added
- Removed
-
setup.py
r919 r935 5 5 from glob import glob 6 6 from distutils.core import setup 7 from pathlib import Path 7 8 8 9 scriptdir=os.path.dirname(sys.argv[0]) … … 40 41 gtkRuntimeDir = os.environ["GTKRTDIR"] if "GTKRTDIR" in os.environ else None 41 42 if gtkRuntimeDir: 42 path = os.path.join("lib", "gtk-2.0", "2.10.0", "engines") 43 data_files.append((os.path.join("library", path), 44 [os.path.join(gtkRuntimeDir, path, "libwimp.dll")])) 43 if gtkRuntimeDir.endswith("/mingw32"): 44 path = os.path.join("lib", "girepository-1.0") 45 data_files.append((path, 46 glob(os.path.join(gtkRuntimeDir, path, "*")))) 45 47 46 path = os.path.join("share", "themes", "MS-Windows", "gtk-2.0") 47 data_files.append((os.path.join("library", path), 48 glob(os.path.join(gtkRuntimeDir, path, "*")))) 48 files = {} 49 49 50 path = os.path.join("share", "locale", "hu", "LC_MESSAGES") 51 data_files.append((os.path.join("library", path), 52 glob(os.path.join(gtkRuntimeDir, path, "*")))) 53 path = os.path.join("share", "icons", "hicolor") 54 data_files.append((os.path.join("library", path), 55 glob(os.path.join(gtkRuntimeDir, path, "*")))) 50 for components in [ ["lib", "girepository-1.0"], 51 ["lib", "gdk-pixbuf-2.0", "2.10.0"], 52 ["share", "icons"], 53 ["share", "locale", "hu"], 54 ["share", "locale", "en"], 55 ["share", "themes"], 56 ["share", "glib-2.0", "schemas"]]: 57 path = os.path.join(*components) 58 p = Path(os.path.join(gtkRuntimeDir, path)) 59 for f in p.glob("**/*"): 60 if f.is_file(): 61 d = os.path.join(path, str(f.parent.relative_to(p))) 62 if d in files: 63 files[d].append(str(f)) 64 else: 65 files[d] = [str(f)] 66 67 for path in files: 68 data_files.append((path, files[path])) 69 data_files.append(("", 70 [os.path.join(gtkRuntimeDir, "bin", "librsvg-2-2.dll"), 71 os.path.join(gtkRuntimeDir, "bin", "libcroco-0.6-3.dll")])) 72 else: 73 path = os.path.join("lib", "gtk-2.0", "2.10.0", "engines") 74 data_files.append((os.path.join("library", path), 75 [os.path.join(gtkRuntimeDir, path, "libwimp.dll")])) 76 77 path = os.path.join("share", "themes", "MS-Windows", "gtk-2.0") 78 data_files.append((os.path.join("library", path), 79 glob(os.path.join(gtkRuntimeDir, path, "*")))) 80 81 path = os.path.join("share", "locale", "hu", "LC_MESSAGES") 82 data_files.append((os.path.join("library", path), 83 glob(os.path.join(gtkRuntimeDir, path, "*")))) 84 path = os.path.join("share", "icons", "hicolor") 85 data_files.append((os.path.join("library", path), 86 glob(os.path.join(gtkRuntimeDir, path, "*")))) 56 87 57 88 cefDir = os.environ.get("CEFDIR") 58 89 if cefDir: 59 for fileName in ["icudt.dll", "subprocess.exe"]: 90 for fileName in ["icudtl.dat", "subprocess.exe", "natives_blob.bin", 91 "snapshot_blob.bin", "v8_context_snapshot.bin", 92 "cef.pak", "cef_100_percent.pak", 93 "cef_200_percent.pak", "cef_extensions.pak"]: 60 94 data_files.append(("", [os.path.join(cefDir, fileName)])) 61 95 … … 132 166 { "script" : "mlxupdate.py", 133 167 "uac_info" : "requireAdministrator"}], 134 options = { "py2exe" : { " includes": "gio, pango, atk, pangocairo, lxml._elementpath",168 options = { "py2exe" : { "packages" : "gi, lxml", 135 169 "skip_archive": True} }, 136 zipfile = "library /.",170 zipfile = "library", 137 171 data_files = data_files, 138 172 platforms = ["Win32", "Linux"], … … 141 175 142 176 if os.name=="nt": 143 os.rename(os.path.join(scriptdir, "dist", "library", "libcef.dll"),144 os.path.join(scriptdir, "dist", "libcef.dll"))145 177 mlx.update.buildManifest(os.path.join(scriptdir, "dist")) 146 178 with open(os.path.join(scriptdir, "dist", "Uninstall.conf"), "wt") as f:
Note:
See TracChangeset
for help on using the changeset viewer.