Merge #10777: [tests] Avoid redundant assignments. Remove unused variables
[bitcoinplatinum.git] / contrib / macdeploy / custom_dsstore.py
blobe6ecabace1a429b85af0551b9c4622118450c221
1 #!/usr/bin/env python
2 # Copyright (c) 2013-2016 The Bitcoin Core developers
3 # Distributed under the MIT software license, see the accompanying
4 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 from __future__ import division,print_function,unicode_literals
6 import biplist
7 from ds_store import DSStore
8 from mac_alias import Alias
9 import sys
11 output_file = sys.argv[1]
12 package_name_ns = sys.argv[2]
14 ds = DSStore.open(output_file, 'w+')
15 ds['.']['bwsp'] = {
16 'ShowStatusBar': False,
17 'WindowBounds': b'{{300, 280}, {500, 343}}',
18 'ContainerShowSidebar': False,
19 'SidebarWidth': 0,
20 'ShowTabView': False,
21 'PreviewPaneVisibility': False,
22 'ShowToolbar': False,
23 'ShowSidebar': False,
24 'ShowPathbar': True
27 icvp = {
28 'gridOffsetX': 0.0,
29 'textSize': 12.0,
30 'viewOptionsVersion': 1,
31 'backgroundImageAlias': b'\x00\x00\x00\x00\x02\x1e\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd1\x94\\\xb0H+\x00\x05\x00\x00\x00\x98\x0fbackground.tiff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\xd19\xb0\xf8\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\r\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b.background\x00\x00\x10\x00\x08\x00\x00\xd1\x94\\\xb0\x00\x00\x00\x11\x00\x08\x00\x00\xd19\xb0\xf8\x00\x00\x00\x01\x00\x04\x00\x00\x00\x98\x00\x0e\x00 \x00\x0f\x00b\x00a\x00c\x00k\x00g\x00r\x00o\x00u\x00n\x00d\x00.\x00t\x00i\x00f\x00f\x00\x0f\x00\x02\x00\x00\x00\x12\x00\x1c/.background/background.tiff\x00\x14\x01\x06\x00\x00\x00\x00\x01\x06\x00\x02\x00\x00\x0cMacintosh HD\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xce\x97\xab\xc3H+\x00\x00\x01\x88[\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02u\xab\x8d\xd1\x94\\\xb0devrddsk\xff\xff\xff\xff\x00\x00\t \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07bitcoin\x00\x00\x10\x00\x08\x00\x00\xce\x97\xab\xc3\x00\x00\x00\x11\x00\x08\x00\x00\xd1\x94\\\xb0\x00\x00\x00\x01\x00\x14\x01\x88[\x88\x00\x16\xa9\t\x00\x08\xfaR\x00\x08\xfaQ\x00\x02d\x8e\x00\x0e\x00\x02\x00\x00\x00\x0f\x00\x1a\x00\x0c\x00M\x00a\x00c\x00i\x00n\x00t\x00o\x00s\x00h\x00 \x00H\x00D\x00\x13\x00\x01/\x00\x00\x15\x00\x02\x00\x14\xff\xff\x00\x00\xff\xff\x00\x00',
32 'backgroundColorBlue': 1.0,
33 'iconSize': 96.0,
34 'backgroundColorGreen': 1.0,
35 'arrangeBy': 'none',
36 'showIconPreview': True,
37 'gridSpacing': 100.0,
38 'gridOffsetY': 0.0,
39 'showItemInfo': False,
40 'labelOnBottom': True,
41 'backgroundType': 2,
42 'backgroundColorRed': 1.0
44 alias = Alias.from_bytes(icvp['backgroundImageAlias'])
45 alias.volume.name = package_name_ns
46 alias.volume.posix_path = '/Volumes/' + package_name_ns
47 alias.volume.disk_image_alias.target.filename = package_name_ns + '.temp.dmg'
48 alias.volume.disk_image_alias.target.carbon_path = 'Macintosh HD:Users:\x00bitcoinuser:\x00Documents:\x00bitcoin:\x00bitcoin:\x00' + package_name_ns + '.temp.dmg'
49 alias.volume.disk_image_alias.target.posix_path = 'Users/bitcoinuser/Documents/bitcoin/bitcoin/' + package_name_ns + '.temp.dmg'
50 alias.target.carbon_path = package_name_ns + ':.background:\x00background.tiff'
51 icvp['backgroundImageAlias'] = biplist.Data(alias.to_bytes())
52 ds['.']['icvp'] = icvp
54 ds['.']['vSrn'] = ('long', 1)
56 ds['Applications']['Iloc'] = (370, 156)
57 ds['Bitcoin-Qt.app']['Iloc'] = (128, 156)
59 ds.flush()
60 ds.close()