Neptune 1.0 Beta 1 Documentation: install()

Neptune Information

Download from RIA Forge

install()

If the "install" method is included in Program.cfc then it will be executed as part of the program registration/installation can include any code here to take any extra installation action that you want.

Example 1:

<cffunction name="install" access="public" returntype="void" output="no">
	<cfargument name="Config" type="any" required="yes">
	
	<cfset var RootPath = Config.getSetting('RootPath')>
	<cfset var dirdelim = CreateObject("java", "java.io.File").separator>
	<cfset var PathFrom = "#GetDirectoryFromPath(GetCurrentTemplatePath())#files#dirdelim#">
	<cfset var PathTo = "#RootPath#admin#dirdelim#">
	
	<!--- Copy login.cfm to /admin/ if it isn't there already --->
	<cfif NOT FileExists("#PathTo#login.cfm")>
		<cffile action="copy" source="#PathFrom#login.cfm" destination="#PathTo#login.cfm">
	</cfif>
	
	<!--- Copy logout.cfm to /admin/ if it isn't there already --->
	<cfif NOT FileExists("#PathTo#logout.cfm")>
		<cffile action="copy" source="#PathFrom#logout.cfm" destination="#PathTo#logout.cfm">
	</cfif>

</cffunction>