Tuesday, September 24, 2013

Fix'n bugs Fix'n bugs...

1) Fixed - Not showing all pattern layers correctly in the debug view(F1).

Wednesday, March 20, 2013

WiX Installer from the Ground Up

I have poked at creating a WiX installer before, but I have to get it working now.

1) Update WiX Toolkit to v 3.8.309

2) Read the Manual....Conclusion... written by an idiot.

3) Read the tutorial....Conclusion... written by the same idiot.

Please not, I am not an XML noob. I've spent a lot of time building tricky schemas so its not the XML that's bothering me.  Simply the unstructured nature of the documentation.   And the version issues.

4) Start following along from the Sample to try to get a grasp on whats going on.  Still baffled.

5) Accidentally find a page in the docs called "How To Guides"  (http://wix.sourceforge.net/manual-wix3/toc.htm)  Score!

Making progress now.... Must be a decent editor for this kind of thing....ask the G man (Google to you lot)

6)  WiXTrim http://sourceforge.net/projects/wixtrim/?source=dlp Looks interesting. Shows recent activity but crashes when I try to load my file into it.

WiX Edit http://sourceforge.net/projects/wixedit/  looks functional.  Basic but progress is much faster than simple hand editing.  Some version incompatability with some of the stuff from the WiX Toolkit docs.  Clean that crap out and use WiX Edit.

WiX Edit seems to be at Version 3.0.5419.0 of WiX
Not compatable with some features that I pulled out  of the current WiX docs:
  • MajorUpgrade Tag
  • MediaTemplate Tag
  • Files which include ShortCut Child Tags
Mmm... keep looking.


The following two are full suite's which will need some more detailed reviewing.

InstallSoft http://sourceforge.net/projects/installsoft/?source=directory
This freaks out the SmartScreen Filter in IE.  Its also bullshit.  Its nothing but a demo project jammed in Italian.  Ignore this project.


War Setup http://sourceforge.net/projects/warsetup/?source=directory
This installer Toolkit is nice. It gets the job done for straight forward projects.  The documentation is good and well written.

OK. I'm calling it.  There are no other sourceforge projects worth mentioning.

Blog post here on WiX editors from the guy who seems to be up to his elbows in the WiX Toolkit development.  Covers most of the candidates that I have found. 
http://robmensching.com/blog/posts/2007/11/20/wix-editors

Votive is the more interesting candidate. Seems to be part of the package but I can't find it on my machine.  Reading the docs that came with the package....


CodeProject?
http://www.codeproject.com/Tips/105638/A-quick-introduction-Create-an-MSI-installer-with

This is a four part article that seems fairly comprehensive. 
http://www.codeproject.com/Articles/103746/Creating-a-Localized-Windows-Installer-Bootstrappe

CodePlex
http://iswix.codeplex.com/


Tuesday, March 19, 2013

Visual Studio 2012 Really Slow Performance

After having VS open and working for a couple of days it starts to run like a real pig. 

I can see icons flickering and intellisense is on its knees.  Closing a small file takes a minute or two now. It keeps spawning Tasks in Task Manager which show as not responding... then slowly killing them off. 

There is some serious thrash on its window refresh... I have displayFusion util to handle the multi-monitors and its overlay icon is thrashing so I can see when the repaint event are being called.

It also seems to be spawning svchost.exe processes and WmiPrvSE.exe processes. There are a bunch of other processes that seem to be hanging around and not doing much of anything.

Reboot'en time...

UPDATE:

This situation has only gotten worse.

When I open the property page for a project its slow, but gets there... if I open the property page of the solution is shows a green "loading something" bar but never completes. (Its on the "Code Analysis Settings" item in the "Common Properties")  I can hear the disk thrashing like a million sick dragonflies.... so its probably paging something horrible through RAM and the cache. I need some solutions as its moved into the "non functional" category.  


Here are some other folks solutions

http://blog.geocortex.com/2007/12/07/slow-visual-studio-performance-solved/

I will check the solutions systematically and see what happens.

 1) C:\Users\...\AppData\Local\Microsoft\WebSiteCache....My projects are not web projects.
But the crazy thing is that folders are being created in the WebSiteCache directory for each of my projects in the solution. WTF?

2) C:\Users\...\AppData\Local\Temp\Temporary ASP.NET Files\siteName.... not a web project
This folder is not being created on my machine.

3) Create a new project...mmm No. I would rather gouge out my own eyes with a plastic fork.  I have a decade of work in this project.

4) Network storage....mmmm No.  But possible...

5) Tools -> Options -> Debugging -> Edit & Continue  ....  Nope.  Did not do anything.

6) OPTIONS>ENVIRONMENT..under Visual Experience, untick “Use Hardware Graphics Acceleration If Available”  .... this is not an option in 2012... but there is something similiar. "Adjust Visual experience based on client Performance"... which when I untick that... after an initial freeze while I assume VS is cleaning itself up... the code editor is now nice and snappy.
The properties page is still choaking to death and there are nasty black borders around all the floating windows on my second monitor... can we say repaint error? Well more like a lockup.

Its doing its weird thing where it spawns lots of items in the "Applications" window and lots of  'svchost.exe' tasks...about 15 of them. (Althought I think they are spurious and not connected as they did not disapear when I ended up shutting down VS)

And now its back....

Even the property editor seems to be responsive now... whoot. Now I just have to remember what I was doing... Oh yeah editing the WIX deployment file.


UPDATE:

After a full reboot.... it took the best part of 5 minutes for VS to open this time.  Not sure what I did but it seems to have really pissed it off.

I have now unticked the "Enable rich client visual experience" and "Use hardware graphics acceleration if availible"... just for fun as it can't really make the situation worse.

Lets see what happens now...

Quite quick. Lots of ugly refresh errors on the edges of windows and some controls... but it gets the job done. The property pages open quickly. (Still can't get to the Code Analysis Settings"...Will have a coffee break and see if its loaded by then)


Now on to Uninstalling add-ins

Uninstall VSCommands.... The whole UI is much faster to boot and seems responsive to editing.  The Property Page issue is still there.  (I might just call that a bug and leave it alone) Syntax highlighting is working again. Menus are still taking 3-4 seconds to pop up.

Uninstalled UML Design Patterns for Visual Studio.....Restarts faster.  Menus feel slightly faster.

Uninstalled the Colour Theme Editor....  No more theme.  Meuns are still 3-4 seconds to open.

Uninstalled C++ Debugger Visualisers .... kinda need this so this is just a test.

Uninstalled NuGet Package Manager... still slow menus.

I am down to "Microsoft Web Developer Tools", "Visual Studio Extensions for Windows Library for Javascript" and the "WIX Toolset".  None of which have an Uninstall option in the Extensions and Updates Manager. (Found the uninstall for the Javascript one in Control Panel > Porgrams and Features" also the Wix Toolkit)

I know I had "Visual Assist X" installed but its not showing up anywhere since I applied the VS Update 1.

I have turned off the "Source Control Plugin" option in the Tools > Options > Source Control.  Did not make any appreciable difference.  ( I was not using VS for Source Control anyway.  I use SVN manually)

For whatever reason in all these tweaks, the editor is now snappy and functional.  Menu's are still a couple of seconds to open.

I'm going to install Visual Assist X again to see if I can uninstall it cleanly.

Restart and Visual Assist X( VAX) is not parsing everything and doing all manner of overheads...
Still does not show up in the add-in manager. Ok, its in the Control Panel > Programs and Features.

Run the Uninstall... restart VS... and the Whole Tomato dialog pops up... WTF?  Tells me to use the Extension Manager... which it was not in when I looked 10min ago.

Looking... Ok... its appeared in the Extension Manager.... Uninstall again. Restart again.

Hmmm... editing is snappy. The menus are still slow but seem slightly faster.

Uninstall the Javascript Library now...took its sweet time... No obvious change.

Running out of ideas beyond throwing more RAM at the machine. 

Trolling the UserVoice forums is frustrating. 






Bug - Key repeating


Seems like all the key s are repeating faster than they did on the old machines ? Or I am not trapping it correctly because the program now drops right out rather than returning to the "go" screen.

Nope its key repeat. All they keys create a double keystroke.

Actually.... its the result of a quick hack I inserted for a student last year.... Doh.

The student needed to detect a key being pressed and later released to capture "periods" from the participant.  As it was a "quick fix".... I had not tested it extensivly.... tada! Bugs in 6 different files. 

All my sins come back to haunt me...

Bug - Stupid Random Number Generator rewrite


Using the new standard library C++0x random number generators is still an aquired taste.

Apparently if you initilise a bunch of random numbers together using the time clock, the value is truncated from a long long (__time64_t, time_t) down to an unsigned int....

I would assume that this involves dropping the MSB (most significant bits) but it seems not to.  So rather than using the bits with the highest entropy,  it uses the bits with the lowest and thus all the random number generators are seeded with the same value.... and generate the same sequence of numbers.  Doh.

The solution is the use the std::random_device to seed the generators and then go from there.  Sounds simple... and it apparently is .... but that did not stop the compiler throwing spurious errors yesterday afternoon on the same code that it happily compiles today.  Remind me why I do this again?

Anyway,  progress. 

Removed one cpp file, two headers and now have less dependancies on boost. (Not a bad thing, just trying to simplify)

Monday, March 18, 2013

Win7 progress...whoot

I have PLL running on Windows 7.

There are some obvious bugs in the random generator for the noise layers but that should be easy to fix.

Now its just a matter of testing and bug squishing until it all works again. Then I can finally make some progress on the new features....

Time for a celebratory walk outside in some sunlight....

Build'n Build'n Build'n....

First Build PLL.... warnings about version issues....

Then figure out that all the libs need to be rebuild....

Build CPPUnit....

Rebuild PLL... Same warnings...

Use correct compiler to clean and rebuild CPPUnit....

Build wxWidgets..... (Try to remember why I inflicted wxWidgets on myself?)

Clean and rebuild wxWidgets....

Hand delete .pdb files and rebuild wxWidgets....

There are a bunch of OutputFile property warnings showing up..... do I have the energy to fix or should I just update the whole library with the latest wxWidgets? How much work will that take to integrate into the system?

Download wxWidgets 2.9.4 and convert the solution files just to see...

With that kind of logic I should update all the libs.... Lets see...  Done.

cuppunit is now at 1.13.1.... download and build.... change environment var. Done.

Thursday, March 14, 2013

Visual Studio 2012 meet XP.... again.

The Update to Visual Studio 2012 (which I am only just catching up with) now allows me to target XP again.  Now I can use this #$%$** thing to support my code base.

My frustration with the current generation of tools is difficult to put into words.  The chronic stupidity of Microsoft and their effort to force developers to move to their new platforms while sabotaging everything else has made my life a mess over the past couple of years.

On one hand the Uni is dragging its feet about upgrading from WinXP to Win7... which has only really (mostly) finished in the past month.  However, I still have XP machines in the labs becasue research boxes are not allowed to use the precious Win7 license pool.... so they have tried to drag all the development machines up to Win7 (becasue Visual Studio 2012 will not run on XP) but still deploy on XP..... as you can imagine this makes the whole debugging round trip just stupidly painful.

So I have been trying to get things done on virtual machines, or using older compiler chains, or just building my own boxes for development while not mangling the code base....

Then I have all the hell of the library situation.  DirectX 9 is still kina alive... but the ways to handle it across two or three different platforms is not exactly the same.  .NET is a moving target for all the GUI stuff.  My options of moving to Qt or WxForms or some other third party windowing library have just resulted in hours of chasing my tail.

In the mean time I have picked up lots of other small projects that sucked my time up and distracted everything by filling my head with all sorts of other  half baked possible solutions.

I have even started looking at developing on the Mac... except the Uni has gone on another anti-Mac crusade... all while purchasing iPads aplenty.... that I have no tools to develop for....

Toss in a few new research systems that have endless weirdnesses, python dependencies, funny little closed wireless networks, medical instrument suppliers that lie through their teeth, debugging licensing systems for companies that just have to invent their own wheels.... AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH

Every so often I wonder what keeps my brains from leaking out my ears....

All I want is a stable platform and a stable set of tools to just get some work done.