Difference between revisions of "Developing in Eclipse on Win32"

From MythTV Official Wiki
Jump to: navigation, search
Line 34: Line 34:
 
mythtv\config.mak
 
mythtv\config.mak
 
Change  
 
Change  
PREFIX=/c/mythtv/build
+
PREFIX=/c/mythtv/build
LIBDIRNAME=lib
+
LIBDIRNAME=lib
LIBDIR=/c/mythtv/build/lib
+
LIBDIR=/c/mythtv/build/lib
 
to
 
to
PREFIX=/c/mythtv/build
+
PREFIX=/c/mythtv/build
LIBDIRNAME=lib
 
LIBDIR=/c/mythtv/build/lib
 
isEmpty(MINGW_IN_SHELL) {
 
PREFIX=C:\mythtv\build
 
 
  LIBDIRNAME=lib
 
  LIBDIRNAME=lib
  LIBDIR=C:\mythtv\build\lib
+
  LIBDIR=/c/mythtv/build/lib
}
+
isEmpty(MINGW_IN_SHELL) {
 +
  PREFIX=C:\mythtv\build
 +
  LIBDIRNAME=lib
 +
  LIBDIR=C:\mythtv\build\lib
 +
}

Revision as of 20:08, 3 July 2008

Introduction

With the release of QT Eclipse integration and the move to QT 4.4, it is now possible to have a fully working environment on Eclipse on Windows.

Important Note:

There are a few issues that need working around

  1. CMD and SH - Eclipse issues all commands under CMD, not SH. Therefore some modification need to be made, mainly to the build process. I am trying to get these into svn, but until then they are manual steps
  2. Eclipse support for PRO - for unknown reason, Eclipse cann't import the three mythtv projects. A few workarounds are in place

CMD and SH

QMAKE supports compilation under windows both in CMD and SH environments. Both environments match the win32 directive in pro files. To distinguish between CMD and SH, QMAKE checks if sh.exe is in the PATH. If it is found in the path, then QMAKE_SH is set to "path to sh.exe", otherwise it is left empty. The default gmake.conf (mkspecs\win32-g++\gmake.conf) uses this value to set some CMD or SH defaults, and sets the value MINGW_IN_SHELL if SH.exe is used. Some parts of the mythtv pro files need to also use this value to provide an alternative for CMD build.

Overview of the process(Draft)

  1. Install Eclipse for Windows, Perl support for Eclipse, SVN Plugin for Eclipse and TrollTech's QT integration
  2. Run win32-packager.pl and build a completed mythtv,plugins and themes. For this example, we'll assume it was installed in c:\mythtv INSTALL_ROOT
  3. Edit the C:\Program Files\Trolltech\Eclipse\start.bat that starts Ecplise so that c:\msys\1.0\bin is not part of the path. For example:

set path=c:\mingw\bin;c:\perl\site\bin;c:\perl\bin;c:\windows\system32;c:\windows

  1. Create the Eclipse project files in mythtv, mythplugins and myththemes. See section below for details
  2. Make some changes in mythtv\config.mak, and pro files to support CMD build as well as SH
  3. Start up Eclipse
  4. Tweak some Eclipse settings
  5. Integrate SVN
  6. All make files should work, including install
  7. Start working :)

Creating Eclipse Project Files

The final objective is to get win32-packager.pl to create this by request. Until that happens..


Change config.mak and pro files to support CMD builds

The final objective is to get these changes into SVN by default. Until that happens, they are summarized below

mythtv\config.mak Change

PREFIX=/c/mythtv/build
LIBDIRNAME=lib
LIBDIR=/c/mythtv/build/lib

to

PREFIX=/c/mythtv/build
LIBDIRNAME=lib
LIBDIR=/c/mythtv/build/lib
isEmpty(MINGW_IN_SHELL) {
 PREFIX=C:\mythtv\build
 LIBDIRNAME=lib
 LIBDIR=C:\mythtv\build\lib
}