The Evil Empire

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, LCMark

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2570
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

The Evil Empire

Post by mwieder » Tue Apr 30, 2013 9:06 pm

I take it I'm the first one to try this. :shock:

The story so far:
Virgin Virtualbox Windows XP VM - 20GB dynamic disk
Install git
Download and install Visual Studio Express 2010
git clone the LC repository
Launch Visual Studio
Load the stage.sln file.
The project file needs to be converted (what was the original?), so let it run.
Several conversion problems, mostly just warnings, but errors on the libexternal target:

Cannot load the project due to a corrupt project file.
The following error has occurred during XML parsing: File C:\livecode\libexternal\libexternal.vcproj Line: 86 Column: 5 Error Message: System error: -2147154677 The file'C:\livecode\libexternal\libexternal.vcproj' has failed to load.

"Failed to upgrade platform 'x64'. Please make sure you have it installed under '%vctargetspath%\platforms\x64'.
VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.
Failed to upgrade 'Debug|x64. Please make sure you have the corresponding platform installed under '%vctargetspath%\platforms\x64'.
The project configuration dimension name/value "Platform, Win32" was not found in the project manifest.
Project upgrade failed.

Build
Numerous missing parts:
The QuickTime components (QTML.h, QTMLClient.lib)
The MySQL library (error at link time because of missing mysql.lib)
Revbrowser is dependent on the atl files, which are not part of Visual Studio Express (atlbase.h, atlcom.h, etc. in w32browser.h)
The .vcproj project files are dependent for some reason on the .NET 4 targetting component and won't convert without it.
Missing Speech.h
In the libmysql/src/my_pthread.h file there are a couple of problems dealing with ETIME and ETIMEDOUT which I fixed by moving and #ifdefing.

I take it the revbrowser problems will disappear with the move to webkit, so I'm not particularly interesting in going down that rabbit hole.

I have no doubt that it's possible to build the project given the right environment, but I'm not sure what that would be. Given the fact that the project converter pops up immediately, my guess is that this is set up for an earlier build of Visual Studio, but then the atl libraries wouldn't work. Ideally I'd want to build this in a real IDE (CodeBlocks some other OSS equivalent) and skip Visual Studio altogether, but given the dependencies I'm guessing that's not a feasible solution.

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1558
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: The Evil Empire

Post by monte » Wed May 01, 2013 12:18 am

I think you need VS 2005
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2570
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: The Evil Empire

Post by mwieder » Wed May 01, 2013 12:36 am

I actually have a VS 2005 install disk around somewhere (just have to dig around and find it in the archives), but I don't believe it's available any more from MS, so that would limit the ability to compile from source for the majority of the world (even if they could find all the other missing pieces: QuickTime, MySQL, Speech, etc).

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1558
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: The Evil Empire

Post by monte » Wed May 01, 2013 2:20 am

OK then... I guess that rules me out... I wonder if it would be possible to migrate all platforms to Eclipse+CDT? I've only used Eclipse for android apps but it seems to me that a single open source IDE for all our platforms would simplify things...
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2570
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: The Evil Empire

Post by mwieder » Wed May 01, 2013 4:08 am

I believe the atl stuff is now part of mfc, which I avoid at all costs. As far as I've been able to tell, the only area where this matters is the windows build of the revbrowser. Since that's due for an overhaul in the next few months with the webkit rewrite, my inclination is to comment it out of the build process or stub it if necessary.

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 944
Joined: Thu Apr 11, 2013 11:27 am

Re: The Evil Empire

Post by LCMark » Wed May 01, 2013 10:45 am

It is indeed possible to build the windows components with the right environment - admittedly it is quite specific at the moment...

Here are some links to pre-requisites required to replicate the environment we use for production builds:

Visual Studio / Visual C++ Express 2005
http://go.microsoft.com/fwlink/?LinkId= ... lcid=0x409

Hotfix for Visual Studio / Visual C++ Express 2005
http://support.microsoft.com/kb/949009

Microsoft Windows Platform SDK 6.1
http://www.microsoft.com/en-us/download ... x?id=24826

QuickTime SDK
You will need an Apple Developer account to download the QuickTime SDK for Windows.
https://connect.apple.com/cgi-bin/WebOb ... leID=19910

Microsoft Speech SDKs 4.0 + 5.1
The revSpeech project requires Microsoft Speech SDKs 4.0 and 5.1. These can be found at:
http://download.microsoft.com/download/ ... PI4SDK.exe
http://download.microsoft.com/download/ ... hSDK51.exe

The only thing this doesn't cover is being able to compile revBrowser due to its dependence on ATL - it is possible to make Visual Studio Express use ATL and we're working on some instructions on how to get this to work. However, you can just disable that project for now.

We are going to upgrade to VS2010 at some point in the near future; however, as mentioned with regard Mac, changing toolchains is not something you can do lightly with a project of this size - I still remember the issues we had when we migrated from .NET 2003 to VS 2005 a few years ago (due to significant changes in the standard performance characteristics of the standard C library between the two...).

In regards to other IDEs then you are, of course, free to do as you wish... However, I would recommend that you give Visual Studio a chance. I can't really comment on all the interface design / modelling / server stuff it does as I never use it; but as a way of managing the source tree, editing source, building and debugging I find it to be pretty much the best I've used (for my purposes at least). The 'fix & continue' feature that pretty much always works is a real gem and the Visual C compilers produce excellent code as well.

[ Incidentally, we will be moving towards a 'universal project description' system at some point rather than distinct projects / Makefiles etc. for each platform. This will run through a small tool and generate appropriate projects / Makefiles etc. for the desired target system. At this point it should be very easy to add support for a wide range of IDEs - it will also make it easier to add files to the projects, i.e. add them once, rather than in 6 different places! ]

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1558
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: The Evil Empire

Post by monte » Wed May 01, 2013 10:54 am

add them once, rather than in 6 different places
That's why I thought an eclipse based solution might be good because it might allow for a common set of project files... but if you have it well in hand I'll just use whatever's easiest...
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 944
Joined: Thu Apr 11, 2013 11:27 am

Re: The Evil Empire

Post by LCMark » Wed May 01, 2013 11:12 am

Perhaps - but that then ties everyone to using Eclipse and I'd rather people were able to work in the IDE they feel comfortable with.

The current prerequisites are what we use to produce production builds - and its this part that really needs to remain static and only change periodically (with suitable amount of soak testing). What environment is actually used to develop the code matters much less. I'm hoping that we'll eventually move towards pre-configured toolchains for each platform for production builds all running natively (using a combination of Wine and cross-compilers). People will then be able to develop on whatever platform they wish, in whatever IDE they wish - then run things through the pre-canned toolchains to see if there are any problems on any of the platforms.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2570
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: The Evil Empire

Post by mwieder » Wed May 01, 2013 5:47 pm

@runrevmark- I've used Visual Studio for years and I've got a real install disk for the full VS 2005 around somewhere if I can find it in the archives. I haven't had to install it in years now, so I'll have to dig around. But I think the Express build should do for this.
Visual Studio / Visual C++ Express 2005
How in the world did you find this link? I searched all over for it.

And yes, Visual Studio compiles robust, optimized, tight code but it does tend to enforce a methodology that doesn't sit well with my workflow. I find Eclipse much easier to work with (git integration, etc). Finding and changing compiler options is a pain in VS and seems to get worse with new releases.

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 944
Joined: Thu Apr 11, 2013 11:27 am

Re: The Evil Empire

Post by LCMark » Wed May 01, 2013 5:55 pm

@mwieder: I didn't find the link, Ali did ;)

VS Express is fine for building the engine - the only omission is ATL / MFC which scuppers revBrowser... However, that's only really a concern if you wanted to get your hands dirty with the wonders of embedded Internet Explorer - something I think I'd rather have avoided on quite a few occasions ;)

IDEs do very much come down to personal preference which is why I'd rather we have a system that let's people use the tools they are comfortable with. As long as there's a way for people to check their work against the compilers used for production builds (or a service that does this automatically) in the near future, there's no real problem.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2570
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: The Evil Empire

Post by mwieder » Wed May 01, 2013 5:58 pm

I *so* do not want to mess with IE, embedded or otherwise.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2570
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: The Evil Empire

Post by mwieder » Wed May 01, 2013 7:39 pm

<sigh> unfortunately the link
Visual Studio / Visual C++ Express 2005
http://go.microsoft.com/fwlink/?LinkId= ... lcid=0x409
is actually a download link for the C# compiler.

Update: I found this one (ISO file)
http://go.microsoft.com/fwlink/?linkid=57034

livecodeali
Livecode Staff Member
Livecode Staff Member
Posts: 120
Joined: Thu Apr 18, 2013 2:48 pm

Re: The Evil Empire

Post by livecodeali » Wed May 01, 2013 10:09 pm

Argh, sorry about that, and thanks for catching it.

If you google "Download page for Visual C++ 2005 Express is broken", there seems to be a direct link on that forum thread (I don't have the requisite permissions to post links, it seems), although I'll have to wait until tomorrow to check it.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2570
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: The Evil Empire

Post by mwieder » Thu May 02, 2013 1:00 am

No problem. I'm down to just three errors plus the w32browser thing. Three instances of

.\rsrc\standalone.rc (or development.rc or installer.rc)
error RC2176 : old DIB in standalone.ico; pass it through SDKPAINT

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2570
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: The Evil Empire

Post by mwieder » Thu May 02, 2013 1:12 am

Here's how to compile the source on Windows...

Download and install VS Express C++ from this link http://go.microsoft.com/fwlink/?linkid=57034

Edit: it's an ISO file, so I unarchived it to a folder on a linux box, copied it to Dropbox, then copied and launched the installer on a VirtualBox XP VM.

Download and install the x86 hotfix from the link above.

Now... Visual Studio Express by design doesn't create native Windows components, *only* .NET components. Since we don't give a rat's ass about .NET, go to the next step.

Download the web installer for the Windows SDK 6.1 from the link above - don't bother downloading the ISO file, you'll just end up wasting time downloading lots of stuff you don't need and then unpacking the ISO file afterwards. Launch the web installer instead and when you get to the section where you select components, disable all the .NET components. Remember, we don't give a rat's ass about .NET. Start the installation.

Now go for a walk. Installation will take a while, there's nothing for you to do except watch it, and the progress bar will lie about the progress. Might as well get something productive done in the meantime. Take the dog for a walk. Work in the garden.

Are you back?
After it has finished installing, ignore the part about needing to reboot and running the wizard again.
It won't help.
Really.
If you launch Start | Programs | Microsoft Windows SDK 6.1 | Visual Studio Registration | Windows SDK Configuration Tool (yes, it's that many levels down there) you'll find that it can't be configured by clicking the "Make Current" button because you don't have Visual Studio installed. Remember - we're working with VC Express.

So what you want to do instead is launch Microsoft Visual C++ 2005 Express Edition, open the Tools window and go to Options. In the Options window under Projects and Solutions you want to select VC++ Directories. Then in the "Show Directories for:" box select "Include files". You'll see a list of (three) directories there. Click the folder-or-whatever-it-is icon (the tooltip says "New Line (Ctrl-Insert)" and enter the folder that has the SDK include files. On my system it's "C:\Program Files\Microsoft SDKs\Windows\v6.1\Include".

Now change the "Show directories for" box to "Library files" and do something similar for the Lib directory. Again, on my system it's "C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib".

Now click the OK button and VC++ should be able to find the SDK include files. You'll know if it didn't work because you'll get lots of "can't find 'windows.h'" errors when you build.

You can now build the project. If you've followed things so far, you'll end up with 14 successful builds and 19 failures. Now that's what I call progress. We're almost halfway there.

Now download the two Speech SDK files (version 4 and version 5.1) from the links above.
Run the SAPI4SDK.exe installer.
Move the SpeechSDK51.exe file into an empty directory. It's a self-extracting zip file, and it makes a mess for you to clean up later on. Run the exe file to extract the files.
Run the Microsoft Speech SDK 5.1.msi installer in that directory.
Delete the install directory when you're done.

Download the QuickTime 7.3 SDK for Windows. The link above is bad, so get it from
https://developer.apple.com/downloads/i ... =quicktime . (After logging in with developer credentials)
It's a zip file, but there's only one file in it. Extract it and run.

[Update edit:] removed the step about copying the QuickTime files as unnecessary.

You're also going to need some MySQL files.
Download mysql-5.6.11-win32.zip from Oracle's website at
https://dev.mysql.com/downloads/mirror.php?id=412375
Open the zip file and extract mysqlclient.lib (either one - one's got debugging symbols).
Place them somewhere where the compiler can find them. Again, a good place might be in the C:\Program Files\Microsoft SDKs\Windows\v6.1 Lib and Include directories.

Build again. That should bring you down to only 4 failures.
Last edited by mwieder on Thu May 02, 2013 6:43 pm, edited 1 time in total.

Post Reply

Return to “Engine Contributors”