These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: How to merge and build nHibernate patches
PostPosted: Sat Sep 22, 2007 9:05 pm 
Regular
Regular

Joined: Thu Nov 30, 2006 10:48 am
Posts: 59
In answer to my question (http://forum.hibernate.org/viewtopic.ph ... highlight=), the 'join' tag (implemented for a post-1.2 release of nHibernate) is the solution (but it's not available in the 1.2 GA version of nHibernate). Karl Chu gave me the info that the join-tag code can be merged into the 1.2 GA release (see http://forum.hibernate.org/viewtopic.ph ... 67#2365067). He first kindly sent me a built dll but somehow my system said it wasn't valid. I then merged/built the new code. Here are the cookbook-style steps to do it: (Update 11/08/07 -NOTE: see the notes before the Merge step; they may not be correct :( )

Overview: We need to get the 1.2 GA version of nHibernate from the nHibernate source repository (using Subversion) and then merge some revisions intended for a later release into it (again, using Subversion). We'll download and use TortoiseSVN which is a Windows client for Subversion (it integrates into Windows Explorer which means that Windows Explorer is the application that you use to access TortoiseSVN). We then need to download/install nAnt to generate the correct AssemblyInfo.cs files. Then, start Visual Studio, open the nHibernate 2.0 project, and compile it. Copy the .dll wherever your application that uses nHibernate needs it and add it as a reference.

Install the necessary software (one-time only):
* TortoiseSVN: Download/install TortoiseSVN (http://tortoisesvn.net/downloads) - run the .msi file that's downloaded
* nAnt:
* * Download zip file for nAnt (http://nant.sourceforge.net)
* * unzip zip file into C:\ (e.g. C:\nant-0.85 gets created)


Get the 1.2 GA code from the nHibernate SubVersion repository onto your Windows computer:
* Windows Explorer: create a new folder, C:\RemoteNHibernate
* Windows Explorer: right-click C:\RemoteNHibernate - select 'SVN Checkout'
* The 'Checkout' window pops up. Enter the following into 'URL of repository': https://nhibernate.svn.sourceforge.net/ ... nhibernate
(I kept 'HEAD revision' selected and didn't change the 'Checkout directory' value which was C:\RemoteNHibernate)
* Then click OK in the Checkout window

Update 11/08/07 - NOTE: I don't think I'm using TortoiseSVN's merge correctly. I'll keep this here for now until I find the correct way to use it. There's information on the potential ambiguity of the TortoiseSVN's Merge interface at http://www.svnforum.org/2017/viewtopic.php?p=6385&sid=2361d59141c8a6699d01ef434f037da0
Then, merge the revisions from the nHibernate Subversion repository into the 1.2 GA code that you downloaded:
* After the files are downloaded into C:\RemoteNHibernate, do the following:
=> Windows Explorer: right-click on C:\RemoteNHibernate - select TortoiseSVN - Merge
=> The 'Merge' window pops up. In the 'From' section (top part of window), make sure that the URL is https://nhibernate.svn.sourceforge.net/ ... nhibernate and that Revision is selected. Then, enter the revision. Do this for each of the following revisions: 2774, 2836, 2953, 2955


Run nAnt to generate the correct AssemblyInfo.cs file(s) - if you don't do this, you'll get 'Missing AssemblyInfo.cs' error when you build:
* Open a command window and do the following:
cd C:\RemoteNHibernate
NAnt set-net-2.0-framework-configuration visual-studio


Build this '1.2 GA with revisions' version of nHibernate:
* Visual Studio 2005: File - Open - Project/Solution - select C:\RemoteNHibernate\src\NHibernate\NHibernate-2.0.csproj
* Build the project

Use the nHibernate DLLs in your .Net application:
Instead of including nHibernate as a Project in my .Net application, I just use the .dlls. Therefore, I copied all the files from C:\RemoteNHibernate\src\NHibernate\bin\Debug-2.0 into a folder in my .Net application where I keep 3rd-party libraries. Then, I add all the DLLs (4 of them) as references to my .Net application projects that need them.

Note: the following are the files that are copied:
    Castle.DynamicProxy.dll
    Castle.DynamicProxy.xml
    Iesi.Collections.dll
    Iesi.Collections.xml
    log4net.dll
    log4net.xml
    NHibernate.dll
    NHibernate.pdb
    NHibernate.XML

_________________
metazone


Last edited by metazone on Thu Nov 08, 2007 2:55 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 23, 2007 12:34 am 
Hibernate Team
Hibernate Team

Joined: Tue Jun 13, 2006 11:29 pm
Posts: 315
Location: Calgary, Alberta, Canada
metazone, thank you for taking the time to document these steps to help others. It is much appreciated.

_________________
Karl Chu


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.