help-emacs-windows
[Top][All Lists]
Advanced

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

RE: [h-e-w] Help with defadvice


From: Jeff Paquette
Subject: RE: [h-e-w] Help with defadvice
Date: Thu, 19 Jun 2003 12:15:23 -0400

Another way, if you have perl installed, is to use the following:

(defun jdp-msdev-build-active-project ()
  (interactive)
  (save-some-buffers)
  (let ((val (run-perl "require Win32::OLE;"
                       "my $app =
Win32::OLE->GetActiveObject('MSDev.Application');"
                       "$app = Win32::OLE->new('MSDev.Application') if !
defined $app;"
                       "exit 1 if ! defined $app;"
                       ;; State 1 is Maximized, 2 is minimized, 3 is normal
                       "$app->{'WindowState'} = 1 if $app->{'WindowState'}
== 2;"
                       "$app->{'Visible'}=1;"
                       "$app->{'Active'}=1;"
                       "$app->ExecuteCommand( \"Build\" );"
                       "exit 0;"
                       )))
    (cond ((= val 1)
           (error "MSDev not running"))
          (t
           (error "Failed to connect to MSDev")))))


This will build the active project in an already-running MSDev.

--
Jeff Paquette                  direct: (508) 616-4526
Principal Software Engineer    email:  address@hidden
NuGenesis Technologies Corp.   web:    http://www.nugenesis.com


-----Original Message-----
From: Peter Lee [mailto:address@hidden
Sent: Thursday, June 19, 2003 11:31 AM
To: Ken Goldman
Cc: address@hidden
Subject: Re: [h-e-w] Help with defadvice


>>>> Ken Goldman writes:

    Ken> What I do on windows is go into MSDev once and export a
    Ken> makefile.  Then I can use 'make' from emacs just like I would
    Ken> compile any other source.

It's a pain to have to regen a makefile though whenever the project
changes.

I've been using the following:

(defun vc-build ()
  "Builds vc project"
  (interactive)
  (let ((compilation-read-command nil))
    (compile "msdev d:/src/someproj/some.dsw /MAKE \"MyProj - Win32
Debug\"")))
(global-set-key [f7] 'vc-build)

I've been meaning to write some lisp to find the dsw based on my
current working dir and then parse that dsw for a list of
projects/configurations which would be shown in a completion buffer to
the command.

But I typically work with the same project for a few days at a time so
I've lazily just updated the above function to reflect what I'm
working on.

If I ever get around to actually doing the above I'll post the code
(ugly as it will be given my lisp abilities).






reply via email to

[Prev in Thread] Current Thread [Next in Thread]