Posts Tagged ‘Windows’

EasyMYP version 2.6 – Release

Wednesday, August 19th, 2009

EasyMYP version 2.6 is released!

It adds / improves the following list of features:

  • Dirties up the code a bit more due to it being beta and having new functionalities
  • A tree view is now available to peak into the archives
  • You can extract anything you want from the tree view by using a simple right click
  • Drag & Drop files in the application to load them, no need to go through the menu anymore!
  • Drag & Drop items from the archive tree to the file system tree!
  • Huge speed increase in lots of places
  • Multi threaded the extraction of files in order to separate read and write operations
  • Last but not least: Persistent options!

Still learning loads of stuff when working on functionalities for this application, so keep them coming!
The application can be found at: EasyMYP on GoogleCode

EasyMYP version 2.6

Tuesday, July 7th, 2009

EasyMYP version 2.6 Beta is up and about!

It adds / improves the following list of features:

  • Dirties up the code a bit more due to it being beta and having new functionalities
  • A tree view is now available to peak into the archives
  • You can extract anything you want from the tree view by using a simple right click
  • Huge speed increase in lots of places
  • Multi threaded the extraction of files in order to separate read and write operations
  • Last but not least: Persistent options!

Still learning loads of stuff when working on functionalities for this application, so keep them coming!
The application can be found at: EasyMYP on GoogleCode

Hyper-V, corrupt virtual machine ?

Saturday, June 6th, 2009

A while back, i had a proof of concept on a hyper-v virtual machine. Said machine, one day, crashed (hypothesys being that the antivirus scanned or tried to write some place not possible due to physical disk limitations). On reboot the machine would not start and the admin told me it was corrupted or something and i had lost the data of the machine.
Since the application was a POC, i did not really care but my boss was still intent on getting the data back…
So i started to take a look into how I could get the data back. So, I downloaded WinImage to read VHD files. Though I could open my file, all my data was absent :( . Searching a bit more I got an AVHD file but could not open it with WinImage. Thus I found that Hyper-V disk files are split into 2:

  • VHD: contains the image before boot of the VM
  • AVHD: contains the modifications of the VM, you may have more than one

Those files are not merged until you actually shutdown the VM… pretty annoying. To merge the files, it is pretty easy. You do not need a Hyper-V server, I was fortunate since my admin was stubborn enough to keep telling me I could not get the data back. You can simply use Virtual PC 2007 and the disk wizard utility.
Once the files were merged I was able to get the data back without any corruption whatsoevre.
And, since the VM config file was corupt, I asked the admin to reload the merged disk into a new server. Only problem is that the new server was not seen as the old one and I got into some authentification poblems with the application on the domain.

So, to end this post, if you have corrupt files, first merge the VHD and AVHD files. Check if you can open them through windows 7, server 2008 or WinImage. As for the server not rejoining the domain, I ll let some AD expert answer if it is possible or not. I think so, but I may be Wrong.

And as a last note, before increasing the size of a disk in Hyper-V, you need to merge the VHD and AVHD files!

In the hope this may help other people

Subversion Hooks on Windows

Wednesday, March 11th, 2009

Context

A few weeks back i decided to make a web site to manage RPG games for people who cannot meet IRL at the request of some friends.

At first, since I was the only one doing any work on the site I did not really care about versionning the code. However came a time where I ended up asking a friend who can do graphics for help in doing the design and layout of the page. After exluding the HTML code from the PHP code in pretty much everywhere came the problem with 2 people working on the same files without versionning… After 2 or 3 incidents I just decided to use my svn server to version the files for the web site.

However, when you version your code it is not automatically published and you have to use post-commit hooks. And because you do not want your website to hold the svn administration folders you cannot make the website on the web server a checkout folder. Thus you need to rely on svn export.

Configuration

The server is setup with SVN loaded into Apache and both SVN server and Apache server running as services under the account ‘local system’ on a Windows machine. Apache was running with the ‘Local System’ account.

Problem

Thus i started implementing my post commit hook to export the website after each commit. And it did not work.

Resolution

Solving this issue took me quite some time from getting help on IRC or from Google. It also happened because I am not well versed in the technology I use here. Here is the list of thing I tried:

  • Providing a username and password to the svn export command. Unsuccessful (still do not know why).
  • Making the repository readable for everyone. Unsuccessful (I guess it is still linked to point 1).
  • Launching Apache manually. Successful… but not really efficient (due to the use I do of the server (lots of tests)).

Conclusion

To finally get this to work I did the following:

  • Create a user for Apache.
  • Launch a command prompt running as Apache
  • Run the svn export command, svn asked me for a user / password and I provided svn with that information.

And that seems to have done it.

And for information here is the command i used in the post commit hook file (post-commit.bat):

svn export –force reporitoryURL websiteFolderPATH

I however still have unresolved issues:

  • How the heck do I provide a username / password to svn through a command prompt ? (Error: ~ file path not found)
  • Why allowing read access to the repository did not solve the problem ? (Is the local system account unable to access the repository url?) (Do I need to provide the –non-interactive switch?)

Once I have a bit of time I’ll try one of the few things that need to be tried and update / comment this post.

Another experiment after that

Because I also have a subversion repository on my laptop to version the file I work on (I hate having the same files with a version extension, it is just cluttering the folders) and I wanted to backup my versionned files automatically to a network share, once again I had to implement post-commit hooks.

However this time, SVN runs standalone without being integrated into Apache. And this time the export had to be done on a network share mapped on my computer. Because subversion removes all the pathing information before running hooks you have to provide the full network path or remap the drive to your computer before running the export and you also need to have write access for the SVN account to that share (or run the command as another user (no idea how to do that yet))

In the hope that it will help someone, someday.

Chryzo