Skip to content

Commit

Permalink
Merge branch 'hotfix/3.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
CSec0ps committed May 6, 2020
2 parents 3c2ddb6 + 29dfe29 commit 181c768
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 12 deletions.
26 changes: 25 additions & 1 deletion Builder.pyw
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,32 @@
'''

# Import libs
import win32api
import wx
import sys
from CrypterBuilder import Builder

# Process Version
PY_MAJ_VERSION = sys.version_info[0]
PY_MIN_VERSION = sys.version_info[1]

def showErrorDialog(message):
'''
Displays an error dialog containing the specified message
'''

app = wx.App()
error_dialog = wx.MessageDialog(None, str(message), "Error", wx.OK | wx.ICON_ERROR)
error_dialog.ShowModal()
app.MainLoop()

# Check Version
if PY_MAJ_VERSION != 3 or (PY_MIN_VERSION != 6 and PY_MIN_VERSION != 7):
showErrorDialog(
"Python 3.6 or 3.7 is required to use this project. version %s.%s is"
" not supported" % (PY_MAJ_VERSION, PY_MIN_VERSION)
)
sys.exit()

# Open Builder
builder = Builder()
builder.launch()
3 changes: 2 additions & 1 deletion CrypterBuilder/Base.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,8 @@
"delete_shadow_copies"
]

RUNTIME_CONFIG_PATH = os.path.join(os.path.dirname(__file__), "Resources", "runtime.cfg")
PACKAGE_DIR = os.path.dirname(__file__)
RUNTIME_CONFIG_PATH = os.path.join(PACKAGE_DIR, "Resources", "runtime.cfg")

# ERRORS
ERROR_INVALID_DATA = 13
Expand Down
5 changes: 0 additions & 5 deletions CrypterBuilder/Builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@

# Import libs
import wx
import json
import time

# Import package modules
from .Gui import Gui
from .Exceptions import *
from .Base import *

###################
## BUILDER CLASS ##
Expand All @@ -36,6 +32,5 @@ def launch(self):
Launches the Builder GUI
'''


self.__builder_gui.Show()
self.__app.MainLoop()
2 changes: 1 addition & 1 deletion CrypterBuilder/BuilderGuiAbsBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def __init__( self, parent ):
self.TitleLabel.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_GRAYTEXT ) )
self.TitleLabel.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )

bSizer44.Add( self.TitleLabel, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALL|wx.EXPAND, 5 )
bSizer44.Add( self.TitleLabel, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALL, 5 )

self.SubtitleLabel = wx.StaticText( self.GuideScrollableWindow, wx.ID_ANY, u"Created by Sithis993", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTER_HORIZONTAL )
self.SubtitleLabel.Wrap( -1 )
Expand Down
4 changes: 2 additions & 2 deletions CrypterBuilder/Spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pubsub import pub

# Import package modules

from . import Base

################
## SPEC CLASS ##
Expand All @@ -19,7 +19,7 @@ class Spec():
@summary: Provides a SPEC file object
'''

SPEC_TEMPLATE_PATH = os.path.join("CrypterBuilder", "Resources", "Template.spec")
SPEC_TEMPLATE_PATH = os.path.join(Base.PACKAGE_DIR, "Resources", "Template.spec")
SPEC_OUT_PATH = "Main.spec"

def __init__(self):
Expand Down
4 changes: 2 additions & 2 deletions gui_project_files/CrypterBuilder/crypter_builder_final.fbp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<property name="internationalize">0</property>
<property name="name">CrypterBuilder</property>
<property name="namespace"></property>
<property name="path">C:\dev\py\Crypter\build\ExeBuilder</property>
<property name="path">C:\dev\py\Crypter\CrypterBuilder</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
Expand Down Expand Up @@ -586,7 +586,7 @@
<property name="permission">none</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND</property>
<property name="flag">wxALIGN_CENTER_HORIZONTAL|wxALL</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
Expand Down

0 comments on commit 181c768

Please sign in to comment.