Wednesday
Oct192011

Xcode - Pre / Post build tasks

If you have ever wanted to run some scripts as part of an Xcode build, it's easier than you think with version 4. Follow these brief instructions to add custom tasks to your build process.

Firstly select the project file in the navigator, then select the target you wish to add a task to. Then select the "Build Phases" tab.

By default you will be presented with the following four "build phases":

Those are the steps which Xcode performs to convert the code you type in it into the code which your computer can understand.

Click the "Add Build Phase" button and select "Add Run Script" to add your own item to the "build phases" list.

The approach Xcode seems to want you to take is to type your script directory into this screen. If you do opt for that approach then there is a whole lot of placeholder values that are provided to you which can make life much easier.

The other fields on that screen will be immediately familiar (their purpose) to anyone who has done some shell scripting, so there is no need to explain them.

Some notes:

  • Documentation on the placeholder values.
  • You can rename the build phase by double clicking its title (you can see above that I have renamed mine to "Run Script - Compile Fact List".
  • Drag the build to be in the order which you would like it to be for formed. (This can make it a pre-build task or a port-build task.)
  • The script will be run from the root directory of your project.
Wednesday
Oct192011

Removing Resharper

If you have ever uninstalled or disabled ReSharper and then realised that Visual Studio is not the same anymore (the intellisense and error hilighting does not work) then this is for you:

Click "Tools" then "Options" to bring up the options window.

If you are primarily using C# then select "Text Editor" then "C#", then:

Select "General" and re-enable "Auto list members" and "Parameter information".

Now select "Advanced" and re-enable "Underline errors in the editor" and "Show live semantic errors".

That should do the trick … visual studio is back to its old self and behave the way you expect it to.

Tuesday
Jul052011

iOS Wallpaper

There are a number of wallpaper apps on the App Store which promise to have the best or largest selection of wallpaper images. I'm sure some of them are great but none of them can compare to the selection on google.

Google's advanced image search parameters make it easy to find images with the right dimensions. Just specify the size and search for "wallpaper", or something more specific if you have something in mind.
If you are also a Dropbox user, consider browsing for wallpaper on your desktop, transferring it to a folder on Dropbox, then browsing this folder on your iOS device when you are in the mood for a wallpaper refresh.
Tuesday
Jan082008

My Dell XPS M1330

Well I have ordered (and recieved) a Dell XPS M1330. It is a really nice machine with everything that I need.

The machine I got is based off the cheapest configuration. I kept the slow Intel Core 2 Duo T5450 (1.66GHz) processor since I wont be doing anything too processor intensive (and because I’m on a budget). I went with the 6 cell battery and thre in a Wireless-N card. I also went with 2Gb of memory because we are still mostly using 32bit operating systems and don’t want to run into messy memory problems. Apart from that the system is standard, nothing fancy.

Of course while waiting for the system to get delivered I was doing a bit of searching to see what other people thought of the system, and found a number of problems which arise with this particular system (happens with every system these days). There are a number of possible problems, the most serious being a loud optical drive when you eject or insert media. Nothing too bad.

The first thing I did when I got the machine was to reinstall windows and get rid of those silly recovery partitions, Dell MediaDirect and all that crap. Simply put, the standard Windows Vista install disk accepts my Dell serial number, but the install does not work and Windows will not boot for some reason … you need to use the Dell Windows Vista disk )recovery disk or whatever they call it). Either way this will most likely only be until KDE 4.0 is released when I will probably install Debian or Kubuntu.

So once Windows is up and running I went through it pretty thoroughly to make sure I didnt have any of the obvious problems that other people were facing. Unfortunately I found a relatively rare one … when ejecting media from the optical drive the machine will freeze for about one or two seconds. This is definately at a hardware level because it happens while in BIOS too. So anyways I have called Dell about it and showed them some forum chatter from other people who have experienced the same issue. They are going to send someone out to replace the drive. I seriously hope that works because what do you think they will do next?

Wednesday
Oct312007

OpenGL And Ubuntu 7.10

So, you have installed ubuntu and would like to compile some OpenGL code? Where do I start … You will need to install two things,the g++ compiler, and (if you need them) the GLUT library.

The compiler is easy, just type the following command into a terminal.

sudo apt-get install g++

Follow the prompts, this should install the compiler. Next, you might need the GLUT library, which can be installed (headers and development libraries) with the following command.

sudo apt-get install libglut3-dev

All set. Compile OpenGL code without any hitches.