Пример #1
0
def dataFilesLocation():
	dataPathExists=os.path.exists(paths.app_data_path(versionInfo.name))
	if globalVars.installed:
		paths.prepare_app_data_path(versionInfo.name)
	if not globalVars.installed and dataPathExists or globalVars.installed and dataPathExists:
		return paths.app_data_path(versionInfo.name)
	else:
		return paths.app_path()
Пример #2
0
def dataFilesLocation():
    dataPathExists = os.path.exists(paths.app_data_path(versionInfo.name))
    if globalVars.installed:
        paths.prepare_app_data_path(versionInfo.name)
    if not globalVars.installed and dataPathExists or globalVars.installed and dataPathExists:
        return paths.app_data_path(versionInfo.name)
    else:
        return paths.app_path()
Пример #3
0
def check_for_update():
    if not paths.is_frozen():
        return
    url = updater.find_update_url(application.update_url, application.version)
    if url is None:
        return
    new_path = os.path.join(paths.app_data_path(application.name), 'updates',
                            'update.zip')
    app_updater = updater.AutoUpdater(url,
                                      new_path,
                                      'bootstrap.exe',
                                      app_path=paths.app_path(),
                                      postexecute=paths.executable_path(),
                                      finish_callback=update_complete)
    d = question_dialog(
        parent=application.main_frame,
        caption=_("Update %s") % application.name,
        message=
        _("An update for %s is available, would you like to download and install it now?"
          ) % application.name,
        style=wx.YES | wx.NO | wx.ICON_WARNING)
    if d != wx.ID_YES:
        return logging.debug("User denied the update request!")
    logging.debug("User requested %s update.  Initialising update process." %
                  application.name)
    app_updater.start_update()
Пример #4
0
def _installOpenAlWin():
    appdata = winpaths.get_appdata()
    if not os.path.isfile(appdata + "\\alsoft.ini"):
        shutil.copyfile("other\\alsoft.ini", appdata + "\\alsoft.ini")
    fld = paths.app_data_path('openal')
    if not os.path.isfile(fld + "\\hrtf\\default-44100.mhr"):
        paths.ensure_path(fld + "\\hrtf")
        shutil.copyfile("other\\default-44100.mhr",
                        fld + "\\hrtf\\default-44100.mhr")
Пример #5
0
def data_path():
    if CURRENT_PACKAGING_MODE is PackagingMode.Installed:
        data_path = Path(path_finder.app_data_path(app.name))
    elif CURRENT_PACKAGING_MODE is PackagingMode.Portable:
        data_path = app_path("user-config")
    else:
        data_path = DATA_PATH_SOURCE
    if not data_path.exists():
        data_path.mkdir(parents=True, exist_ok=True)
    return data_path
Пример #6
0
def check_for_update():
 if not paths.is_frozen():
  return
 url = updater.find_update_url(application.update_url, application.version)
 if url is None:
  return
 new_path = os.path.join(paths.app_data_path(application.name), 'updates', 'update.zip')
 app_updater = updater.AutoUpdater(url, new_path, 'bootstrap.exe', app_path=paths.app_path(), postexecute=paths.executable_path(), finish_callback=update_complete)
 d = question_dialog(parent=application.main_frame, caption=_("Update %s") % application.name, message=_("An update for %s is available, would you like to download and install it now?") % application.name, style=wx.YES|wx.NO|wx.ICON_WARNING)
 if d!= wx.ID_YES:
  return logging.debug("User denied the update request!")
 logging.debug("User requested %s update.  Initialising update process." % application.name)
 app_updater.start_update()