Open mecwerks opened 10 years ago
Its easy to build, you just need to configure python, and install C compiler for building C modules used in FoFix. then run build this modules to pyd and then you ready to go, just launch it from FoFix.py
I don't think anyone on the project has had access to a mac since the 3.120 days. And since then we've added compiled extensions.
However I can throw a list of stuff that might be able to put you in the right direction.
Your going to need the things located here including Xcode: https://github.com/fofix/fofix#installing-required-packages
You also need python 2.7/2.6 i doubt whatever comes with os x will work.
If you download the windows dependency package there is a list of url's for the development librarys and such are used on windows. Link: https://code.google.com/p/fofix/downloads/detail?name=fofix-win32-deppack-20130304.zip
Once you manage to have all of that set up just run: python setup.py build_ext --inplace --force
That should compile the c extension modules, once that's done just run FoFiX.py with python and it should work.
Hope it helps, report any issues you find.
Alright thanks, i will take a further look into this soon. Hopefully all goes well and i can help you guys out some.
I don't think there is a specific icon for mac. There is fofix_icon.png in the data folder.
You shouldn't need an icon to run from sources though.
All built and runs fine when i run ./FoFix.py
I also ran the py2app build and ran the program and got this error:
Traceback (most recent call last):
File "/Users/marcus/dev/fofix/dist/FoFiX.app/Contents/Resources/boot.py", line 355, in
Any ideas?
To me it looks like possibly the data directory doesn't get correctly copied into .app.
because the line that crash is from, its trying to get something from the data directory.
Maybe download 3.120 and see if putting the data directory like how it had it arranged there would work.
It's copied into FoFiX.app/Contents/Resources/data just like the 3.120 release. It's weird because running ./FoFiX.py works. The problem occurs when running ./FoFiX.app/Contents/MacOS/FoFiX
If i comment out VFS.mount(VFS.resolveRead('/data/users'), 'users') in Players.py the game loads but after selecting the keyboard config it crashes with this error "ImportError: No module named SongChoosingScene".
Still not sure why VFS.mount(VFS.resolveRead('/data/users'), 'users') errors. But why isn't SongChoosingScene found?
Care to give a more detailed traceback on that? I'm thinking it could be VFS related since that has been introduced since the 3.120 release.
Also i might have a theory as to why the second issue comes up. It might have been something i did by accident.
The traceback without VFS.mount commented out is above. The traceback for the SongChoosingScene (i can supply the crash log if necessary):
Traceback (most recent call last):
File "/Users/marcus/dev/fofix/dist/FoFiX.app/Contents/Resources/__boot__.py", line 355, in <module>
_run()
File "/Users/marcus/dev/fofix/dist/FoFiX.app/Contents/Resources/__boot__.py", line 322, in _run
exec(compile(source, path, 'exec'), globals(), globals())
File "/Users/marcus/dev/fofix/dist/FoFiX.app/Contents/Resources/FoFiX.py", line 277, in <module>
main()
File "/Users/marcus/dev/fofix/dist/FoFiX.app/Contents/Resources/FoFiX.py", line 232, in main
while engine.run():
File "core/GameEngine.pyc", line 786, in run
File "core/GameEngine.pyc", line 753, in main
File "core/GameEngine.pyc", line 778, in doRun
File "core/GameEngine.pyc", line 748, in _runTask
File "core/Input.pyc", line 318, in run
File "core/Input.pyc", line 229, in broadcastEvent
File "views/MainMenu/Lobby.pyc", line 344, in keyPressed
File "game/World.pyc", line 89, in startGame
File "game/World.pyc", line 127, in createScene
File "views/SceneFactory.pyc", line 36, in create
File "importlib/__init__.pyc", line 37, in import_module
ImportError: No module named SongChoosingScene
2014-01-08 20:15:49.523 FoFiX[3506:507] FoFiX Error
I just noticed when py2app is running this shows up:
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/modulegraph/find_modules.py:188: UserWarning: No module named GuitarResultsScene
warn("No module named %s"%(mod,))
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/modulegraph/find_modules.py:188: UserWarning: No module named GuitarScene
warn("No module named %s"%(mod,))
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/modulegraph/find_modules.py:188: UserWarning: No module named SongChoosingScene
warn("No module named %s"%(mod,))
Yeah confirms my thought. Let me try a fix really quick.
Alright
Hmm windows builds are even broke atm. Im looking into fixing it.
Okay, if needed for anything i can build and test on Mac, Windows, and Linux.
So i know what caused the issue. Since nhydock moved files into packages, the scenes aren't being found while building.
Ahh, I see. Do you think this is also causing the VFS.mount error?
I doubt it. So i think it might actually be an issue with py2exe/py2app.
Do you know what version of py2app was used with 3.120?
Well see the cause of this issue is because recently the entire game was reorganized into packages. Basically there is a system in the game that dynamically imports certain parts of the game, and we had to manually tell py2exe and py2app where those files were located. Its not working correctly with packages.
Gotcha, let me know if theres anything i can help with, I'm trying to change a few things to see if i can get it to work myself. Also are you guys planning on a new release anytime soon? Would love to help bring the project 'back to life'.
thought this worked:
scenes = [
n.replace(".py", "") for n in glob.glob("*/*Scene.py")
]
but it still failed once the game started.
I've got something sorta working, i just need to do some more tests on it.
alright, if you can push it to a temporary branch i can test the changes as well.
Well the fix i did works, but now there is another issue, this time with extensions not being included. So the game crashes when built.
i had the same error. I fixed it with adding this at the top of setup.py right under from Cython.Distutils:
from distutils.extension import Extension as _Extension
from setuptools import setup
distutils.extension.Extension = _Extension
distutils.command.build_ext.Extension = _Extension
Except that would add in setuptools as a dependency.
Is there another way to fix this then? That was just what i had found.
Im looking into it
After running i see no further errors past the build extension and VFS.mount failures.
Ok some news on this front. I may be buying a macbook pro here in the next month from a friend. So if that works out i should be able to look into any issues on the mac side of things and get those resolved easier.
I own a Mac, and managed to build from source (dependencies installed via brew) i should be able to do some more tests soon
Yeah the game will run from sources, and most everything works. The only issue that I know of right now is that building a packaged version with py2app is still broken (otherwise I would have closed this already)
What are the brew packages you installed @fculpo ? Do you have a list somewhere?
I tried installing dependencies and compiling from source to help write the mac build instructions but i cannot figure out how to get it to build. I can do testing on mac. My computer is running 10.9