Hi all,
To me it seems a good idea to post the complete setup since I'm setting it up from scratch.
Already could compile, debug and run HG on windows, but a lot of hacking was needed.
You need to know that I develop(and hack) in virtual machines using VMware workstation 10.
I really like to blow up a vm without compromizing the host.
I'm targetting this report on people that have basic knowledge of Windows, Visual studio and Svn.
Here we go!
Took a vmware that only has a fresh Win7pro 32bit installed, it's a lean and mean win7, all eyecandy is disabled.
Integrated development environment (Obviously you need a compiler)
Installed VisualStudio 2013 Community.
It's free, it doesn't seem to have the limitations of the express edition.
Totally missed the announcment in november last year, but this is a big improvement for developpers.
There are not many configuration options during setup, so this part is very hard to screw up.
Version control (you need this to get the source files and view history)
Installed TortoiseSVN 1.8.10
It's free and the setup is really easy, just download the right (32/64) version for your os.
Integrated version control for Visual Studio (You can do without it, but I think it's handy)
Installed AnkhSvn 2.5.12566
It's free, it's getting pretty good, it can handle multiple repositories.
The setup is easy, you only need to know that (sometines) you have to select it in Visual Studio, enough tutorials online so good
luck.
You can work perfectly without AnkhSvn if you know svn well, it's just handy.
The finishing touch (You can do without it, but I think it's really handy)
Installed Resharper V9Update1
It's NOT free, you can get a 30 day trial or be creative.
You can work perfectly without resharper, but I'm addicted to it.
=====================================
Finished installing software(for now)
=====================================
All software needed to compile/debug and getting the code is now installed.
Let's get the code...
Get yourself a folder somewhere convenient(it's source code!) and call it HomeGenie or whatever convention you're already using.
Now right click on the folder and select SVN Checkout...
Insert the URL of the repository: svn://svn.code.sf.net/p/homegenie/code/trunk
Click OK and it should get the latest revision of HomeGenie.
In my case that was revision 460
Before starting the solution please make 2 folders bin and debug
You create this path: HomeGenie\HomeGenie\bin\debug
Copy really EVERYTHING from HomeGenie\BaseFiles\Windows to HomeGenie\HomeGenie\bin\debug
Now we have the code, find the solution file HomeGenie_VS10.sln
Let's first take windows, later on linux will be discussed, I don't do mac.
If you've gotten so far, let's build.
Well that became very simple since revision 460.
Just open a context menu on the solution or choose it from the menu or hit F6 like I do.
The first time you run there's a possibility that you encounter an unhandled exception.
Stop execution with SHIFT-F5 and run again, this workaround works for me, it only happens once.
If you want to see what's going on, my advise would be to open the output window.
It's under menu->DEBUG->Windows
*****************
Finished building
*****************
I could now start running and debugging, but before you do that, remember I had a clean install.
If you've installed the windows version of HomeGenie you must stop the HomeGenie service before doing that.
If you don't you'll have 2 HomeGenie services at the same time listening on different ports.
If the first HG is on port 80, the second will take 8080 and the third 8081 and so on.
There was an issue when running HG the first time.
The system could not find System.Data.SQLite.dll or one of its dependencies.
The workaround is to start it again for now, this only happens once and you really need a fresh checkout to let it happen.
The HomeGenie project's name should have a bold font, that means it's the startup project.
If it's not the active project, make it the active by using the context menu.
Now hit Run in your toolbar.
A console window should open and you see HomeGenie logging.
Open a browser and go to
http://localhost/Now you can debug if you know how to use Visual Studio.
If you have a clean win7 install like me, there is only IE8 and HG doesn't look pretty.
Get yourself an up to date browser, IE, Firefox, Chrome, they all work.
This is the first part of the tutorial, I'll wait for reactions before I spend more time on it.
Deploying to RPi with my own HG modified code or latest HG revision and the same for RaspberrySharp.IO on Raspberry Pi is my next
goal.
It could be the next chapter...