Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

These changes incorporate automatic file format detection #1

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
12 changes: 5 additions & 7 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Summary
==================

cbDiff is a plugin for Code::Blocks IDE,
cbDiff is a plugin for Code::Blocks IDE,
which can show visually the difference
between two files.
between two files.

==================
License
Expand Down Expand Up @@ -37,16 +37,14 @@ if(Manager::Get()->GetPluginManager()->FindPluginByName(_T("cbDiff")) != NULL)
// is library loaded
if(element->library->IsLoaded())
{
typedef void (*cbDiffFunc) (const wxString&, const wxString&, int mode, const wxString&);
typedef void (*cbDiffFunc) (const wxString&, const wxString&, int viewmode);

cbDiffFunc difffunc = (cbDiffFunc)element->library->GetSymbol(_("DiffFiles"));
if(difffunc != NULL)
{
// Call the function with the two files,
// the viewing mode (TABLE, UNIFIED or SIDEBYSIDE) and the Highlightlanguage
difffunc(firstfile, secondfile, viewmode, hlang);
difffunc(firstfile, secondfile, -1);
}
}
}


22 changes: 14 additions & 8 deletions cbDiff.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<Option type="3" />
<Option compiler="gcc" />
<Option host_application="codeblocks" />
<Option run_host_application_in_terminal="0" />
<Compiler>
<Add option="-ansi" />
<Add option="-Wall" />
Expand Down Expand Up @@ -57,10 +58,13 @@
</ExtraCommands>
</Target>
<Target title="Windows">
<Option output="bin/cbDiff" prefix_auto="1" extension_auto="1" />
<Option output="../../../devel/share/codeblocks/plugins/cbDiff" prefix_auto="1" extension_auto="1" />
<Option object_output="obj" />
<Option type="3" />
<Option compiler="gcc" />
<Option host_application="$(#cb)/devel/codeblocks.exe" />
<Option parameters="--debug-log --multiple-instance -na -ns -nd" />
<Option host_application="../../../devel/codeblocks.exe" />
<Option run_host_application_in_terminal="0" />
<Compiler>
<Add option="-Wall" />
<Add option="-g" />
Expand All @@ -77,23 +81,22 @@
<Add option="-DCB_PRECOMP" />
<Add option="-DwxUSE_UNICODE" />
<Add option="-DEXPORT_FUNC" />
<Add directory="$(#cb.include)" />
<Add directory="$(#cb)\sdk\wxscintilla\include" />
<Add directory="$(#wx)\lib\gcc_dll\mswu" />
<Add directory="../../../include" />
<Add directory="../../../sdk/wxscintilla/include" />
<Add directory="$(#wx.include)" />
<Add directory="$(#wx)/lib/gcc_dll/mswu" />
</Compiler>
<Linker>
<Add option="-mthreads" />
<Add option="--enable-auto-import" />
<Add library="codeblocks" />
<Add library="wxmsw28u" />
<Add library="wxscintilla_cb" />
<Add directory="$(#cb)/devel" />
<Add directory="../../../devel" />
<Add directory="$(#wx.lib)/gcc_dll" />
</Linker>
<ExtraCommands>
<Add after="zip -j9 bin/cbDiff.zip manifest.xml" />
<Add after="zip -j9 bin/cbDiff.cbplugin bin/cbDiff.dll bin/cbDiff.zip" />
<Add after="zip -jq9 ..\..\..\devel\share\codeblocks\cbDiff.zip manifest.xml" />
<Mode after="always" />
</ExtraCommands>
</Target>
Expand Down Expand Up @@ -157,6 +160,9 @@
</ExtraCommands>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Unit filename="images/reload.h">
<Option target="Unix" />
<Option target="Unix-release" />
Expand Down
221 changes: 221 additions & 0 deletions cbDiff_wx30.cbp
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="cbDiff wx3.0.x" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Windows">
<Option output="../../../devel30/share/codeblocks/plugins/cbDiff" prefix_auto="1" extension_auto="1" />
<Option object_output="obj" />
<Option type="3" />
<Option compiler="gcc" />
<Option parameters="--debug-log --multiple-instance -na -ns -nd" />
<Option host_application="../../../devel30/codeblocks.exe" />
<Option run_host_application_in_terminal="0" />
<Compiler>
<Add option="-Wall" />
<Add option="-g" />
<Add option="-pipe" />
<Add option="-mthreads" />
<Add option="-fmessage-length=0" />
<Add option="-fexceptions" />
<Add option="-Winvalid-pch" />
<Add option="-DBUILDING_PLUGIN" />
<Add option="-DHAVE_W32API_H" />
<Add option="-D__WXMSW__" />
<Add option="-DWXUSINGDLL" />
<Add option="-DNOPCH" />
<Add option="-DwxUSE_UNICODE" />
<Add option="-DEXPORT_FUNC" />
<Add directory="../../../include" />
<Add directory="../../../sdk/wxscintilla/include" />
<Add directory="$(#wx30.include)" />
<Add directory="$(#wx30)/lib/gcc_dll/mswu" />
</Compiler>
<Linker>
<Add option="-mthreads" />
<Add option="--enable-auto-import" />
<Add library="codeblocks" />
<Add library="wxmsw30u" />
<Add library="wxscintilla_cb" />
<Add directory="../../../devel30" />
<Add directory="$(#wx30.lib)/gcc_dll" />
</Linker>
<ExtraCommands>
<Add after="zip -jq9 ..\..\..\devel30\share\codeblocks\cbDiff.zip manifest.xml" />
<Mode after="always" />
</ExtraCommands>
</Target>
<Target title="src-release">
<Option output="cbDiff" prefix_auto="1" extension_auto="1" />
<Option type="0" />
<Option compiler="gcc" />
<ExtraCommands>
<Add after="zip -j9 cbDiff_1.01.1-src.zip src/*" />
<Add after="zip -j9 cbDiff_1.01.1-src.zip wxsmith/*" />
<Add after="zip -j9 cbDiff_1.01.1-src.zip dtl-1.12/*" />
<Add after="zip -j9 cbDiff_1.01.1-src.zip images/*" />
<Add after="zip -j9 cbDiff_1.01.1-src.zip cbDiff.cbp" />
<Add after="zip -j9 cbDiff_1.01.1-src.zip COPYING" />
<Add after="zip -j9 cbDiff_1.01.1-src.zip manifest.xml" />
<Add after="zip -j9 cbDiff_1.01.1-src.zip README" />
<Mode after="always" />
</ExtraCommands>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Unit filename="images/reload.h">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="images/sidebyside.h">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="images/swap.h">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="images/table.h">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="images/unified.h">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="manifest.xml">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbDiff.cpp">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbDiff.h">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbDiffConfigPanel.cpp">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbDiffConfigPanel.h">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbDiffCtrl.cpp">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbDiffCtrl.h">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbDiffEditor.cpp">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbDiffEditor.h">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbDiffMenu.cpp">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbDiffMenu.h">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbDiffSelectFiles.cpp">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbDiffSelectFiles.h">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbDiffToolbar.cpp">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbDiffToolbar.h">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbDiffUtils.cpp">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbDiffUtils.h">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbSideBySideCtrl.cpp">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbSideBySideCtrl.h">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbTableCtrl.cpp">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbTableCtrl.h">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbUnifiedCtrl.cpp">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/cbUnifiedCtrl.h">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/wxDiff.cpp">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="src/wxDiff.h">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="wxsmith/cbDiffConfigPanel.wxs">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Unit filename="wxsmith/cbDiffSelectFiles.wxs">
<Option target="Unix" />
<Option target="Windows" />
</Unit>
<Extensions>
<envvars />
<code_completion />
<debugger />
<lib_finder disable_auto="1" />
<wxsmith version="1">
<resources>
<wxPanel wxs="wxsmith/cbDiffConfigPanel.wxs" src="cbDiffConfigPanel.cpp" hdr="cbDiffConfigPanel.h" fwddecl="1" i18n="1" name="cbDiffConfigPanel" language="CPP" />
<wxDialog wxs="wxsmith/cbDiffSelectFiles.wxs" src="cbDiffSelectFiles.cpp" hdr="cbDiffSelectFiles.h" fwddecl="1" i18n="1" name="cbDiffSelectFiles" language="CPP" />
</resources>
</wxsmith>
<DoxyBlocks>
<comment_style block="0" line="0" />
<doxyfile_project />
<doxyfile_build />
<doxyfile_warnings />
<doxyfile_output />
<doxyfile_dot />
<general />
</DoxyBlocks>
</Extensions>
</Project>
</CodeBlocks_project_file>
Loading