add AO2XP_linux.spec and fix error on linux
This commit is contained in:
parent
7809aa3df7
commit
72c8c926b4
27
AO2XP_linux.spec
Normal file
27
AO2XP_linux.spec
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# -*- mode: python -*-
|
||||||
|
|
||||||
|
block_cipher = None
|
||||||
|
|
||||||
|
|
||||||
|
a = Analysis(['AO2XP.py'],
|
||||||
|
pathex=['.'],
|
||||||
|
binaries=[("libbass.so", ".")],
|
||||||
|
datas=None,
|
||||||
|
hiddenimports=[],
|
||||||
|
hookspath=[],
|
||||||
|
runtime_hooks=[],
|
||||||
|
excludes=[],
|
||||||
|
win_no_prefer_redirects=False,
|
||||||
|
win_private_assemblies=False,
|
||||||
|
cipher=block_cipher)
|
||||||
|
pyz = PYZ(a.pure, a.zipped_data,
|
||||||
|
cipher=block_cipher)
|
||||||
|
exe = EXE(pyz,
|
||||||
|
a.scripts,
|
||||||
|
a.binaries,
|
||||||
|
a.zipfiles,
|
||||||
|
a.datas,
|
||||||
|
name='AO2XP',
|
||||||
|
debug=False,
|
||||||
|
strip=False,
|
||||||
|
upx=True)
|
10
hardware.py
10
hardware.py
@ -1,9 +1,9 @@
|
|||||||
import platform
|
import platform, os
|
||||||
|
|
||||||
def get_hdid():
|
def get_hdid():
|
||||||
os = platform.system()
|
osname = platform.system()
|
||||||
|
|
||||||
if os == "Windows": # what a mess...
|
if osname == "Windows": # what a mess...
|
||||||
import _winreg
|
import _winreg
|
||||||
registry = getattr(_winreg, "\x48\x4b\x45\x59\x5f\x4c\x4f\x43\x41\x4c\x5f\x4d\x41\x43\x48\x49\x4e\x45")
|
registry = getattr(_winreg, "\x48\x4b\x45\x59\x5f\x4c\x4f\x43\x41\x4c\x5f\x4d\x41\x43\x48\x49\x4e\x45")
|
||||||
address = "\x53\x4f\x46\x54\x57\x41\x52\x45\x5c\x4d\x69\x63\x72\x6f\x73\x6f\x66\x74\x5c\x43\x72\x79\x70\x74\x6f\x67\x72\x61\x70\x68\x79"
|
address = "\x53\x4f\x46\x54\x57\x41\x52\x45\x5c\x4d\x69\x63\x72\x6f\x73\x6f\x66\x74\x5c\x43\x72\x79\x70\x74\x6f\x67\x72\x61\x70\x68\x79"
|
||||||
@ -13,10 +13,10 @@ def get_hdid():
|
|||||||
_winreg.CloseKey(key)
|
_winreg.CloseKey(key)
|
||||||
return value[0]
|
return value[0]
|
||||||
|
|
||||||
elif os == "Linux":
|
elif osname == "Linux":
|
||||||
return os.popen("cat /var/lib/dbus/machine-id").read().rstrip()
|
return os.popen("cat /var/lib/dbus/machine-id").read().rstrip()
|
||||||
|
|
||||||
elif os == "Darwin": # https://gist.github.com/erikng/46646ff81e55b42e5cfc
|
elif osname == "Darwin": # https://gist.github.com/erikng/46646ff81e55b42e5cfc
|
||||||
import objc
|
import objc
|
||||||
from Foundation import NSBundle
|
from Foundation import NSBundle
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user