AMX Project - Folder Structure
7 February 2006, 06:00 by Chad Reynoldson
Anyone who has worked with me, knows that I am a stickler for procedures, processes, and framework. Over the years, I’ve developed a folder structure for AMX projects. Since going on my own, I’ve taken my structure to another level and I’d like to share it with you.
My main rules of thumb for the folder structure: – Consider my customers needs for project archiving, – Consider my own needs for version control with SVN,- Consider the NetLinx Studio project managament features.
The Root of it all

The root folder of any AMX Project should include the name of the project. I also like to create a short 3 letter acronym to identify the customer (for example AMX My Test Project). This also helps to sort the projects by customer.
This root folder is where the AMX code and the NetLinx Studio workspace files go.
Sub-Folders

I break down two sub-folders, Deliverables and Non-Deliverables. Each is described below.
This is an important point on sub-folders: “linked” files within a workspace may have a relative path to sub-folders of the workspace (our root). You will NOT need to export the workspace to send to your customer (which lumps all files into a single folder, destroying your structure). Instead, you can simply zip up the root folder (and the sub-folders) to send. All links are relative to the workspace file and therefore are still valid.
Deliverables

Deliverables are all of the associated files that need to get delivered to the customer (along with the code and workspace). Generally these are the files that are “linked” to the workspace.
The deliverable files include things like drawings, manuals, wiring instructions, IR files, and UI files. This is also a good location to keep “appFiles”, which are data associated with applications that generate code (CodeCrafter). Other “appFiles” include things like Biamp Audia files, Soundweb files, etc.
Non-Deliverables

Non-deliverables are files that do not need to be sent back to the customer. These are generally files sent to you by the customer, things like autocad drawings, template TPD files, graphics, etc. You simply use these files to generate deliverables.
The folder structure here is pretty open, since it is only ever seen by you.
Include File Path Hiccups
I’d like it if we could also provide sub-folders for include files. Unfortunately, NetLinx Studio does not do a good job of locating the files when compiled. You can create a path to include files (Settings>Preferences>NetLinx Compiler), but this only works well in the context of global include files, plus this method fails miserably with distribution of your zipped project. The context here is project specific include files. So I still stick the include files in the root folder with the rest of the code.
Batch File
I’ve created a batch file that will create this directory structure in a newly created project root folder. I also use this batch file to copy my framework files into the project. You can also add this batch file to the context menu of Windows Explorer.
Here is the batch file:
rem This creates sub-folder structure for AMX projects.
rem http://www.theeldergeek.com/file_list_generator.htm
md "Deliverables"
md "Deliverables/DOCS"
md "Deliverables/DOCS/appFiles"
md "Deliverables/DOCS/drawings"
md "Deliverables/DOCS/manuals"
md "Deliverables/DOCS/readme"
md "Deliverables/IR"
md "Deliverables/IR/pronto"
md "Deliverables/UI"
md "Deliverables/UI/images"
md "Deliverables/WIRE"
md "Deliverables/WIRE/cables"
md "NonDeliverables"
md "NonDeliverables/DOCS"
md "NonDeliverables/DOCS/appFiles"
md "NonDeliverables/DOCS/drawings"
md "NonDeliverables/DOCS/manuals"
md "NonDeliverables/DOCS/quotes"
md "NonDeliverables/IR"
md "NonDeliverables/IR/pronto"
md "NonDeliverables/UI"
md "NonDeliverables/UI/images"
copy "R:\AMX\_Framework\_AXI\nAMX_Queue.axi"
Zip the project
Winzip 10 Pro has a jobs capability that can easily be used to selectively filter whichever folders you’d like zipped up. I have not used this yet, but will investigate it further.

Share This Article
Comments
Comments are turned off for this article.
