Skip to content

Commit

Permalink
Added drag and drop functionality in patch creation mode. Also update…
Browse files Browse the repository at this point in the history
…d build process and copyright date. Small clean up as well.
  • Loading branch information
marco-calautti committed Jul 19, 2017
1 parent 62366b9 commit 1b3e5cc
Show file tree
Hide file tree
Showing 16 changed files with 55 additions and 18 deletions.
1 change: 0 additions & 1 deletion DeltaPatcher.txt

This file was deleted.

2 changes: 1 addition & 1 deletion copyright template.txt
@@ -1,4 +1,4 @@
//Copyright (C) 2015 Phoenix.
//Copyright (C) 2017 Phoenix.

//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion include/DPApp.h
@@ -1,4 +1,4 @@
//Copyright (C) 2015 Phoenix.
//Copyright (C) 2017 Phoenix.

//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
Expand Down
8 changes: 4 additions & 4 deletions include/common/common.h
@@ -1,4 +1,4 @@
//Copyright (C) 2015 Phoenix.
//Copyright (C) 2017 Phoenix.

//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
Expand All @@ -22,14 +22,14 @@
#include <common/COPYING.h>

#ifdef __DP_DECODE_ONLY__
#define __DP_VERSION__ wxT("2.0 Lite")
#define __DP_VERSION__ wxT("2.0.1 Lite")
#else
#define __DP_VERSION__ wxT("2.0")
#define __DP_VERSION__ wxT("2.0.1")
#endif

#define __DP_DISCLAIMER__ _("This program is free software: you can redistribute it\nand/or modify it under the terms of the GNU General\nPublic License as published by the Free Software Foundation,\nversion 2.0.")
static const wxString __DP_LICENSE__(rawLicense);
#define __DP_NAME__ wxT("Delta Patcher")
#define __DP_WEBSITE__ wxT("https://github.com/marco-calautti")
#define __DP_COPYRIGHT__ wxT("(C) 2015 Phoenix\n<phoenix_87_c@hotmail.com>")
#define __DP_COPYRIGHT__ wxT("(C) 2017 Phoenix\n<phoenix_87_c@hotmail.com>")
#endif
2 changes: 1 addition & 1 deletion include/common/resource.h
@@ -1,4 +1,4 @@
//Copyright (C) 2015 Phoenix.
//Copyright (C) 2017 Phoenix.

//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion include/patcher/XDeltaPatch.h
@@ -1,4 +1,4 @@
//Copyright (C) 2015 Phoenix.
//Copyright (C) 2017 Phoenix.

//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion resource.rc
Expand Up @@ -23,7 +23,7 @@ BEGIN
VALUE "FileDescription", "XDelta patching Utility"
VALUE "FileVersion", "2, 0, 0, 0"
VALUE "InternalName", "DeltaPatcher"
VALUE "LegalCopyright", "Copyright (C) 2015 Phoenix"
VALUE "LegalCopyright", "Copyright (C) 2017 Phoenix"
VALUE "OriginalFilename", "DeltaPatcher.exe"
VALUE "ProductName", "Delta Patcher"
VALUE "ProductVersion", "2, 0, 0, 0"
Expand Down
2 changes: 1 addition & 1 deletion src/gui/DeltaPatcherAboutDialog.h
@@ -1,4 +1,4 @@
//Copyright (C) 2015 Phoenix.
//Copyright (C) 2017 Phoenix.

//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/gui/DeltaPatcherDecodePanel.h
@@ -1,4 +1,4 @@
//Copyright (C) 2015 Phoenix.
//Copyright (C) 2017 Phoenix.

//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/gui/DeltaPatcherDropHandler.h
@@ -1,4 +1,4 @@
//Copyright (C) 2015 Phoenix.
//Copyright (C) 2017 Phoenix.

//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/gui/DeltaPatcherDropTarget.h
@@ -1,4 +1,4 @@
//Copyright (C) 2015 Phoenix.
//Copyright (C) 2017 Phoenix.

//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
Expand Down
32 changes: 32 additions & 0 deletions src/gui/DeltaPatcherEncodePanel.cpp
Expand Up @@ -2,17 +2,49 @@
#include <wx/filename.h>
#include <wx/filedlg.h>
#include "DeltaPatcherEncodePanel.h"
#include "DeltaPatcherDropHandler.h"
#include "DeltaPatcherDropTarget.h"

#include <gui/icons/open.xpm>
#include <gui/icons/save.xpm>
#include <gui/icons/config.xpm>

class EncodePanelDropHandler : public DeltaPatcherDropHandler
{
private:
DeltaPatcherEncodePanel* panel;
bool original;
public:
EncodePanelDropHandler(DeltaPatcherEncodePanel* encodePanel, bool dropOnOriginal) :
panel(encodePanel), original(dropOnOriginal)
{
}

virtual bool HandleFileDrop(const wxArrayString& filenames)
{
if (filenames.GetCount()>1) return false;
wxString file = filenames[0];

if (original)
panel->SetOriginalFile(file);
else
panel->SetModifiedFile(file);

return true;
}
};

DeltaPatcherEncodePanel::DeltaPatcherEncodePanel( wxWindow* parent, Logger* l )
:
EncodePanel( parent )
{
logger=l;

EncodePanelDropHandler* originalDropHandler = new EncodePanelDropHandler(this, true);
EncodePanelDropHandler* modifiedDropHandler = new EncodePanelDropHandler(this, false);
originalField->SetDropTarget(new DeltaPatcherDropTarget(originalDropHandler));
modifiedField->SetDropTarget(new DeltaPatcherDropTarget(modifiedDropHandler));

wxBitmap openBitmap;
openBitmap.CopyFromIcon(wxIcon(open_xpm));
originalButton->SetImageLabel(openBitmap);
Expand Down
2 changes: 1 addition & 1 deletion src/gui/DeltaPatcherEncodePanel.h
@@ -1,4 +1,4 @@
//Copyright (C) 2015 Phoenix.
//Copyright (C) 2017 Phoenix.

//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/gui/DeltaPatcherMainDialog.h
@@ -1,4 +1,4 @@
//Copyright (C) 2015 Phoenix.
//Copyright (C) 2017 Phoenix.

//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/gui/Logger.h
@@ -1,4 +1,4 @@
//Copyright (C) 2015 Phoenix.
//Copyright (C) 2017 Phoenix.

//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
Expand Down
8 changes: 7 additions & 1 deletion vs_project/DeltaPatcher.vcxproj
Expand Up @@ -88,7 +88,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDecodeOnly|Win32'">
<GenerateManifest>true</GenerateManifest>
<TargetName>$(ProjectName)</TargetName>
<TargetName>$(ProjectName)Lite</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
Expand Down Expand Up @@ -124,6 +124,9 @@
<ProjectReference>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<PostBuildEvent>
<Command>"$(SolutionDir)stuff\utils\mpress.exe" -s "$(SolutionDir)Release\DeltaPatcher.exe"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDecodeOnly|Win32'">
<ClCompile>
Expand Down Expand Up @@ -152,6 +155,9 @@
<ProjectReference>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<PostBuildEvent>
<Command>"$(SolutionDir)stuff\utils\mpress.exe" -s "$(SolutionDir)ReleaseDecodeOnly\DeltaPatcherLite.exe"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down

0 comments on commit 1b3e5cc

Please sign in to comment.