예제 #1
0
파일: MainMenu.py 프로젝트: ycaihua/fofix
 def shown(self):
     self.engine.view.pushLayer(self.menu)
     shaders.checkIfEnabled()
     if not self.shownOnce:
         self.shownOnce = True
         if hasattr(sys, 'frozen'):
             # Check whether this is a release binary being run from an svn/git
             # working copy or whether this is an svn/git binary not being run
             # from an corresponding working copy.
             currentVcs, buildVcs = None, None
             if VFS.isdir('/gameroot/.git'):
                 currentVcs = 'git'
             elif VFS.isdir('/gameroot/src/.svn'):
                 currentVcs = 'Subversion'
             if 'git' in Version.version():
                 buildVcs = 'git'
             elif 'svn' in Version.version():
                 buildVcs = 'Subversion'
             if currentVcs != buildVcs:
                 if buildVcs is None:
                     msg = _('This binary release is being run from a %(currentVcs)s working copy. This is not the correct way to run FoFiX from %(currentVcs)s. Please see one of the following web pages to set your %(currentVcs)s working copy up correctly:') + \
                           '\n\nhttp://code.google.com/p/fofix/wiki/RunningUnderPython26' + \
                           '\nhttp://code.google.com/p/fofix/wiki/RequiredSourceModules'
                 else:
                     msg = _('This binary was built from a %(buildVcs)s working copy but is not running from one. The FoFiX Team will not provide any support whatsoever for this binary. Please see the following site for official binary releases:') + \
                           '\n\nhttp://code.google.com/p/fofix/'
                 Dialogs.showMessage(self.engine, msg % {'buildVcs': buildVcs, 'currentVcs': currentVcs})
예제 #2
0
 def shown(self):
     self.engine.view.pushLayer(self.menu)
     shaders.checkIfEnabled()
     if not self.shownOnce:
         self.shownOnce = True
         if hasattr(sys, 'frozen'):
             # Check whether this is a release binary being run from an svn/git
             # working copy or whether this is an svn/git binary not being run
             # from an corresponding working copy.
             currentVcs, buildVcs = None, None
             if VFS.isdir('/gameroot/.git'):
                 currentVcs = 'git'
             elif VFS.isdir('/gameroot/src/.svn'):
                 currentVcs = 'Subversion'
             if 'git' in Version.version():
                 buildVcs = 'git'
             elif 'svn' in Version.version():
                 buildVcs = 'Subversion'
             if currentVcs != buildVcs:
                 if buildVcs is None:
                     msg = _('This binary release is being run from a %(currentVcs)s working copy. This is not the correct way to run FoFiX from %(currentVcs)s. Please see one of the following web pages to set your %(currentVcs)s working copy up correctly:') + \
                           '\n\nhttp://code.google.com/p/fofix/wiki/RunningUnderPython26' + \
                           '\nhttp://code.google.com/p/fofix/wiki/RequiredSourceModules'
                 else:
                     msg = _('This binary was built from a %(buildVcs)s working copy but is not running from one. The FoFiX Team will not provide any support whatsoever for this binary. Please see the following site for official binary releases:') + \
                           '\n\nhttp://code.google.com/p/fofix/'
                 Dialogs.showMessage(self.engine, msg % {'buildVcs': buildVcs, 'currentVcs': currentVcs})
예제 #3
0
 def test_version(self):
     """Test the complete version format"""
     complete_version = Version.version()
     version_num = Version.versionNum()
     release = Version.revision()
     expected_version = "%s %s" % (version_num, release)
     self.assertEqual(complete_version, expected_version)
예제 #4
0
파일: setup.py 프로젝트: labdoyon/FoFix
 def run(self):
     xgettext_cmd = find_command('xgettext')
     potfile = os.path.join('..', 'data', 'po', 'messages.pot')
     self.spawn([
         xgettext_cmd, '--package-name=' +
         Version.PROGRAM_NAME, '--package-version=' +
         Version.version(), '--copyright-holder=FoFiX Team', '-o', potfile
     ] + ['-k' + funcname
          for funcname in self.FUNCNAMES] + glob.glob('*.py'))
예제 #5
0
파일: setup.py 프로젝트: sebastienD/fofix
 def run(self):
     py_files = glob_recursive('.', '*.py')
     xgettext_cmd = find_command('xgettext')
     potfile = os.path.join('data', 'po', 'messages.pot')
     self.spawn([
         xgettext_cmd, '--package-name=' +
         Version.PROGRAM_NAME, '--package-version=' + Version.version(),
         '--copyright-holder=FoFiX Team', ' --sort-output', '-o', potfile
     ] + ['-k' + funcname for funcname in self.FUNCNAMES] + py_files)
예제 #6
0
파일: setup.py 프로젝트: ME7ROPOLIS/fofix
 def run(self):
     xgettext_cmd = find_command('xgettext')
     potfile = os.path.join('..', 'data', 'po', 'messages.pot')
     self.spawn([xgettext_cmd,
       '--package-name='+Version.PROGRAM_NAME,
       '--package-version='+Version.version(),
       '--copyright-holder=FoFiX Team',
       '-o', potfile] +
      ['-k' + funcname for funcname in self.FUNCNAMES] +
       glob.glob('*.py'))
예제 #7
0
파일: setup.py 프로젝트: fofix/fofix
 def run(self):
     py_files = glob_recursive('.', '*.py')
     xgettext_cmd = find_command('xgettext')
     potfile = os.path.join('data', 'po', 'messages.pot')
     self.spawn([xgettext_cmd,
       '--package-name=' + Version.PROGRAM_NAME,
       '--package-version=' + Version.version(),
       '--copyright-holder=FoFiX Team',
       ' --sort-output',
       '-o', potfile] +
       ['-k' + funcname for funcname in self.FUNCNAMES] +
       py_files)
예제 #8
0
파일: setup.py 프로젝트: Wolferacing/fofix
 def run(self):
     xgettext_cmd = find_command("xgettext")
     potfile = os.path.join("..", "data", "po", "messages.pot")
     self.spawn(
         [
             xgettext_cmd,
             "--package-name=" + Version.PROGRAM_NAME,
             "--package-version=" + Version.version(),
             "--copyright-holder=FoFiX Team",
             "-o",
             potfile,
         ]
         + ["-k" + funcname for funcname in self.FUNCNAMES]
         + glob.glob("*.py")
     )
예제 #9
0
파일: Credits.py 프로젝트: ajs124/fofix
    def __init__(self, engine, songName = None):
        self.engine      = engine
        self.time        = 0.0
        self.offset      = 0.5 # akedrou - this seems to fix the delay issue, but I'm not sure why. Return here!
        self.speedDiv    = 20000.0
        self.speedDir    = 1.0
        self.doneList    = []
        self.themename = Config.get("coffee", "themename")

        nf = self.engine.data.font
        ns = 0.002
        bs = 0.001
        hs = 0.003
        c1 = (1, 1, .5, 1)
        c2 = (1, .75, 0, 1)
        self.text_size = nf.getLineSpacing(scale = hs)

        #akedrou - Translatable Strings:
        self.bank = {}
        self.bank['intro']      = [_("Frets on Fire X is a progression of MFH-mod,"),
                                   _("which was built on Alarian's mod,"),
                                   _("which was built on UltimateCoffee's Ultimate mod,"),
                                   _("which was built on RogueF's RF_mod 4.15,"),
                                   _("which was, of course, built on Frets on Fire 1.2.451,"),
                                   _("which was created by Unreal Voodoo")]
        self.bank['noOrder']    = [_("No particular order")]
        self.bank['accessOrder']= [_("In order of project commit access")]
        self.bank['coders']     = [_("Active Coders")]
        self.bank['otherCoding']= [_("Programming")]
        self.bank['graphics']   = [_("Graphic Design")]
        self.bank['3d']         = [_("3D Textures")]
        self.bank['logo']       = [_("FoFiX Logo Design")]
        self.bank['hollowmind'] = [_("Hollowmind Necks")]
        self.bank['themes']     = [_("Included Themes")]
        self.bank['shaders']    = [_("Shaders")]
        self.bank['sounds']     = [_("Sound Design")]
        self.bank['translators']= [_("Translators")]
        self.bank['honorary']   = [_("Honorary Credits")]
        self.bank['codeHonor']  = [_("Without whom this game would not exist")]
        self.bank['giveThanks'] = [_("Special Thanks to")]
        self.bank['community']  = [_("nwru and all of the community at fretsonfire.net")]
        self.bank['other']      = [_("Other Contributors:")]
        self.bank['tutorial']   = [_("Jurgen FoF tutorial inspired by adam02"),
                                   _("Drum test song tutorial by Heka"),
                                   _("Drum Rolls practice tutorial by venom426")]
        self.bank['disclaimer'] = [_("If you have contributed to this game and are not credited,"),
                                   _("please let us know what and when you contributed.")]
        self.bank['thanks']     = [_("Thank you for your contribution.")]
        self.bank['oversight']  = [_("Please keep in mind that it is not easy to trace down and"),
                                   _("credit every single person who contributed; if your name is"),
                                   _("not included, it was not meant to slight you."),
                                   _("It was an oversight.")]
        # evilynux - Theme strings
        self.bank['themeCreators'] = [_("%s theme credits:") % self.themename]
        self.bank['themeThanks']   = [_("%s theme specific thanks:") % self.themename]
        # Languages
        self.bank['french']        = [_("French")]
        self.bank['french90']      = [_("French (reform 1990)")]
        self.bank['german']        = [_("German")]
        self.bank['italian']       = [_("Italian")]
        self.bank['piglatin']      = [_("Pig Latin")]
        self.bank['portuguese-b']  = [_("Portuguese (Brazilian)")]
        self.bank['russian']       = [_("Russian")]
        self.bank['spanish']       = [_("Spanish")]
        self.bank['swedish']       = [_("Swedish")]

        self.videoLayer = False
        self.background = None

        vidSource = os.path.join(Version.dataPath(), 'themes', self.themename, \
                                 'menu', 'credits.ogv')
        if os.path.isfile(vidSource):
            try:
                self.vidPlayer = VideoLayer(self.engine, vidSource, mute = True, loop = True)
            except (IOError, VideoPlayerError):
                Log.error('Error loading credits video:')
            else:
                self.vidPlayer.play()
                self.engine.view.pushLayer(self.vidPlayer)
                self.videoLayer = True

        if not self.videoLayer and \
           not self.engine.loadImgDrawing(self, 'background', os.path.join('themes', self.themename, 'menu', 'credits.png')):
            self.background = None

        if not self.engine.loadImgDrawing(self, 'topLayer', os.path.join('themes', self.themename, 'menu', 'creditstop.png')):
            self.topLayer = None

        space = Text(nf, hs, c1, "center", " ")
        self.credits = [
          Picture(self.engine, "fofix_logo.png", .10),
          Text(nf, ns, c1, "center", "%s" % Version.version()), space]

        # evilynux: Main FoFiX credits (taken from CREDITS).
        self.parseText("CREDITS")
        self.credits.extend([space, space, space])
        # evilynux: Theme credits (taken from data/themes/<theme name>/CREDITS).
        self.parseText(os.path.join('data', 'themes', self.themename, 'CREDITS'))

        self.credits.extend( [
          space, space,
          Text(nf, ns, c1, "left",   _("Made with:")),
          Text(nf, ns, c2, "right",  "Python " + sys.version.split(' ')[0]),  #stump: the version that's actually in use
          Text(nf, bs, c2, "right",  "http://www.python.org"),
          space,
          Text(nf, ns, c2, "right",  "PyGame " + pygame.version.ver.replace('release', '')),  #stump: the version that's actually in use
          Text(nf, bs, c2, "right",  "http://www.pygame.org"),
          space,
          Text(nf, ns, c2, "right",  "PyOpenGL " + OpenGL.__version__), #evilynux: the version that's actually in use
          Text(nf, bs, c2, "right",  "http://pyopengl.sourceforge.net"),
          space,
          Text(nf, ns, c2, "right",  "Illusoft Collada module 0.3.159"),
          Text(nf, bs, c2, "right",  "http://colladablender.illusoft.com"),
          space,
          Text(nf, ns, c2, "right",  "MXM Python Midi Package 0.1.4"),
          Text(nf, bs, c2, "right",  "http://www.mxm.dk/products/public/pythonmidi"),
          space,
          space,
          Text(nf, bs, c1, "center", _("Source Code available under the GNU General Public License")),
          Text(nf, bs, c2, "center", "http://code.google.com/p/fofix"),
          space,
          space,
          Text(nf, bs, c1, "center", _("Copyright 2006, 2007 by Unreal Voodoo")),
          Text(nf, bs, c1, "center", _("Copyright 2008-2013 by Team FoFiX")),
          space,
          space
        ])
예제 #10
0
    def __init__(self, engine, songName = None):
        self.engine      = engine
        self.time        = 0.0
        self.offset      = 0.5 # akedrou - this seems to fix the delay issue, but I'm not sure why. Return here!
        self.speedDiv    = 20000.0
        self.speedDir    = 1.0
        self.doneList    = []
        self.themename = Config.get("coffee", "themename")

        nf = self.engine.data.font
        ns = 0.002
        bs = 0.001
        hs = 0.003
        c1 = (1, 1, .5, 1)
        c2 = (1, .75, 0, 1)
        self.text_size = nf.getLineSpacing(scale = hs)

        #akedrou - Translatable Strings:
        self.bank = {}
        self.bank['intro']      = [_("Frets on Fire X is a progression of MFH-mod,"),
                                   _("which was built on Alarian's mod,"),
                                   _("which was built on UltimateCoffee's Ultimate mod,"),
                                   _("which was built on RogueF's RF_mod 4.15,"),
                                   _("which was, of course, built on Frets on Fire 1.2.451,"),
                                   _("which was created by Unreal Voodoo")]
        self.bank['noOrder']    = [_("No particular order")]
        self.bank['accessOrder']= [_("In order of project commit access")]
        self.bank['coders']     = [_("Active Coders")]
        self.bank['otherCoding']= [_("Programming")]
        self.bank['graphics']   = [_("Graphic Design")]
        self.bank['3d']         = [_("3D Textures")]
        self.bank['logo']       = [_("FoFiX Logo Design")]
        self.bank['hollowmind'] = [_("Hollowmind Necks")]
        self.bank['themes']     = [_("Included Themes")]
        self.bank['shaders']    = [_("Shaders")]
        self.bank['sounds']     = [_("Sound Design")]
        self.bank['translators']= [_("Translators")]
        self.bank['honorary']   = [_("Honorary Credits")]
        self.bank['codeHonor']  = [_("Without whom this game would not exist")]
        self.bank['giveThanks'] = [_("Special Thanks to")]
        self.bank['community']  = [_("nwru and all of the community at fretsonfire.net")]
        self.bank['other']      = [_("Other Contributors:")]
        self.bank['tutorial']   = [_("Jurgen FoF tutorial inspired by adam02"),
                                   _("Drum test song tutorial by Heka"),
                                   _("Drum Rolls practice tutorial by venom426")]
        self.bank['disclaimer'] = [_("If you have contributed to this game and are not credited,"),
                                   _("please let us know what and when you contributed.")]
        self.bank['thanks']     = [_("Thank you for your contribution.")]
        self.bank['oversight']  = [_("Please keep in mind that it is not easy to trace down and"),
                                   _("credit every single person who contributed; if your name is"),
                                   _("not included, it was not meant to slight you."),
                                   _("It was an oversight.")]
        # evilynux - Theme strings
        self.bank['themeCreators'] = [_("%s theme credits:") % self.themename]
        self.bank['themeThanks']   = [_("%s theme specific thanks:") % self.themename]
        # Languages
        self.bank['french']        = [_("French")]
        self.bank['french90']      = [_("French (reform 1990)")]
        self.bank['german']        = [_("German")]
        self.bank['italian']       = [_("Italian")]
        self.bank['piglatin']      = [_("Pig Latin")]
        self.bank['portuguese-b']  = [_("Portuguese (Brazilian)")]
        self.bank['russian']       = [_("Russian")]
        self.bank['spanish']       = [_("Spanish")]
        self.bank['swedish']       = [_("Swedish")]

        self.videoLayer = False
        self.background = None

        vidSource = os.path.join(Version.dataPath(), 'themes', self.themename,
                                 'menu', 'credits.ogv')
        if os.path.isfile(vidSource):
            try:
                self.vidPlayer = VideoLayer(self.engine, vidSource, mute = True, loop = True)
            except (IOError, VideoPlayerError):
                Log.error('Error loading credits video:')
            else:
                self.vidPlayer.play()
                self.engine.view.pushLayer(self.vidPlayer)
                self.videoLayer = True

        if not self.videoLayer and \
           not self.engine.loadImgDrawing(self, 'background', os.path.join('themes', self.themename, 'menu', 'credits.png')):
            self.background = None

        if not self.engine.loadImgDrawing(self, 'topLayer', os.path.join('themes', self.themename, 'menu', 'creditstop.png')):
            self.topLayer = None

        space = Text(nf, hs, c1, "center", " ")
        self.credits = [
          Picture(self.engine, "fofix_logo.png", .10),
          Text(nf, ns, c1, "center", "%s" % Version.version()), space]

        # evilynux: Main FoFiX credits (taken from CREDITS).
        self.parseText("CREDITS")
        self.credits.extend([space, space, space])
        # evilynux: Theme credits (taken from data/themes/<theme name>/CREDITS).
        self.parseText(os.path.join('data', 'themes', self.themename, 'CREDITS'))

        self.credits.extend( [
          space, space,
          Text(nf, ns, c1, "left",   _("Made with:")),
          Text(nf, ns, c2, "right",  "Python " + sys.version.split(' ')[0]),  #stump: the version that's actually in use
          Text(nf, bs, c2, "right",  "http://www.python.org"),
          space,
          Text(nf, ns, c2, "right",  "PyGame " + pygame.version.ver.replace('release', '')),  #stump: the version that's actually in use
          Text(nf, bs, c2, "right",  "http://www.pygame.org"),
          space,
          Text(nf, ns, c2, "right",  "PyOpenGL " + OpenGL.__version__), #evilynux: the version that's actually in use
          Text(nf, bs, c2, "right",  "http://pyopengl.sourceforge.net"),
          space,
          Text(nf, ns, c2, "right",  "Illusoft Collada module 0.3.159"),
          Text(nf, bs, c2, "right",  "http://colladablender.illusoft.com"),
          space,
          Text(nf, ns, c2, "right",  "MXM Python Midi Package 0.1.4"),
          Text(nf, bs, c2, "right",  "http://www.mxm.dk/products/public/pythonmidi"),
          space,
          space,
          Text(nf, bs, c1, "center", _("Source Code available under the GNU General Public License")),
          Text(nf, bs, c2, "center", "http://code.google.com/p/fofix"),
          space,
          space,
          Text(nf, bs, c1, "center", _("Copyright 2006, 2007 by Unreal Voodoo")),
          Text(nf, bs, c1, "center", _("Copyright 2008-2013 by Team FoFiX")),
          space,
          space
        ])
예제 #11
0
    except (KeyboardInterrupt, SystemExit):
        raise
    except:
        log.error("Terminating due to unhandled exception: ")
        _logname = os.path.abspath(log.logFile.name)
        _errmsg = "%s\n\n%s\n%s\n%s\n%s" % (
            _("Terminating due to unhandled exception:"),
            traceback.format_exc(),
            _("If you make a bug report about this error, please include the contents of the following log file:"
              ), _logname,
            _("The log file already includes the traceback given above."))

        if os.name == 'nt':
            # If we move to PySDL2 we can replace this with a call to SDL_ShowSimpleMessageBox
            import win32api
            import win32con
            if win32api.MessageBox(
                    0, "%s\n\n%s" % (_errmsg, _("Open the logfile now?")),
                    "%s %s" % (Version.PROGRAM_NAME, Version.version()),
                    win32con.MB_YESNO
                    | win32con.MB_ICONSTOP) == win32con.IDYES:
                log.logFile.close()
                os.startfile(_logname)
            if hasattr(sys, 'frozen'):
                sys.exit(
                    1
                )  # don't reraise if py2exe'd so the "Errors occurred" box won't appear after this and confuse the user as to which logfile we actually want
        else:
            print >> sys.stderr, _errmsg
        raise
예제 #12
0
파일: setup.py 프로젝트: Wolferacing/fofix
                        "icon_resources": [(1, "./win32/fofix.ico")],
                        "other_resources": [
                            (
                                RT_VERSION,
                                1,
                                VersionResource(
                                    # stump: the parameter below must consist only of up to four numerical fields separated by dots
                                    Version.versionNum(),
                                    file_description="Frets on Fire X",
                                    legal_copyright=r"© 2008-2013 FoFiX Team.  GNU GPL v2 or later.",
                                    company_name="FoFiX Team",
                                    internal_name="FoFiX.exe",
                                    original_filename="FoFiX.exe",
                                    product_name=Version.PROGRAM_NAME,
                                    # stump: when run from the exe, FoFiX will claim to be "FoFiX v" + product_version
                                    product_version=Version.version(),
                                ).resource_bytes(),
                            )
                        ],
                    }
                ],
            }
        )
elif sys.platform == "darwin":
    try:
        import py2app
    except ImportError:
        if "py2app" in sys.argv:
            sys.stderr.write("py2app must be installed to create .app bundles.\n")
            sys.exit(1)
예제 #13
0
from fofix.core.Shader import shaders
from fofix.core.Image import drawImage
from fofix.core import cmgl
from fofix.core import Config
from fofix.core import ConfigDefs
from fofix.core import Version
from fofix.core import Player
from fofix.core import Mod
from fofix.game import Dialogs
from fofix.game.World import World
from fofix.game.Debug import DebugLayer

log = logging.getLogger(__name__)

# evilynux - Grab name and version from Version class.
version = "%s v%s" % (Version.PROGRAM_NAME, Version.version())


def _init_allthemes():
    """ Alarian: Get unlimited themes by foldername """
    # this global code is in a function to hide vars from rest of file

    themepath = os.path.join(Version.dataPath(), "themes")
    themes = []
    defaultTheme = None  #myfingershurt
    allthemes = os.listdir(themepath)
    for name in allthemes:
        if os.path.exists(os.path.join(themepath, name, "notes", "notes.png")):
            themes.append(name)
            if name == "MegaLight V4":
                defaultTheme = name
예제 #14
0
from fofix.core.Task import TaskEngine

from fofix.core import cmgl
from fofix.core import Config
from fofix.core import ConfigDefs
from fofix.core import Version
from fofix.core import Player
from fofix.core import Log
from fofix.core import Mod
from fofix.game import Dialogs

from fofix.game.World import World
from fofix.game.Debug import DebugLayer

# evilynux - Grab name and version from Version class.
version = "%s v%s" % ( Version.PROGRAM_NAME, Version.version() )

##Alarian: Get unlimited themes by foldername
themepath = os.path.join(Version.dataPath(), "themes")
themes = []
defaultTheme = None           #myfingershurt
allthemes = os.listdir(themepath)
for name in allthemes:
    if os.path.exists(os.path.join(themepath,name,"notes","notes.png")):
        themes.append(name)
        if name == "MegaLight V4":
            defaultTheme = name

i = len(themes)
if i == 0:
    if os.name == 'posix':
예제 #15
0
        while True:
            main = Main()
            main.run()
            if not main.restartRequested:
                break

    except (KeyboardInterrupt, SystemExit):
        raise
    except:
        log.error("Terminating due to unhandled exception: ")
        _logname = os.path.abspath(log.logFile.name)
        _errmsg = "%s\n\n%s\n%s\n%s\n%s" % (
          _("Terminating due to unhandled exception:"),
          traceback.format_exc(),
          _("If you make a bug report about this error, please include the contents of the following log file:"),
          _logname,
          _("The log file already includes the traceback given above."))

        if os.name == 'nt':
            # If we move to PySDL2 we can replace this with a call to SDL_ShowSimpleMessageBox
            import win32api
            import win32con
            if win32api.MessageBox(0, "%s\n\n%s" % (_errmsg, _("Open the logfile now?")), "%s %s" % (Version.PROGRAM_NAME, Version.version()), win32con.MB_YESNO|win32con.MB_ICONSTOP) == win32con.IDYES:
                log.logFile.close()
                os.startfile(_logname)
            if hasattr(sys, 'frozen'):
                sys.exit(1)  # don't reraise if py2exe'd so the "Errors occurred" box won't appear after this and confuse the user as to which logfile we actually want
        else:
            print >>sys.stderr, _errmsg
        raise
예제 #16
0
파일: setup.py 프로젝트: okonech/fofix
            'zipfile': "data/library.zip",
            'windows': [
                {
                    "script":          "FoFiX.py",
                    "icon_resources":  [(1, "./win32/fofix.ico")],
                    "other_resources": [(RT_VERSION, 1, VersionResource(
                        # the parameter below must consist only of up to four numerical fields separated by dots
                        Version.versionNum(),
                        file_description="Frets on Fire X",
                        legal_copyright=r"© 2008-2013 FoFiX Team.  GNU GPL v2 or later.",
                        company_name="FoFiX Team",
                        internal_name="FoFiX.exe",
                        original_filename="FoFiX.exe",
                        product_name=Version.PROGRAM_NAME,
                        # when run from the exe, FoFiX will claim to be "FoFiX v" + product_version
                        product_version=Version.version()
                        ).resource_bytes())]
                }
            ],
            'data_files': data_files
        })
elif sys.platform == 'darwin':
    try:
        import py2app
    except ImportError:
        if 'py2app' in sys.argv:
            sys.stderr.write('py2app must be installed to create .app bundles.\n')
            sys.exit(1)

    setup_args.update({
      'app': ['FoFiX.py'],
예제 #17
0
파일: FoFiX.py 프로젝트: Linkid/fofix
            _("Terminating due to unhandled exception:"),
            traceback.format_exc(),
            _("If you make a bug report about this error, please include the contents of the following log file:"),
            _logname,
            _("The log file already includes the traceback given above."),
        )

        if os.name == "nt":
            # If we move to PySDL2 we can replace this with a call to SDL_ShowSimpleMessageBox
            import win32api
            import win32con

            if (
                win32api.MessageBox(
                    0,
                    "%s\n\n%s" % (_errmsg, _("Open the logfile now?")),
                    "%s %s" % (Version.PROGRAM_NAME, Version.version()),
                    win32con.MB_YESNO | win32con.MB_ICONSTOP,
                )
                == win32con.IDYES
            ):
                Log.logFile.close()
                os.startfile(_logname)
            if hasattr(sys, "frozen"):
                sys.exit(
                    1
                )  # don't reraise if py2exe'd so the "Errors occurred" box won't appear after this and confuse the user as to which logfile we actually want
        else:
            print >>sys.stderr, _errmsg
        raise
예제 #18
0
파일: setup.py 프로젝트: fofix/fofix
            'zipfile': "data/library.zip",
            'windows': [
                {
                    "script":          "FoFiX.py",
                    "icon_resources":  [(1, "./win32/fofix.ico")],
                    "other_resources": [(RT_VERSION, 1, VersionResource(
                        # the parameter below must consist only of up to four numerical fields separated by dots
                        Version.versionNum(),
                        file_description="Frets on Fire X",
                        legal_copyright=r"© 2008-2013 FoFiX Team.  GNU GPL v2 or later.",
                        company_name="FoFiX Team",
                        internal_name="FoFiX.exe",
                        original_filename="FoFiX.exe",
                        product_name=Version.PROGRAM_NAME,
                        # when run from the exe, FoFiX will claim to be "FoFiX v" + product_version
                        product_version=Version.version()
                        ).resource_bytes())]
                }
            ],
            'data_files': data_files
        })
elif sys.platform == 'darwin':
    try:
        import py2app
    except ImportError:
        if 'py2app' in sys.argv:
            sys.stderr.write('py2app must be installed to create .app bundles.\n')
            sys.exit(1)

    setup_args.update({
      'app': ['FoFiX.py'],
예제 #19
0
파일: setup.py 프로젝트: labdoyon/FoFix
                "icon_resources": [(1, "./win32/fofix.ico")],
                "other_resources": [(
                    RT_VERSION,
                    1,
                    VersionResource(
                        #stump: the parameter below must consist only of up to four numerical fields separated by dots
                        Version.versionNum(),
                        file_description="Frets on Fire X",
                        legal_copyright=
                        r"© 2008-2013 FoFiX Team.  GNU GPL v2 or later.",
                        company_name="FoFiX Team",
                        internal_name="FoFiX.exe",
                        original_filename="FoFiX.exe",
                        product_name=Version.PROGRAM_NAME,
                        #stump: when run from the exe, FoFiX will claim to be "FoFiX v" + product_version
                        product_version=Version.version()).resource_bytes())]
            }]
        })
elif sys.platform == 'darwin':
    try:
        import py2app
    except ImportError:
        if 'py2app' in sys.argv:
            print >> sys.stderr, 'py2app must be installed to create .app bundles.'
            sys.exit(1)

    setup_args.update({
        'app': ['FoFiX.py'],
        'data_files': [
            (".", [
                "./AUTHORS", "./COPYING", "./CREDITS", "./CHANGELOG",