Skip to content
This repository has been archived by the owner on Nov 10, 2019. It is now read-only.

Commit

Permalink
Merge branch 'release/v0.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Nunes committed Jun 12, 2016
2 parents 0f31408 + f302404 commit 2d00c7f
Show file tree
Hide file tree
Showing 30 changed files with 1,756 additions and 578 deletions.
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
miniconda3-3.19.0/envs/fomod-editor
miniconda3-3.19.0/envs/fomod-designer
20 changes: 18 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
# Changelog

0.4.0 (2016-05-14)
0.5.0 (2016-06-12)

* Added intro window.
* Added Files wizard.
* Added wizard environment setup.
* Updated app and file icons.
* The object box now consists of independent buttons for each child instead of a list.
* A message box asking for confirmation should now appear when trying to open a new installer while there unsaved changes.
* Property editor should now be properly cleared when opening a new installer.
* A message box asking for action should now appear when using the recent files menu and the path no longer exists.
* Fixed relation between view menu and docked widget states.
* Dialog windows should now properly be placed on top of other windows.
* Improved some nodes' names.

----------------------------------

0.4.1 (2016-05-16)

* Urgent bugfix:Fixed wrong default attributes in file and folder tags.
* Fixed wrong default attributes in file and folder tags.
* Added wizard framework.

----------------------------------
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# FOMOD Designer
[![Build status](https://ci.appveyor.com/api/projects/status/nep4id3ammekof68?svg=true)](https://ci.appveyor.com/project/GandaG/fomod-editor) [![Build Status](https://travis-ci.org/GandaG/fomod-editor.svg?branch=develop)](https://travis-ci.org/GandaG/fomod-editor)
[![Build status](https://ci.appveyor.com/api/projects/status/nep4id3ammekof68?svg=true)](https://ci.appveyor.com/project/GandaG/fomod-editor) [![Build Status](https://travis-ci.org/GandaG/fomod-designer.svg?branch=develop)](https://travis-ci.org/GandaG/fomod-designer)

*A visual editor to quickly create FOMOD installers for Nexus based mods.*

Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ deploy:
auth_token:
secure: iMaZrvVT+OI/9jRs8LyOvmzVqIBa0/jpiK96wNzZww/KqKsMcferhIeSK7faNzOo
artifact: windows_build
description: '[Changelog.](https://github.com/GandaG/fomod-editor/blob/master/CHANGELOG.md)'
description: '[Changelog.](https://github.com/GandaG/fomod-designer/blob/master/CHANGELOG.md)'
force_update: true
on:
appveyor_repo_tag: true
appveyor_repo_tag: true
File renamed without changes.
5 changes: 2 additions & 3 deletions fomod/__main__.py → designer/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@
import sys
from PyQt5 import QtWidgets
from .exceptions import excepthook
from .gui import MainFrame
from .gui import IntroWindow


def main():
sys.excepthook = excepthook

app = QtWidgets.QApplication(sys.argv)
window = MainFrame()
window.show()
IntroWindow()
sys.exit(app.exec_())


Expand Down
51 changes: 38 additions & 13 deletions fomod/exceptions.py → designer/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@

from traceback import print_tb
from io import StringIO
from . import __version__
from os.path import join
from PyQt5.QtWidgets import QMessageBox
from PyQt5.QtGui import QPixmap
from . import __version__, cur_folder


def excepthook(exc_type, exc_value, tracebackobj):
Expand All @@ -26,11 +29,10 @@ def excepthook(exc_type, exc_value, tracebackobj):
:param exc_value: exception value
:param tracebackobj: traceback object
"""
from .gui import generic_errorbox

notice = (
"An unhandled exception occurred. Please report the problem"
" at <a href = https://github.com/GandaG/fomod-editor/issues>Github</a>,"
" at <a href = https://github.com/GandaG/fomod-designer/issues>Github</a>,"
" <a href = http://www.nexusmods.com/skyrim/?>Nexus</a> or"
" <a href = http://forum.step-project.com/index.php>STEP</a>.")
version_info = __version__
Expand All @@ -41,25 +43,42 @@ def excepthook(exc_type, exc_value, tracebackobj):
errmsg = 'Error information:\n\nVersion: {}\n{}: {}\n'.format(version_info, str(exc_type), str(exc_value))
sections = [errmsg, tbinfo]
msg = '\n'.join(sections)
generic_errorbox("Nobody Panic!", notice, msg)

errorbox = QMessageBox()
errorbox.setText(notice)
errorbox.setWindowTitle("Nobody Panic!")
errorbox.setDetailedText(msg)
errorbox.setIconPixmap(QPixmap(join(cur_folder, "resources/logos/logo_admin.png")))
errorbox.exec_()

class GenericError(Exception):

class DesignerError(Exception):
"""
Base class for all exceptions.
"""
def __init__(self):
self.title = "Generic Error"
self.detailed = ""
Exception.__init__(self, "Something happened...")


class MissingFileError(GenericError):
def __init__(self, file):
class MissingFileError(DesignerError):
"""
Exception raised when the export/import functions could not find a file/folder.
"""
def __init__(self, fname):
self.title = "I/O Error"
self.message = "{} is missing.".format(file.capitalize())
self.file = file
self.message = "{} is missing.".format(fname.capitalize())
self.file = fname
Exception.__init__(self, self.message)


class ParserError(GenericError):
class ParserError(DesignerError):
"""
Exception raised when the parser was unable to properly parse the file.
It tries to locate the line where the error occurred if lxml provides it.
"""
def __init__(self, msg):
self.title = "Parser Error"
if len(msg.split(",")) <= 2:
Expand All @@ -72,15 +91,21 @@ def __init__(self, msg):
Exception.__init__(self, self.msg)


class TagNotFound(GenericError):
class TagNotFound(DesignerError):
"""
Exception raised when the element factory did not match the element tag.
"""
def __init__(self, element):
self.title = "Tag Lookup Error"
self.message = "Tag {} at line {} could not be matched.".format(element.tag, element.sourceline)
Exception.__init__(self, self.message)


class BaseInstanceException(Exception):
def __init__(self, base):
"""
Exception raised when trying to instanced base classes (not meant to be used).
"""
def __init__(self, base_instance):
self.title = "Instance Error"
self.message = "{} is not meant to be instanced. A subclass should be used instead.".format(type(base))
self.message = "{} is not meant to be instanced. A subclass should be used instead.".format(type(base_instance))
Exception.__init__(self, self.message)
Loading

0 comments on commit 2d00c7f

Please sign in to comment.