Registry keys for Windows compilation

classic Classic list List threaded Threaded
13 messages Options
julien2412 julien2412
Reply | Threaded
Open this post in threaded view
|

Registry keys for Windows compilation

Hello,

I'm trying to compile on Windows Vista (usually I compile without pb on a Debian testing) and had error messages :
checking the Perl version... checked (perl 5)
checking for required Perl modules... all modules found
checking for a friendly Microsoft C/C++ compiler installation path... Can't find MS Visual Studio / VC++ at ./oowintool line 188.
cygpath: can't convert empty path
cygpath: can't convert empty path

checking for mspdb80.dll... no
checking for mspdb100.dll... no
checking the Microsoft C/C++ Compiler... checking for cl.exe... no
cygpath: can't convert empty path
cygpath: can't convert empty path
configure: error: Microsoft C/C++ Compiler not found. Use --with-cl-home or set path to cl.exe.
Error running configure at ./autogen.sh line 157.

I took a look at oowintool, the pb is cygwin doesn't map all the /proc/registry.
For example, there's nothing there :
/proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VCExpress
And there's nothing cause permissions aren't ok :
ls -l /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/
d---------  1      400    401 0 Nov 19 18:53 VBExpress
d---------  1      400    401 0 Nov 19 18:53 VCExpress
d---------  1      400    401 0 Nov 19 18:53 VCSExpress
But I can't succeed in adding +rx on these directories. When I look at authorizations on Windows registry, it's the same as Mediaplayer which appears like this on Cygwin :
dr-x------  3 SYSTEM   SYSTEM 0 Sep  2  2009 MediaPlayer

I've googled a little but found nothing which explains why the mapping isn't complete but found there was a tool regtool on Cygwin which can read (and write) directly the Windows registry. (it uses "\" for directory separator)
So I thought it could be useful to change the reg functions of oowin :
like reg_get_value($)

Pb is regtool doesn't allow the search of the key and I'm not sure mixing regtool to get a key and Cygwin reg function
would be a good option.

The last thing : for those who can compile on Windows, how do you manage to make all these things work ?
(I suppose/I hope you don't pass manually all the paths by autogen options)

Any opinion welcome here :-)

Julien.

PS : I tried mingw but using openSuse packages on my Debian is definitely an option I don't want to.
Jonathan Aquilina Jonathan Aquilina
Reply | Threaded
Open this post in threaded view
|

Re: Registry keys for Windows compilation

On 19/11/2011 19:02, julien2412 wrote:

> Hello,
>
> I'm trying to compile on Windows Vista (usually I compile without pb on a
> Debian testing) and had error messages :
> checking the Perl version... checked (perl 5)
> checking for required Perl modules... all modules found
> checking for a friendly Microsoft C/C++ compiler installation path... Can't
> find MS Visual Studio / VC++ at ./oowintool line 188.
> cygpath: can't convert empty path
> cygpath: can't convert empty path

I think the question here is if your running 64bit or 32bit. Is the path
in oowintool set to look for a 32bit visual studio or does it check to
see if the system is 32bit use 32bit otherwise use the 64bit path.

> checking for mspdb80.dll... no
> checking for mspdb100.dll... no
> checking the Microsoft C/C++ Compiler... checking for cl.exe... no
> cygpath: can't convert empty path
> cygpath: can't convert empty path
> configure: error: Microsoft C/C++ Compiler not found. Use --with-cl-home or
> set path to cl.exe.
> Error running configure at ./autogen.sh line 157.
>
> I took a look at oowintool, the pb is cygwin doesn't map all the
> /proc/registry.
> For example, there's nothing there :
> /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VCExpress
> And there's nothing cause permissions aren't ok :
> ls -l /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/
> d---------  1      400    401 0 Nov 19 18:53 VBExpress
> d---------  1      400    401 0 Nov 19 18:53 VCExpress
> d---------  1      400    401 0 Nov 19 18:53 VCSExpress
> But I can't succeed in adding +rx on these directories. When I look at
> authorizations on Windows registry, it's the same as Mediaplayer which
> appears like this on Cygwin :
> dr-x------  3 SYSTEM   SYSTEM 0 Sep  2  2009 MediaPlayer
>
> I've googled a little but found nothing which explains why the mapping isn't
> complete but found there was a tool regtool on Cygwin which can read (and
> write) directly the Windows registry. (it uses "\" for directory separator)
> So I thought it could be useful to change the reg functions of oowin :
> like reg_get_value($)
>
> Pb is regtool doesn't allow the search of the key and I'm not sure mixing
> regtool to get a key and Cygwin reg function
> would be a good option.
>
> The last thing : for those who can compile on Windows, how do you manage to
> make all these things work ?
> (I suppose/I hope you don't pass manually all the paths by autogen options)
>
> Any opinion welcome here :-)
>
> Julien.
>
> PS : I tried mingw but using openSuse packages on my Debian is definitely an
> option I don't want to.
>
> --
> View this message in context: http://nabble.documentfoundation.org/Registry-keys-for-Windows-compilation-tp3521322p3521322.html
> Sent from the Dev mailing list archive at Nabble.com.
> _______________________________________________
> LibreOffice mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/libreoffice

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
julien2412 julien2412
Reply | Threaded
Open this post in threaded view
|

Re: Registry keys for Windows compilation

I'm on Windows Vista 32 and I use Cygwin 1.7 (last version installed today after having removing previous one with cclean for registry cleaning).
Here are the directories for registry.
- /proc/registry
- /proc/registry32
- /proc/registry64
There's no subdirectory on VCExpress in any of these directories.

Julien.
Jesús Corrius Jesús Corrius
Reply | Threaded
Open this post in threaded view
|

Re: Registry keys for Windows compilation

> I'm on Windows Vista 32 and I use Cygwin 1.7 (last version installed today
> after having removing previous one with cclean for registry cleaning).
> Here are the directories for registry.
> - /proc/registry
> - /proc/registry32
> - /proc/registry64
> There's no subdirectory on VCExpress in any of these directories.

Can you try the "regedit" utility and see if you get the same results?

--
Jesús Corrius <[hidden email]>
Deputy of the Board of Directors of the Document Foundation
Mobile: +34 661 11 38 26
Skype: jcorrius | Twitter: @jcorrius
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Dennis E. Hamilton Dennis E. Hamilton
Reply | Threaded
Open this post in threaded view
|

Re: Registry keys for Windows compilation

I don't know how cygwin has access to environment variables from Windows, but there is a straightforward way to setup command-line execution of Visual C++ 2008 Express Edition (and a similar variation for 2005 and 2010).

The enclosed batch file (as a .txt for attachment safety) works on win32 systems when setting up for native command-line execution.  Maybe it will be customizable for cygwin-hosted build operations too.

 - Dennis

-----Original Message-----
From: libreoffice-bounces+dennis.hamilton=[hidden email] [mailto:libreoffice-bounces+dennis.hamilton=[hidden email]] On Behalf Of Jesús Corrius
Sent: Saturday, November 19, 2011 11:07
To: julien2412
Cc: [hidden email]
Subject: Re: [Libreoffice] Registry keys for Windows compilation

> I'm on Windows Vista 32 and I use Cygwin 1.7 (last version installed today
> after having removing previous one with cclean for registry cleaning).
> Here are the directories for registry.
> - /proc/registry
> - /proc/registry32
> - /proc/registry64
> There's no subdirectory on VCExpress in any of these directories.

Can you try the "regedit" utility and see if you get the same results?

--
Jesús Corrius <[hidden email]>
Deputy of the Board of Directors of the Document Foundation
Mobile: +34 661 11 38 26
Skype: jcorrius | Twitter: @jcorrius
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

myVC++.bat.txt (1K) Download Attachment
matm matm
Reply | Threaded
Open this post in threaded view
|

Re: Registry keys for Windows compilation

In reply to this post by julien2412
Le Sat, 19 Nov 2011 19:02:56 +0100, julien2412 <[hidden email]> a  
écrit:

> Hello,
>
> I'm trying to compile on Windows Vista (usually I compile without pb on a
> Debian testing) and had error messages :
> checking the Perl version... checked (perl 5)
> checking for required Perl modules... all modules found
> checking for a friendly Microsoft C/C++ compiler installation path...  
> Can't
> find MS Visual Studio / VC++ at ./oowintool line 188.
> cygpath: can't convert empty path
> cygpath: can't convert empty path
>
> checking for mspdb80.dll... no
> checking for mspdb100.dll... no
> checking the Microsoft C/C++ Compiler... checking for cl.exe... no
> cygpath: can't convert empty path
> cygpath: can't convert empty path
> configure: error: Microsoft C/C++ Compiler not found. Use --with-cl-home  
> or
> set path to cl.exe.
> Error running configure at ./autogen.sh line 157.
>
> I took a look at oowintool, the pb is cygwin doesn't map all the
> /proc/registry.
> For example, there's nothing there :
> /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VCExpress

If you use Express 2010, the key is in HKEY_CURRENT_USER.
I don't know for Vista 32, but seven 64 has no shortnames for Program  
files paths with spaces (default install), so it is a pity.
Either reinstall Express in a non-spaced dir, or prepare to hack the  
autogen/configure/oowintool chain. Providing paths with space event on the  
autogen/configure commands does not help, since stuff in there is not set  
to handle spaces. I am currently working on it but it is not that simple  
and time is very hard to get for now.


> And there's nothing cause permissions aren't ok :
> ls -l /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/
> d---------  1      400    401 0 Nov 19 18:53 VBExpress
> d---------  1      400    401 0 Nov 19 18:53 VCExpress
> d---------  1      400    401 0 Nov 19 18:53 VCSExpress
> But I can't succeed in adding +rx on these directories. When I look at
> authorizations on Windows registry, it's the same as Mediaplayer which
> appears like this on Cygwin :
> dr-x------  3 SYSTEM   SYSTEM 0 Sep  2  2009 MediaPlayer

Weird.

Mathias
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Dennis E. Hamilton Dennis E. Hamilton
Reply | Threaded
Open this post in threaded view
|

Re: Registry keys for Windows compilation

In reply to this post by Dennis E. Hamilton
I finally became curious enough to install cygwin (so I can do Windows builds too) and see if there is an easier way to locate the Visual C++ Express Edition (or Visual Studio VC++ compiler).  Yes indeed.

I could get the batch script of my previous example to run under cygwin, but it couldn't change anything in the cygwin bash environment.  So instead, I made a copy of the cygwin.bat script and added "CALL MyVC++.bat" at the beginning.

The bash absorbs the path (rewritten) and environment variables left by my batch script into its environment.

The attached PNG file, if it comes through, demonstrates the result.

The appropriate environment is now set up for the entire run of the build beneath cygwin.

This sort of hack seems like a much-more direct way of hooking up not only to VC++ but also incorporating the environment for an SDK and also the WinDDK ATL headers and libraries.  It all bootstraps off of the environment variables that the Microsoft Developer tools bootstrap off of.

 - Dennis

-----Original Message-----
From: libreoffice-bounces+dennis.hamilton=[hidden email] [mailto:libreoffice-bounces+dennis.hamilton=[hidden email]] On Behalf Of Dennis E. Hamilton
Sent: Saturday, November 19, 2011 13:02
To: 'Jesús Corrius'; 'julien2412'
Cc: [hidden email]
Subject: Re: [Libreoffice] Registry keys for Windows compilation

I don't know how cygwin has access to environment variables from Windows, but there is a straightforward way to setup command-line execution of Visual C++ 2008 Express Edition (and a similar variation for 2005 and 2010).

The enclosed batch file (as a .txt for attachment safety) works on win32 systems when setting up for native command-line execution.  Maybe it will be customizable for cygwin-hosted build operations too.

 - Dennis

-----Original Message-----
From: libreoffice-bounces+dennis.hamilton=[hidden email] [mailto:libreoffice-bounces+dennis.hamilton=[hidden email]] On Behalf Of Jesús Corrius
Sent: Saturday, November 19, 2011 11:07
To: julien2412
Cc: [hidden email]
Subject: Re: [Libreoffice] Registry keys for Windows compilation

> I'm on Windows Vista 32 and I use Cygwin 1.7 (last version installed today
> after having removing previous one with cclean for registry cleaning).
> Here are the directories for registry.
> - /proc/registry
> - /proc/registry32
> - /proc/registry64
> There's no subdirectory on VCExpress in any of these directories.

Can you try the "regedit" utility and see if you get the same results?

--
Jesús Corrius <[hidden email]>
Deputy of the Board of Directors of the Document Foundation
Mobile: +34 661 11 38 26
Skype: jcorrius | Twitter: @jcorrius
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

cygwin-setup-2.738-2011-11-19-2023-VCygwin-run.png (56K) Download Attachment
julien2412 julien2412
Reply | Threaded
Open this post in threaded view
|

Re: Registry keys for Windows compilation

In reply to this post by julien2412
Hello Denis and Matm (I had already answered to Jonathan :-) )

Thanks about your answer. Between the moment I had posted on this thread and your answer, I was trying another way.
On this thread
http://nabble.documentfoundation.org/REVIEW-try-to-improve-automatic-detection-for-Windows-building-tp3522110p3522110.html
I put 2 simple patches to review.
In oowinbuild, I added a hook to search directly in Windows registry if the value is not found on mapped Windows registry provided by Cygwin (/proc/registry).

Julien.
Jonathan Aquilina Jonathan Aquilina
Reply | Threaded
Open this post in threaded view
|

Re: Registry keys for Windows compilation

On 20/11/2011 09:42, julien2412 wrote:

> Hello Denis and Matm (I had already answered to Jonathan :-) )
>
> Thanks about your answer. Between the moment I had posted on this thread and
> your answer, I was trying another way.
> On this thread
> http://nabble.documentfoundation.org/REVIEW-try-to-improve-automatic-detection-for-Windows-building-tp3522110p3522110.html
> I put 2 simple patches to review.
> In oowinbuild, I added a hook to search directly in Windows registry if the
> value is not found on mapped Windows registry provided by Cygwin
> (/proc/registry).
>
> Julien.
>
> --
> View this message in context: http://nabble.documentfoundation.org/Registry-keys-for-Windows-compilation-tp3521322p3522375.html
> Sent from the Dev mailing list archive at Nabble.com.
> _______________________________________________
> LibreOffice mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
Julien

if Cygwin is mapping the actual windows registry and its through cygwin
its not finding that MSVC++ is installed wouldnt that constitute a bug
in cygwin?
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
julien2412 julien2412
Reply | Threaded
Open this post in threaded view
|

Re: Registry keys for Windows compilation

Jonathan: I agree with you but since regtool is included by default in Cygwin, I thought about the quickest fix first.
Right now, autogen passed. I disabled junit and dbgutils but I enabled most of extension + symbols. Now i runned make and wait for the result. I had some bt during compilation in offapi because of pb of heap but I want to retry to be sure. Linux (I can't tell for MacOs) is definitely a better environment for LO compiling :-)

Julien.
matm matm
Reply | Threaded
Open this post in threaded view
|

Re: Registry keys for Windows compilation

In reply to this post by julien2412
Hello
Le Sun, 20 Nov 2011 09:42:04 +0100, julien2412 <[hidden email]> a  
écrit:

> Hello Denis and Matm (I had already answered to Jonathan :-) )
>
> Thanks about your answer. Between the moment I had posted on this thread  
> and
> your answer, I was trying another way.
> On this thread
> http://nabble.documentfoundation.org/REVIEW-try-to-improve-automatic-detection-for-Windows-building-tp3522110p3522110.html
> I put 2 simple patches to review.
> In oowinbuild, I added a hook to search directly in Windows registry if  
> the
> value is not found on mapped Windows registry provided by Cygwin
> (/proc/registry).
>
> Julien.
>

You should check for ANT_HOME reality before assigning it. I know many  
installs of Windows ant which do not have the env var set by default. So  
after checking in SOLAR_JAVA and fail, if ANT_HOME exists, use it, else  
use the command-line-provided path.

My 2 cents

Mathias
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
julien2412 julien2412
Reply | Threaded
Open this post in threaded view
|

Re: Registry keys for Windows compilation

Hello Matm.

About checking the reality, I agree with you but I'm not at all at this point for the moment. I just want to improve the automatic detection for Windows compilation and my 2 small patches are definitely not the "absolute fixes" (hope too they don't break anything :-) ).
For the priority between command line and ANT_HOME, i suppose that if the path is provided in the command line, we should use it, even if ANT_HOME is defined. Indeed, you could have more than 1 ant version installed and use a specific one sometimes. Now you could say "just change ANT_HOME env to switch ANT version".
So i put a new patch for configure.in (that replaces the old one) on the "REVIEW" thread.

I recognize I just don't know what's the good criteria to take into account so it's just my humble opinion :-)

Julien.
matm matm
Reply | Threaded
Open this post in threaded view
|

Re: Registry keys for Windows compilation

In reply to this post by matm
Le Sat, 19 Nov 2011 22:37:25 +0100, Mat M <[hidden email]> a écrit:

> Le Sat, 19 Nov 2011 19:02:56 +0100, julien2412 <[hidden email]> a  
> écrit:
>
>> Hello,
>>
>> I'm trying to compile on Windows Vista (usually I compile without pb on  
>> a
>> Debian testing) and had error messages :
>> checking the Perl version... checked (perl 5)
>> checking for required Perl modules... all modules found
>> checking for a friendly Microsoft C/C++ compiler installation path...  
>> Can't
>> find MS Visual Studio / VC++ at ./oowintool line 188.
>> cygpath: can't convert empty path
>> cygpath: can't convert empty path
>>
>> checking for mspdb80.dll... no
>> checking for mspdb100.dll... no
>> checking the Microsoft C/C++ Compiler... checking for cl.exe... no
>> cygpath: can't convert empty path
>> cygpath: can't convert empty path
>> configure: error: Microsoft C/C++ Compiler not found. Use  
>> --with-cl-home or
>> set path to cl.exe.
>> Error running configure at ./autogen.sh line 157.
>>
>> I took a look at oowintool, the pb is cygwin doesn't map all the
>> /proc/registry.
>> For example, there's nothing there :
>> /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VCExpress
>
> If you use Express 2010, the key is in HKEY_CURRENT_USER.

Answer to myself: no, it is in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node in  
the real x64 registry.
And cygwin seems to map it to /proc/registry/HKEY_LOCAL_MACHINE/SOFTWARE.
Wow.

Mathias
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice