fix more mac things

This commit is contained in:
Headshot 2021-02-14 21:50:22 -04:30
parent be4206d835
commit 1669d26e14
2 changed files with 50 additions and 1 deletions

View File

@ -7,6 +7,10 @@ osname = platform.system()
bassdll = "bass.dll"
if osname != "Windows":
bassdll = "libbass.so"
if osname == "Darwin" and ".app" in __file__: # bundle
path = "/".join(__file__.split("/")[:-4])
sys.stderr.write(path)
os.chdir(path)
debugmode = len(sys.argv) > 1 and sys.argv[1] == "debug"
if not debugmode:
@ -67,7 +71,7 @@ if not debugmode:
from pybass import *
import gameview, mainmenu, options, ini
BASS_Init(ini.read_ini_int("base/AO2XP.ini", "Audio", "device", -1), 44100, 0, 0, 0)
BASS_Init(ini.read_ini_int("AO2XP.ini", "Audio", "device", -1), 44100, 0, 0, 0)
BASS_PluginLoad("bassopus", 0)
shit = gamewindow()
shit.show()

45
setup_mac.py Normal file
View File

@ -0,0 +1,45 @@
"""
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
APP = ['AO2XP.py']
DATA_FILES = []
OPTIONS = dict(
includes = [
"zlib",
"sip",
"PyQt4",
"PyQt4._qt",
"PyQt4.QtCore",
"PyQt4.QtGui",
],
excludes = [
"PyQt4.QtDesigner",
"PyQt4.QtNetwork",
"PyQt4.QtOpenGL",
"PyQt4.QtScript",
"PyQt4.QtSql",
"PyQt4.QtTest",
"PyQt4.QtWebKit",
"PyQt4.QtXml",
"PyQt4.phonon",
],
packages = [
],
argv_emulation = False
)
setup(
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)