Skip to content
This repository has been archived by the owner on Sep 29, 2021. It is now read-only.

Commit

Permalink
merge version into a single variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Correct-Syntax committed Jul 17, 2020
1 parent 0392d99 commit 73afade
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 43 deletions.
3 changes: 1 addition & 2 deletions src/GimelStudio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from GimelStudio.meta import (__NAME__, __AUTHOR__, __VERSION__,
__BUILD__, __RELEASE__, __DEBUG__,
__TITLE__)
__DEBUG__, __TITLE__)

3 changes: 1 addition & 2 deletions src/GimelStudio/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
# directly accessed by the API users

from GimelStudio.meta import (__NAME__, __AUTHOR__, __VERSION__,
__BUILD__, __RELEASE__, __DEBUG__,
__TITLE__)
__DEBUG__, __TITLE__)

from GimelStudio.utils import ConvertImageToWx, DrawGrid
from GimelStudio.datatypes import Color, RenderImage, List
Expand Down
16 changes: 4 additions & 12 deletions src/GimelStudio/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
import wx.lib.agw.aui as aui

from GimelStudio.meta import (__NAME__, __AUTHOR__, __VERSION__,
__BUILD__, __RELEASE__, __DEBUG__,
__TITLE__)
__DEBUG__, __TITLE__)

from GimelStudio.project import GimelStudioProject
from GimelStudio.renderer import Renderer
Expand Down Expand Up @@ -64,15 +63,8 @@ def __init__(self, arguments):
self.SetIcon(ICON_GIMELSTUDIO_ICO.GetIcon())

# Init project, renderer and user preferences manager
self._project = GimelStudioProject(
self,
__VERSION__,
__BUILD__,
__RELEASE__
)
self._renderer = Renderer(
self
)
self._project = GimelStudioProject(self)
self._renderer = Renderer(self)
# self._userprefmanager = UserPreferencesManager(
# self
# )
Expand Down Expand Up @@ -533,4 +525,4 @@ def RestartProgram(self, new_args):
Restart the program so that the node registry is refreshed.
"""
python = sys.executable
os.execl(python, python, *newArgs)
os.execl(python, python, *newArgs)
16 changes: 5 additions & 11 deletions src/GimelStudio/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,14 @@
# Program author
__AUTHOR__ = "Noah Rahm, Correct Syntax"

# Release version: [major].[minor]
__VERSION__ = "0.3"

# Release number
__RELEASE__ = "0"

# Build number
__BUILD__ = "1"
# Release version: [major].[minor].[build]
__VERSION__ = "0.3.0"

# Whether this program is in development mode
# USAGE: Switch to False before building as .exe or similar package to
# enable some end-user features that would otherwise hinder development
# and/or testing of the program.
# enable/disable some end-user features that would otherwise hinder
# development and/or testing of the program.
__DEBUG__ = False

# Title string
__TITLE__ = '{0} v{1}.{2}'.format(__NAME__, __VERSION__, __RELEASE__)
__TITLE__ = '{0} v{1}'.format(__NAME__, __VERSION__)
7 changes: 2 additions & 5 deletions src/GimelStudio/program/about_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
import wx
from wx.lib.wordwrap import wordwrap

from GimelStudio.meta import (__NAME__, __AUTHOR__, __VERSION__,
__BUILD__, __RELEASE__, __TITLE__)
from GimelStudio.meta import (__NAME__, __AUTHOR__, __VERSION__, __TITLE__)


class AboutGimelStudioDialog(object):
Expand All @@ -35,16 +34,14 @@ def __init__(self, parent):
self._title = __TITLE__
self._author = __AUTHOR__
self._version = __VERSION__
self._build = __BUILD__
self._release = __RELEASE__
self._pillowVersion = PIL.__version__
self._wxPythonVersion = wx.VERSION_STRING
self._pythonVersion = sys.version.split()[0]

def ShowDialog(self):
info = wx.adv.AboutDialogInfo()
info.SetName(self._name)
info.SetVersion("v{0}.{1}".format(self._version, self._release))
info.SetVersion("v{0}".format(self._version))
info.SetCopyright("© 2020 {}. All rights reserved.".format(self._author))
info.SetDescription(
wordwrap(
Expand Down
7 changes: 3 additions & 4 deletions src/GimelStudio/program/license_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
import wx
import wx.lib.dialogs

from GimelStudio.meta import (__NAME__, __AUTHOR__, __VERSION__,
__BUILD__, __RELEASE__, __TITLE__)
from GimelStudio.meta import (__NAME__, __AUTHOR__, __VERSION__, __TITLE__)

class GimelStudioLicenseDialog(object):
def __init__(self, parent):
Expand All @@ -32,7 +31,7 @@ def ShowDialog(self):
LICENSE = """
Gimel Studio © 2020 Noah Rahm, Correct Syntax. All rights reserved.
IMPORTANT - PLEASE READ BEFORE COPYING, INSTALLING OR USING GIMEL STUDIO VERSION {0}.{1}
IMPORTANT - PLEASE READ BEFORE COPYING, INSTALLING OR USING GIMEL STUDIO VERSION {0}
Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -236,7 +235,7 @@ def ShowDialog(self):
See the License for the specific language governing permissions and
limitations under the License.
""".format(__VERSION__, __RELEASE__)
""".format(__VERSION__)

dlg = wx.lib.dialogs.ScrolledMessageDialog(
self._parent,
Expand Down
12 changes: 5 additions & 7 deletions src/GimelStudio/project/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
import wx

from GimelStudio.meta import (__NAME__, __AUTHOR__, __VERSION__,
__BUILD__, __RELEASE__, __DEBUG__,
__TITLE__)
__DEBUG__, __TITLE__)

DEFAULT_PROJECT = {
"nodes": {
Expand All @@ -46,19 +45,18 @@
},
"meta": {
"content": "Gimel Studio project file",
"version": "{}.{}".format(__VERSION__, __RELEASE__)
"version": __VERSION__,
},
"ui": {
}
}


class GimelStudioProject(object):
def __init__(self, parent, version, build, release):
def __init__(self, parent):
self._parent = parent
self._version = version
self._build = build
self._release = release
self._version = __VERSION__

#self._nodes = {}
#self._projectData = {}

Expand Down

0 comments on commit 73afade

Please sign in to comment.