Quick Reference: Meld is a utility for visually comparing files / folders.
Surely not everyone agrees that this instrument is worth those dances with a tambourine that must be performed around it for less comfortable work (Meld is slightly not designed for work in Windows, but since it is written in python using GTK, it can also function in it) . I, having poked the free alternatives with my wand, decided for myself that if it got started, then the efforts would not be in vain.
I suggest that interested to get to the point. ')
The process can be divided into two parts: installation and finishing.
Installation
The main manipulations are described here: Meld / Windows . Below is the same list with my comments.
Python:
I didn’t juggle with versions of python, I installed the one specified in the manual.
Yes, yes, in the PATH variable, add paths to python (item 1, c: \ dev \ python), to libraries (items 2, 4 and 5, c: \ dev \ gtk \ bin, c: \ dev \ glade \ bin and c: \ dev \ gtksourceview \ bin) and to Cygwin if it is installed (point 6, c: \ dev \ cygwin \ bin). You can also add a path to Meld himself (point 7, c: \ dev \ meld \ meld-1.3.1)
Now, if you run python , specifying the path to Meld (c: \ dev \ meld \ meld-1.3.1 \ meld) as a parameter, the Meld window should open. Otherwise, either I was sealed, or you did something wrong.
Dopilivanie
The first question, after a successful launch: “what the hell is this black console window for me ?!”.
The solution is simple: you do not need to run python , but pythonw .
The next point: the utility window does not save its position and the state of deployment to the full screen (not that fullscreen, but that maximized). Perhaps this is a GTK problem, perhaps a windows window manager. I could not completely correct this behavior.
Saving the position of the window can be realized by saving the coordinates manually, but since positioning the window before displaying it is impossible, and moving it after the display is ugly, I did not do that.
I decided to limit WINDOW_STATE_MAXIMIZED to saving the WINDOW_STATE_MAXIMIZED flag. This is achieved by adding the window_maximized option to the application settings, and the window-state-event signal handler. First, you need to describe the handler: in the meldapp.glade file (c: \ dev \ meld \ meld-1.3.1 \ glade2 \ meldapp.glade) in the <widget class="GtkWindow" id="meldapp"> add the line <signal name="window_state_event" handler="on_window_state_event"/> :
--- c: \ dev \ meld-base \ meld-1.3.1 \ glade2 \ meldapp.glade
+++ c: \ dev \ meld \ meld-1.3.1 \ glade2 \ meldapp.glade
@@ -7.6 +7.7 @@
<property name = "title" translatable = "yes"> Meld </ property>
<property name = "icon"> pixmaps / icon.png </ property>
<signal name = "size_allocate" handler = "on_size_allocate" />
+ <signal name = "window_state_event" handler = "on_window_state_event" />
<signal name = "delete_event" handler = "on_delete_event" />
<child>
<widget class = "GtkVBox" id = "appvbox">
Then add a handler: in the meldapp.py file (c: \ dev \ meld \ meld-1.3.1 \ meldapp.py) add the on_window_state_event method:
Some settings, such as the toolbar display style, are taken from the GNOME desktop configuration files, and if they are not, the default setting is used. For the toolbar style, this is TOOLBAR_BOTH , i.e. display of icons and signatures.
Funny things happen when saving files with hyphens other than LF (\ n). In this case, all LFs are replaced by file transfers, so CRLF (\ r \ n) is converted to CRCRLF, and the next time it is saved again.
Perhaps the problem lies in the incorrect parsing of the file (in Ubuntu Meld does not allow this), but so far I have solved it, simply commenting out a section of code that replaces some hyphens with others:
--- c: \ dev \ meld-base \ meld-1.3.1 \ filediff.py
+++ c: \ dev \ meld \ meld-1.3.1 \ filediff.py
@@ -815.6 +815.7 @@
else:
return melddoc.RESULT_ERROR
text = buf.get_text (buf.get_start_iter (), buf.get_end_iter (), 0)
+ "" "
if bufdata.newlines:
if type (bufdata.newlines) == type (""):
if (bufdata.newlines)! = '\ n':
@@ -832.6 +833.7 @@
if k! = '\ n':
text = text.replace ('\ n', k)
break
+ "" "
if bufdata.encoding:
try:
text = text.encode (bufdata.encoding)
Moreover, the same code makes all transfers even with one comb.
In Meld, which was installed according to the instructions on the GNOME website, the syntax highlighting functions, the display of line numbers and the display of spaces instead of tabs are not available.
To fix this, I added the gtksourceview-2.2.2 library to the manual. It lacks the language.rng , language2.rng and styles.rng files , but they are in gtksourceview-2.9.3 in the share \ gtksourceview-2.0 \ language-specs folder. They just need to be copied to a similar one in gtksourceview-2.2.2.
Now Meld behaves quite adequately. You can use.
If someone practices the above, take a look from time to time, there may be updates.
PS I haven’t dealt with python, GTK and PyGTK before, so if you have written outright nonsense somewhere, please correct.