Default AMX Projects
3 September 2008, 16:05 by Chad Reynoldson
A while back, I wrote an article about AMX folder structures. This is a revision that works much better, thanks to xcopy and winzip job wizards.
Default AMX project
I have a default file/folder structure that contains default files and folders just the way that I like them. It is a pretty basic folder structure with Dealer Files, Includes, Modules, UI, IR, and Docs. Each folder may contain other sub-folders, including _private folders (see below).
Batch File
The batch file is pretty basic using only the xcopy command shown below. Notice that I only provided a source without any destination. The /E command line parameter includes directories (plus empty ones). The /K command line parameter includes copying attributes (specifically read-only for include files).
xcopy "C:\...path to...\_Default Workspace" /E /K
Right Click Context
I had found this article that shows you how to add right-click context functionality to folders from Windows Explorer. With this, I simply create a new folder, right-click it, and select “Create AMX Project”. Voila, the folders and files from the default workspace are copied and I am quickly off and running.
_private folders
Winzip 10/11 Pro has a jobs capability that is a very powerful way to create zip files to send to customers. I place my winzip job file inside of the default workspace with a basic setup that I modify slightly for each project. Most importantly, there is an “exclude” filter in the job that looks like this: \_private\*. Basically this will exclude any files in a _private directory from being added to the zip file. Of course I also exclude other items like: .src, *.tkn, and *\.svn\*.
—————UPDATE—————
I added a prompt to obtain the project name. This will do many things:
- Create a folder using the name entered.
- Open up the default workspace and swap out these default hooks using CHANGE.COM provided by ZiffDavis back in the day:
- —-WorkspaceName—-
- —-ProjectName—-
- —-SystemName—-
- Master source file identifier and filename
- Rename default workspace and netlinx to the name entered.
- Change PROGRAM_NAME in netlinx to the name (note that my default netlinx template was too large for this to work so I do it manually).
rem ..........This creates sub-folder structure for AMX projects. rem ..........http://www.theeldergeek.com/file_list_generator.htm rem ..........prompt for a project name set /P _Prj=Project name? If "%_Prj%"=="" goto :exit rem ..........Make directory and change to it md "%_Prj%" cd "%_Prj%" rem ..........copy files & folders xcopy "C:\...path to...\_Default Workspace" /E /K rem ..........Change the hooks in the template workspace rem ..........http://www.golden-triangle.com/CHANGE.ZIP (from ZiffDavis) change template.apw "---WorkspaceName---" "%_Prj%" change template.apw "---ProjectName---" "%_Prj%" change template.apw "---SystemName---" "%_Prj%" change template.apw "template" "%_Prj%" rem ..........Change the hooks in the template netlinx code rem ..........http://www.golden-triangle.com/CHANGE.ZIP (from ZiffDavis) change "template.axs" "PROGRAM_NAME=''" "PROGRAM_NAME='%_Prj%'" rem ..........rename workspace & filename to the project name rename "template.apw" "%_Prj%.apw" rename "template.axs" "%_Prj%.axs" rem ..........on exit, kill the environment variable :exit set _Prj=

Share This Article
Comments
No Current Comments
