Somehow forgot to push my windows build script changes in all my blurness last night
[electrum-nvc.git] / contrib / build-wine / deterministic.spec
1 # -*- mode: python -*-\r
2 \r
3 # We don't put these files in to actually include them in the script but to make the Analysis method scan them for imports\r
4 a = Analysis(['electrum', 'gui/gui_classic.py', 'gui/gui_lite.py', 'gui/gui_text.py',\r
5               'lib/util.py', 'lib/wallet.py', 'lib/simple_config.py',\r
6               'lib/bitcoin.py', 'lib/deserialize.py' \r
7               ],\r
8              hiddenimports=["lib","gui"], \r
9              pathex=['lib:gui:plugins'],\r
10              hookspath=None)\r
11 \r
12 ##### include mydir in distribution #######\r
13 def extra_datas(mydir):\r
14     def rec_glob(p, files):\r
15         import os\r
16         import glob\r
17         for d in glob.glob(p):\r
18             if os.path.isfile(d):\r
19                 files.append(d)\r
20             rec_glob("%s/*" % d, files)\r
21     files = []\r
22     rec_glob("%s/*" % mydir, files)\r
23     extra_datas = []\r
24     for f in files:\r
25         extra_datas.append((f, f, 'DATA'))\r
26 \r
27     return extra_datas\r
28 ###########################################\r
29 \r
30 # append dirs\r
31 \r
32 # Theme data\r
33 a.datas += extra_datas('data')\r
34 \r
35 # Localization\r
36 a.datas += extra_datas('locale')\r
37 \r
38 # Py folders that are needed because of the magic import finding\r
39 a.datas += extra_datas('gui')\r
40 a.datas += extra_datas('lib')\r
41 a.datas += extra_datas('plugins')\r
42 \r
43 pyz = PYZ(a.pure)\r
44 exe = EXE(pyz,\r
45           a.scripts,\r
46           exclude_binaries=1,\r
47           name=os.path.join('build\\pyi.win32\\electrum', 'electrum.exe'),\r
48           debug=True,\r
49           strip=None,\r
50           upx=False,\r
51           icon='icons/electrum.ico',\r
52           console=True)\r
53           # The console True makes an annoying black box pop up, but it does make Electrum accept command line options.\r
54 \r
55 coll = COLLECT(exe,\r
56                a.binaries,\r
57                a.zipfiles,\r
58                a.datas,\r
59                strip=None,\r
60                upx=True,\r
61                debug=False,\r
62                icon='icons/electrum.ico',\r
63                console=True,\r
64                name=os.path.join('dist', 'electrum'))\r