Re: What does the file extension ".hg" mean?



On 22/06/2013 18:14, Maggio Mago wrote:
Hello John,

As a first step, take a look at : https://developer.gnome.org/gtkmm-tutorial/3.0/sec-wrapping-hg-files.html
It says :
<quote>The .hg and .ccg source files are very much like .h and .cc C++ source files, but they contain extra macros, such as _CLASS_GOBJECT() and _WRAP_METHOD(), from which gmmproc generates appropriate C++ source code</quote>

So make sure you have installed gmmproc!

Hoping help you



Although I ended up reverting to the tarball sources I decided to revisit gmmproc today by looking at some of the links that various people gave me - and guess what... I pretty much made it all work! After figuring out how to run gmmproc, I ended up with a dozen or so lines in my error output, looking broadly like this:-

'cp' is not recognized as an internal or external command, operable program or batch file. 'rm' is not recognized as an internal or external command, operable program or batch file. 'cmp' is not recognized as an internal or external command, operable program or batch file.

The errors were coming from this section (at around line 895) in 'tools/pm/Output.pm':-

      foreach($fname_h, $fname_ph, $fname_cc)
       {
         # overwrite the source file only if it has actually changed

         # Win32 does fail at this, so we do the two steps separately:
#system("cmp -s '$_.tmp' '$_' || cp '$_.tmp' '$_'" ; rm -f '$_.tmp');

         system("cmp -s '$_.tmp' '$_' || cp '$_.tmp' '$_'");
         system("rm -f '$_.tmp'");
       }

and this section, a few lines further down:-

      sub remove_temp_files($)
      {
        my ($self) = @_;

        system("rm -f \"$$self{tmpdir}/gtkmmproc_$$.g1\"");
        system("rm -f \"$$self{tmpdir}/gtkmmproc_$$.g2\"");
      }

So, although 'cp', 'cmp. and 'rm' are standard *nix shell commands, you can see that this is tantalizingly close to working from a Windows command line too. In fact if I temporarily comment out those lines, it does seem to build usable cc and h files (albeit that they end up with the extension ".tmp")

Am I the only person who thinks it would be worth putting in some effort to make this work more universally? Admittedly, scripting languages aren't my forte but it doesn't seem like there's a lot of work needed.

John


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]