diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index 877d838..c815f47 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -5,9 +5,11 @@ FILE(GLOB_RECURSE SOURCES src/*.cpp)
if (WIN32)
ENABLE_LANGUAGE(RC)
set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/win_stuff/resource.rc ${SOURCES})
+ set(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/win_stuff/DeltaPatcher.exe.manifest ${SOURCES})
endif()
add_executable(DeltaPatcher WIN32 ${SOURCES})
+
target_link_libraries(DeltaPatcher wx::core wx::base xdelta3)
if (APPLE)
diff --git a/app/include/gui/dpgui.h b/app/include/gui/dpgui.h
index f94bce4..d44958d 100644
--- a/app/include/gui/dpgui.h
+++ b/app/include/gui/dpgui.h
@@ -1,10 +1,3 @@
-///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Jun 12 2015)
-// http://www.wxformbuilder.org/
-//
-// PLEASE DO "NOT" EDIT THIS FILE!
-///////////////////////////////////////////////////////////////////////////
-
#ifndef __DPGUI_H__
#define __DPGUI_H__
@@ -77,7 +70,7 @@ class MainDialog : public wxDialog
public:
- MainDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Delta Patcher"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 504,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER );
+ MainDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Delta Patcher"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER );
~MainDialog();
};
@@ -123,7 +116,7 @@ class DecodePanel : public wxPanel
public:
wxBoxSizer* decodeMainSizer;
- DecodePanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 260,184 ), long style = wxTAB_TRAVERSAL );
+ DecodePanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
~DecodePanel();
};
@@ -174,7 +167,7 @@ class EncodePanel : public wxPanel
public:
- EncodePanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 320,407 ), long style = wxTAB_TRAVERSAL );
+ EncodePanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
~EncodePanel();
};
@@ -212,7 +205,7 @@ class AboutDialog : public wxDialog
public:
- AboutDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About Delta Patcher"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 354,308 ), long style = wxDEFAULT_DIALOG_STYLE );
+ AboutDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About Delta Patcher"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
~AboutDialog();
};
diff --git a/app/mac_stuff/Info.plist b/app/mac_stuff/Info.plist
index 0faf3f0..7442976 100644
--- a/app/mac_stuff/Info.plist
+++ b/app/mac_stuff/Info.plist
@@ -26,6 +26,8 @@
2010+ Phoenix (SadNES cITy Translations)
NSPrincipalClass
NSApplication
+ NSHighResolutionCapable
+ True
CFBundleIconFile
icon
diff --git a/app/src/gui/DeltaPatcherDecodePanel.cpp b/app/src/gui/DeltaPatcherDecodePanel.cpp
index 1e4f176..2cab853 100644
--- a/app/src/gui/DeltaPatcherDecodePanel.cpp
+++ b/app/src/gui/DeltaPatcherDecodePanel.cpp
@@ -9,6 +9,8 @@
#include
#include
+#define DECODE_TEXTCTRL_WIDTH 17
+
DeltaPatcherDecodePanel::DeltaPatcherDecodePanel( wxWindow* parent,Logger* l )
:
DecodePanel( parent ), logger( l )
@@ -33,6 +35,10 @@ DecodePanel( parent ), logger( l )
checksumCheck = new wxMenuItem( applyOptionsMenu, wxID_ANY, wxString( _("Checksum validation") ) , wxEmptyString, wxITEM_CHECK );
applyOptionsMenu->Append( checksumCheck );
checksumCheck->Check( true );
+
+ wxSize sizeM = GetTextExtent("M");
+ originalField->SetSizeHints(DECODE_TEXTCTRL_WIDTH*sizeM.x,-1);
+ patchField->SetSizeHints(DECODE_TEXTCTRL_WIDTH*sizeM.x,-1);
}
void DeltaPatcherDecodePanel::OnDecodeOptionsClicked(wxCommandEvent& event)
diff --git a/app/src/gui/DeltaPatcherEncodePanel.cpp b/app/src/gui/DeltaPatcherEncodePanel.cpp
index 0715408..e799a82 100644
--- a/app/src/gui/DeltaPatcherEncodePanel.cpp
+++ b/app/src/gui/DeltaPatcherEncodePanel.cpp
@@ -9,6 +9,9 @@
#include
#include
+#define ENCODE_TEXTCTRL_WIDTH 25
+#define ENCODE_DESCRIPTION_TEXTCTRL_HEIGHT 10
+
class EncodePanelDropHandler : public DeltaPatcherDropHandler
{
private:
@@ -94,6 +97,12 @@ EncodePanel( parent ), logger( l )
checksumCheck = new wxMenuItem( createOptionsMenu, wxID_ANY, wxString( _("Add Checksum to patch") ) , wxEmptyString, wxITEM_CHECK );
createOptionsMenu->Append( checksumCheck );
checksumCheck->Check( true );
+
+ wxSize sizeM = GetTextExtent("M");
+ originalField->SetSizeHints(ENCODE_TEXTCTRL_WIDTH*sizeM.x,-1);
+ modifiedField->SetSizeHints(ENCODE_TEXTCTRL_WIDTH*sizeM.x,-1);
+ descriptionField->SetSizeHints(ENCODE_TEXTCTRL_WIDTH*sizeM.x,ENCODE_DESCRIPTION_TEXTCTRL_HEIGHT*sizeM.y);
+ patchField->SetSizeHints(ENCODE_TEXTCTRL_WIDTH*sizeM.x,-1);
}
void DeltaPatcherEncodePanel::OnEncodeOptionsClicked(wxCommandEvent& event)
diff --git a/app/src/gui/DeltaPatcherMainDialog.cpp b/app/src/gui/DeltaPatcherMainDialog.cpp
index 0cee45b..01dd3aa 100644
--- a/app/src/gui/DeltaPatcherMainDialog.cpp
+++ b/app/src/gui/DeltaPatcherMainDialog.cpp
@@ -10,6 +10,8 @@
#include
#include
+#define LOG_CTRL_WIDTH 30
+
DeltaPatcherMainDialog::DeltaPatcherMainDialog( wxWindow* parent, const wxString& patchName )
:
MainDialog( parent ), decodeMode(true), pendingPatchPath(patchName)
@@ -38,20 +40,25 @@ MainDialog( parent ), decodeMode(true), pendingPatchPath(patchName)
nullPanel->Show(false);
+ wxSize sizeM = GetTextExtent("M");
+ wxSize minLogCtrlSize(LOG_CTRL_WIDTH*sizeM.x,-1);
+
//preparing default panel
decodePanel=new DeltaPatcherDecodePanel(this,this);
-
+
panelSizer->Add( decodePanel, 1, wxEXPAND | wxALL, 5 );
decodePanel->GetSizer()->Fit(decodePanel);
//preparing encode panel
encodePanel=new DeltaPatcherEncodePanel(this,this);
+
encodePanel->Show(false);
panelSizer->Add( encodePanel, 1, wxEXPAND | wxALL, 5 );
//preparing log area
logCtrl->SetEditable(false);
-
+ logCtrl->SetSizeHints(minLogCtrlSize);
+
//checking release type
#ifdef __DP_DECODE_ONLY__
operationButton->Show(false);
diff --git a/app/src/gui/dpgui.cpp b/app/src/gui/dpgui.cpp
index 262c349..533d803 100644
--- a/app/src/gui/dpgui.cpp
+++ b/app/src/gui/dpgui.cpp
@@ -1,14 +1,5 @@
-///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Jun 12 2015)
-// http://www.wxformbuilder.org/
-//
-// PLEASE DO "NOT" EDIT THIS FILE!
-///////////////////////////////////////////////////////////////////////////
-
#include
-///////////////////////////////////////////////////////////////////////////
-
BEGIN_EVENT_TABLE( MainDialog, wxDialog )
EVT_ACTIVATE( MainDialog::_wxFB_OnActivate )
EVT_CLOSE( MainDialog::_wxFB_OnMainDialogClose )
@@ -28,7 +19,7 @@ MainDialog::MainDialog( wxWindow* parent, wxWindowID id, const wxString& title,
panelSizer = new wxBoxSizer( wxVERTICAL );
- nullPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 260,184 ), wxTAB_TRAVERSAL );
+ nullPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
panelSizer->Add( nullPanel, 1, wxEXPAND | wxALL, 5 );
@@ -72,7 +63,7 @@ MainDialog::MainDialog( wxWindow* parent, wxWindowID id, const wxString& title,
logBox = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Log:") ), wxVERTICAL );
- logCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 350,-1 ), wxHSCROLL|wxTE_MULTILINE|wxTE_WORDWRAP );
+ logCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxTE_MULTILINE|wxTE_WORDWRAP );
logBox->Add( logCtrl, 1, wxALL|wxEXPAND, 5 );
diff --git a/app/win_stuff/DeltaPatcher.exe.manifest b/app/win_stuff/DeltaPatcher.exe.manifest
new file mode 100644
index 0000000..f2708ec
--- /dev/null
+++ b/app/win_stuff/DeltaPatcher.exe.manifest
@@ -0,0 +1,9 @@
+
+
+
+
+ true
+ PerMonitorV2
+
+
+