Posts Tagged ‘mac’

Xcode for WordPress Plug-in Developers

This post is an extension to this excellent article except with a subtle difference, I’m not interested in hacking the WP core, I’m writing a plug-in :)

I’m going to assume that you’ve requested access to WordPress.org’s SVN repository, and you’ve found the admin panel and want to get your Xcode goodness hooked up to the WP SVN.

To get started create a new Empty Xcode project.

Screenshot of Xcode project chooser Empty XCode waiting for LINICKX LifeStream
Xcode project chooser Empty Project

From the menu bar select SCM then Configure Repositories, the window select the + to add a new repo, the username & password pair are your wordpress.org credentials, you can find the URL to your SVN repo on the wordpress.org site.

WordPress dot org Admin Interface
The WP.org admin interface

Next from the menu bar select SCM then Repositories, highlight the repo you’ve just created and choose checkout; you’re going to be asked for a folder to “save” the contents of the repo to, I chose inside my Xcode project folder.

Checking out with Xcode
Repo’ Config Code Checkout

You now need to add those “checked out” files to you project, in the tree on the left, right/control click the blue project icon at the top and select add existing files, accept the defaults and the repo should be imported.

Code imported
Imported Code

These files now in the project need to be associated with the repo, this is done by highlighting the blue project icon and clicking the “Info” button, then click “Configure Roots & SCM”; click the + button and choose your repo folder (again)… the dropdown on the right should automatically select the correct SCM.

Project LINICKX LifeStream Info WP Xcode Edit Project Root
Project Properties Project Roots

If you now change a file / add / delete / etc it will appear under the SCM tree, you can right/control click and commit to the repo…. job done :)

WP Xcode readme txt changed
Yay it works!

Very quickly you’re going to find out that you want to test your changes prior to commiting them, to do this you may want to copy your files upto a webserver…. I get Xcode to do that for me, using macfuse to mount my webroot via ssh but for this example I’ll create a directory on the desktop … you also need to create any subdirectories you may need.. I have to create “admin”.

To copy the files we’re use an Xcode target, from the menu bar choose Project then New Target then Copy Files Target, I called my new target CopyFile. Using the info button change the absolute path of the copy – e.g. /Users/Nick/Desktop/LL … now here I ran into a problem (suggestions welcome)… next I created extra copy build phases for each subdirectory. Control/right click your Target ( i.e CopyFiles) then choose Add, New Build Phase, New Copy Files Build Phase… I then set the absolute path of this “sub target” to /Users/nick/Desktop/LL/admin/ to represent my admin subdirectory.

Finally DRAG down the files into their correct target, all being well and a fair wind clicking “BUILD” will cause your files to be copied into your directory. You can now make changes, click build to test, and then commit them to subversion when you’re happy :)

WP Xcode - Finished
Finished!

The red sweater post that inspires this now talks about creating a RUN shortcut to automatically open a web browser for testing, however mine didn’t work… I got this error “The program being debugged is not being run“… suggestions to fix welcome!

Is Mac the Anti-Linux or the Answer?

So, I’ve been toying with the idea of buying a mac. Using WindowsXP is a no go for me, we’re just not friends; work haven’t yet rolled out Vista. I love linux, have been using it for years, and have upset many an I.T department by partitioning their loving-crafted standard Windows Build with my favourite flavour of linux but I’m getting the same old Gripes….

Hardware-Compatibility: Now don’t get me wrong, fedora has installed and pretty-much worked out of the box for years, but it’s the little niggles that get you, my hp nc6320 (company issued) has an intel wireless card, and quite frankly the fedora support is unreliable; if it’s not issues where by I can’t connect to hidden ssids, I can’t run leap, and even my broadcasted home wpa network can be a bit flakey (my n800 & ps3 use it fine so it’s definitely a laptop issue)…. top this off with the odd issue with graphics cards, very little support for mobile broadband, fingerpint authentication and it’s enough to drive anyone mad!

Work-Compatibility: Like most UK companies EVERYTHING has a windows focus, even down to the linux web-managed-appliances which have to be ie7 compatible. Open-office is great, but I can’t run the macro’s written by our marketing department (which format things) and even if I do manually make it look right the conversion to MS-Word is a bit “iffy”. Evolutions exchange-connector works most of the time, but archiving my mailbox from outlook screws it, changing my password (due to expiry) cause mail-notification to freak-out, and the built-in html formatting engine doesn’t set a font so if I reply to an HTML e-mail, all my text is in the nasty times roman.. and just another couple of points since I’m in full rant, share-point support in firefox! and what is everyone’s obsession is MSN and office communicator, what’s wrong with skype or google talk both of which have platform independent solutions. (Yes pidgin supports MSN, but it’s not feature complete)

So is a mac the answer? Those I’ve known an met whom own macs (and in the UK, unless you’re in media they’re few and far between) have all said “everything just works”… oh how I’ve longed for that… and the UI is nice, so all the compiz prettyness that I’ve gotten used to is kinda there. I’ve done some research, there’s an offical office for mac, which support exchange, there’s a communicator for LCS which includes msn support, there’s certianly more off the shelf software that supports mac than linux!

But is it out of the frying pan into the fire? Let’s look at why XP doesn’t work for me, 1stly the interface, it makes me feel unconfortable, I’ve tried themeing it, but that just covers up the bad colour scheme, themes ocasionally slow your machine down, some apps don’t accept the theme engine, and after-all you’re just painting a bad egg so even if it is easier on the eye the problems sill exist! All this aside, Vista is supposed to address the usability and eye-candy issues, so maybe I should be using that? So user-interfaces could be considered a shallow reason to choose your OS, and to be honest although how I interact with the PC is important (since it’s what I do for a living) it’s not what attracted me to linux in the 1st place. FREE, yes FREE is what attracts most of us to linux, windows licencing and cost is a nightmare, winzip & winrar are examples of stuff you expect to have as part of the OS, yes XP can open .zips but what about .tgz? … OK lets look at terminal emulation or ssh, finding a good one can be a problem putty is great but it’s a bit dis-jointed, the sftp function isn’t built into explorer tab’s is an extra add-on… what about the stuff you occasionaly use, so I re-size the odd image or convert .jpg to .png should I be paying for a tool I only use once a month, if I should, can I afford it?

The investment in a mac is not a small one, so my question is, can I get the best of both worlds? Can I buy the software I need, and download open-source alternative easily for the rest? Can I mix the “it just works” with the tech-tinkering that I’m used to? After purchasing a macbook, ms office for mac, vmware-fusion (I have vm-ware server on linux to run visio, I know this will be no-different on a mac) and topped that off with a backup-solution (work pay to backup windows, rsync does the job for linux) I’m going to have spent best part of £1,500… oh yeah this includes a special VGA cable so I can plug into a projector… apple are known for tying users in tightly, will that become my new bug-bear? which leads me to….

Is Mac the Anti-Linux?
Apple insist that their OS runs only on their hardware, the ipod only works with their software (itunes) and plays their music format, you need special cables to plug your laptop into a standard monitor/projector, the iphone only works with apples chosen provider… is all this restriction going to make things worse? Linux is about freedom, machine architectures range from pda’s to playstations, the interface that you use can easily be changed, nearly everything is open and if I were a programmer I could fix, change, anything I liked…. would I be jumping from complete democratic freedom to a dictatorship?

So there we have it, a million questions I just don’t know the answer to! I do know I don’t have a grand kicking about, so this won’t be something I tackle lightly, if I do I then have the politics at work to address, no booting into linux isn’t supported by IT, but the laptop is a standard-same-as-everyone-else-thingy if I bring in a shiny new apple it’s going to attract attention…. which will certainly upset someone! The windows of change are bring more macs to the UK, but is it just a fad? More thought is definitely needed, I just hope I can bring myself to a decision soon :)