64-bit builds

Main development forum.

64-bit builds

Postby kimmov » Mon Apr 20, 2009 5:12 pm

Split from thread MSI installer?.

Seems the fact is we need to start building 64-bit versions soon. One thing is that 64-bit Windows is getting more common with Vista and Windows 7. As other applications get ported to it also. Other good reason is it simplifies our installing when we have all components 32 or 64 bit, and not just one DLL (shell extension) as 64-bit.

There are several steps and problems still to solve:
* Building. How should we build 64-bit version and with which VS version?
Few months ago Takashi added 64-bit VS2008 project files into SVN. 64-bit builds require just new target for VS2005 and VS2008. For VS2003 64-bit building requires loading different environment to use PSDK compilers etc. So I'm ready to left VS2003 out as 64-bit builder, too much hassle to develop with it. I personally would like to use VS2008 as 64-bit compiler. Seems MS says its the first version where 64-bit is really supported and working. But does it leave too many developers unable to build 64-bit?

* Runtimes. We must install 64-bit runtimes. WinXP 64-bit contains runtimes for VS2003, not later VS versions. So we must also install 64-bit runtimes.

* Installing. See the original thread. Seems we need separate installer.

* Releasing. No idea yet. I really don't like idea having to use two separate VS versions for building. But currently I don't see way around that either. Yes, I don't yet want to use VS2008 for 32-bit builds as it doesn't support W9X windows.

* Porting the code. Compiling 64-bit target produces lots and lots of warnings. Kind of warnings that make me wonder how well it actually works. Basically we need to look through those warnings and fix possible bugs. Which isn't always so obvious. One common bug happens when there is some pointer arithmetic - pointers in 64-bit build are 64-bit but integer (and DWORD) are 32-bit. So every code that puts pointer to int/DWORD is simply broken.

Still, the fact is the only way to find these bugs is to start building and testing 64-bit versions.
kimmov
 
Posts: 562
Joined: Thu Sep 11, 2008 8:51 pm
Location: Finland

Re: 64-bit builds

Postby kimmov » Mon Apr 20, 2009 6:41 pm

Forgot one thing:
* Frhed. We probably need 64-bit builds of Frhed too. Considering we are now porting Frhed to Unicode that may take a while...
kimmov
 
Posts: 562
Joined: Thu Sep 11, 2008 8:51 pm
Location: Finland

Re: 64-bit builds

Postby kimmov » Wed Dec 30, 2009 11:22 pm

I've already updated WinMerge project files to VS2005 format. I've no access to VS2003 anymore so I simply had to do this. Nice side-effect is that now we can add 64-bit targets to same project files since we don't need to care about VS2003.

I already added 64-bit targets to ShellExtension project file. So now one can build 64-bit ShellExtension with VS2005 or later without using additional tricks to setup the env. I will update the build script to build 64-bit ShellExtension (currently it assumes 64-bit ShellExtension is build beforehand).

I also fixed WinMerge 64-bit project file to build 64-bit version with VS2008. But that is just to make sure 64-bit builds work.

Adding 64-bit targets to WinMerge project file should be pretty easy. The external projects (expat, scew, pcre) might need some tricks. PCRE uses CMake so it probably is wise to create new project files for 64-bit instead of modifying generated project files.
kimmov
 
Posts: 562
Joined: Thu Sep 11, 2008 8:51 pm
Location: Finland

Re: 64-bit builds

Postby gerundt » Tue Jun 29, 2010 1:09 pm

I tried at the weekend to compile "WinMergeX64.sln" (config "X64 Debug" and "X64 Relase") on a German Windows 7 x64 machine with VS2008.

If found small issues and fixed them, but I have no idea how to fix my current problem:
* Open WinMergeX64.sln
* Call "Build -> Build solution" ("Erstellen -> Projektmappe erstellen" in German)
* After some time I get the following error:
LINK : fatal error LNK1104: File "pcre.lib" can't open.

I found no compiled PCRE files in the build folder or somewhere else. So it don't seems to be a post build event error, like I had with expatX64.

If I start the build from the pcre solution direct, it compiles with no error.

Have you some ideas, what going wrong?
gerundt
Site Admin
 
Posts: 192
Joined: Wed Sep 24, 2008 8:47 am
Location: Germany

Re: 64-bit builds

Postby kimmov » Tue Jun 29, 2010 2:46 pm

No ideas at the moment. Do you see from build log (or from output window) if it tries to compile PCRE? And if tries, does it fail for some reason?
kimmov
 
Posts: 562
Joined: Thu Sep 11, 2008 8:51 pm
Location: Finland

Re: 64-bit builds

Postby gerundt » Tue Jun 29, 2010 4:57 pm

Ok, it was after all a post build event error! The "X64 Debug" config had no post build event and "X64 Release" had an syntax error inside.

PCRE compile it "Externals\pcre\Win32\x64\X64 Release" with an whitspace in the last foldername. The copy command in the post build event don't use "" and stumble over the whitespace.
Is now fixed in SVN!
gerundt
Site Admin
 
Posts: 192
Joined: Wed Sep 24, 2008 8:47 am
Location: Germany

Re: 64-bit builds

Postby kimmov » Tue Jun 29, 2010 5:04 pm

Thanks a lot for fixing these issues!

So I guess we should just include 64-bit binaries to next experimental release to start getting feedback. I'm not sure if InnoSetup is up to the task so we'll probably need to include those binaries to MSI installer.
kimmov
 
Posts: 562
Joined: Thu Sep 11, 2008 8:51 pm
Location: Finland

Re: 64-bit builds

Postby gerundt » Tue Jun 29, 2010 6:54 pm

The MSI setup is ready for x64 but I think the InnoSetup not! Maybe we can look at Takashi's InnoSetup x64 script:
http://bitbucket.org/sdottaka/winmerge- ... rgeX64.iss

But maybe we should only start with x64 MSI setups and not with normal x64 setups.
gerundt
Site Admin
 
Posts: 192
Joined: Wed Sep 24, 2008 8:47 am
Location: Germany

Re: 64-bit builds

Postby kimmov » Tue Jun 29, 2010 7:22 pm

Agreed. As we are deprecating InnoSetup installer anyway it makes sense to concentrate on MSI installer for x64.

I think there was problem the installer was not properly detecting it is run in x64? Or do I remember wrong? I think we can have just separate MSI installer file for x64. Generated from the same "source" files but separate binary file. I think most projects do that. And the installer file size is smaller (and download for users) when we don't need to include both x86 and x64 runtimes etc in the same package.
kimmov
 
Posts: 562
Joined: Thu Sep 11, 2008 8:51 pm
Location: Finland

Re: 64-bit builds

Postby gerundt » Wed Jun 30, 2010 6:37 am

You can compile a MSI to run on 32 bit (which also run in the 32 bit mode of a X64 Windows) or as real 64 bit setup. In this case the setup only run at X64 machines. So we can't mix 32 and 64 bit MSI setups.

But we can use the same WIX script to build the two MSI setups:
Code: Select all
msbuild.exe WinMerge.wixproj /p:Platform=x86

Code: Select all
msbuild.exe WinMerge.wixproj /p:Platform=x64

In this case we get a WinMerge-x86-Setup.msi and a WinMerge-x64-Setup.msi file.

I don't know something about that the installer was not properly detecting it is run in x64. But we can later forbid the 32 bit setup to run on X64.
gerundt
Site Admin
 
Posts: 192
Joined: Wed Sep 24, 2008 8:47 am
Location: Germany

Next

Return to Developers

Who is online

Users browsing this forum: No registered users and 1 guest