Hack 74. Use Neocar Media Center as Your Car PC Frontend
Neocar Media Center is a very popular, highly customizable car PC frontend with a large European following. A couple of years ago, I started planning my own car PC installation. I was very excited, and I thought, "In a few days I'll be playing any multimedia files I want in my car!" Assembling the hardware was easy, as there were already plenty of choices for a good car multimedia installation [Hack #52]. I just needed to find good, powerful software to manage all the new functions. And that was the problemnothing I found worked how I wanted it to. Some good applications were available, but none of them had all the functions I needed. So, I decided to make my own software. This hack is about the Neocar Media Center application that I wrote (http://www.neocarmediacenter.com/?language=EN). After reading it, you should have a pretty good idea of whether you want to use my software as the frontend to your car PC. 7.7.1. Neocar Media CenterWhen I started working on NMC, I had a big problem: I had only rudimentary Visual Basic skills, and I wasn't an experienced programmer. Perhaps this is what led me to really think about the design of my software before I wrote any code. Besides making a frontend application, I wanted a program that was user-configurable, because I wanted users to be able to run it they way they wanted. I also wanted a program that was skinnable, so that I (and other users) could change its appearance with ease. Finally, I wanted to include all the functions I wanted in one program, because I hate having to install multiple pieces of software when one could do the job. NMC is coded to enable you to sort of build your own car PC software. That is, NMC has a lot of functions that the user can choose to use in his particular skin, or not. It's all based on different NMC modules that accomplish the main functions, such as music playing, movie playback, and image display (see Figure 7-17). Figure 7-17. Neocar Media Center main moduleInstalling NMC is simplejust download the latest development version from http://www.neocarmediacenter.com and install it with a double-click. After installing, NMC will automatically load Neocar Manager so that you can enter the only required options: the location of your media folders for music, movies, and images. Once you've saved the configuration, all the other options will be available so that you can set up NMC how you want. Neocar is comprised of three components:
7.7.2. NMC FeaturesNMC derives its functionality from several different modules. It is up to the user to select which modules to display on the main NMC window. Each module can have up to three view modes, which are fully customizable by the user. Using the view modes, you can show all the available options or just a subset, or display the module in full-screen mode. Here are brief descriptions of the currently available modules:
7.7.3. Configuring NMCUsing skins, you can quickly customize the entire look of the application. Since skinning is an important feature to me, I wanted to make it easy to do, and I wanted to include the ability to edit the available skins and create new skins, not just apply existing ones. You can do all of this using the Neocar Skin Workshop (NSW). The interface is similar to other image-editing software (see Figure 7-25). Using the mouse, you select a button to add to the interface, then click on the skin where you want that button to appear. NSW will then display a list of available module controls to assign to that button. Figure 7-25. Neocar Skin WorkshopAfter you've created or modified a skin, NSW lets you validate it for errors. Once you've validated your creation, NSW can make an installer for your skin (using Nullsoft's NSIS installer) and upload the skin directly to http://www.neocarmediacenter.com, where it will be made available for others to use. Each skin is made from just four images:
The skin.xml file (present in the folder for each individual skin) is a file containing information about the position and size of each used control. It also contains text display properties and some skin-related options. While loading, NMC will list the positions and sizes of each of the skin's controls and draw the buttons where you placed them. The image will then be copied from the "normal buttons" skin image, and the background will be painted on the module. With this system, it's easy to remove a button from the skin and just let NMC use the background image to paint the module without that button. So, if NMC doesn't find a control's information, it will simply not paint or load it, so that button's commands will be unavailable. 7.7.4. Neocar ManagerThe Neocar Manager is where you can configure all NMC-related options. You can associate files with NMC, manage your albums, manage your movies, add or remove external apps, and more. There are too many features and configuration options to describe here; the best way to get to know it is to experiment. 7.7.5. Future PlansNeocar is far from finished. I'm working on several stunning new functions, including full GPS embedding, keyboard support, DVD support, audio CD support, character LCD support, and database-driven filesystem support, as well as lots of function improvements and general performance tuning. The best source of feature and support information about NMC is the main web site, http://www.neocarmediacenter.com/?language=EN. There you can find updates on the progress of development, the to-do list, requests, bugs, and more. Stéphane Monnier |