Commit 57eea737 authored by Richard Buckley's avatar Richard Buckley
Browse files

Fixed bug whereby new directory dropped on the build tree register window was...

Fixed bug whereby new directory dropped on the build tree register window was not put into the writable field.

Now look for components files in directory BuildSys.Components.
parent 3c7e339d
......@@ -112,6 +112,24 @@ message_quit(WimpMessage *message, void *handle)
return(quit_all());
}
/*
* set build tree
*/
void
set_build_tree(char *name)
{
if (build_tree) {
if (strlen(name)>strlen(build_tree)) { /* will it fit */
free(build_tree);
} else {
strcpy(build_tree,name);
debug db_printf("build_tree set to '%s'\n",build_tree);
return;
}
}
build_tree = strdup(name);
}
/*
* Validate filetype of file then initiate a load and open the main window
*/
......@@ -139,8 +157,7 @@ message_data_open(WimpMessage *message, void *handle)
{
if (file_exists(path)==2)
{
ERR_CHECK(err,stringset_set_selected(0,window_build_id,
BUILD_GADGET_TREE,path));
set_build_tree(path);
ERR_CHECK_RETURN(err,build_add_entry(path));
ERR_CHECK_RETURN(err,build_populate(window_build_id,
BUILD_GADGET_TREE));
......@@ -161,23 +178,6 @@ message_data_open(WimpMessage *message, void *handle)
return 1;
}
/*
* set build tree
*/
void
set_build_tree(char *name)
{
if (build_tree) {
if (strlen(name)>strlen(build_tree)) { /* will it fit */
free(build_tree);
} else {
strcpy(build_tree,name);
debug db_printf("build_tree set to '%s'\n",build_tree);
return;
}
}
build_tree = strdup(name);
}
/*
* read in contents of defaults file
......@@ -582,7 +582,8 @@ menu_selection(int event_code,ToolboxEvent *event,
switch (id_block->self_component)
{
case VIEWMENU_COMPONENTS :
sprintf(cmd,"Filer_Run %s.%s",BUILDSYS_DIR,build_name);
sprintf(cmd,"Filer_Run %s.%s.%s",BUILDSYS_DIR,
COMPONENTS_DIR,build_name);
reg.r[0] = (int)cmd;
ERR_CHECK_RETURN(err,_kernel_swi(OS_CLI,&reg,&reg));
break;
......
......@@ -25,6 +25,8 @@
#ifndef __constants_h
#define __constants_h
#define APP_VERSION "0.04 (22 Sep 1997)"
#define APP_DIR "<Builder$Dir>"
#define FILENAME_MESSAGES APP_DIR ".Messages"
#define FILE_DEBUG APP_DIR ".debug"
......@@ -33,8 +35,8 @@
#define DEFAULTS_FILE CHOICES_DIR ".Defaults"
#define BUILDS_FILE CHOICES_DIR ".Builds"
#define ENV_DIR "Env"
#define COMPONENTS_DIR "Components"
#define BUILDSYS_DIR "<Build$Dir>.BuildSys"
#define APP_VERSION "0.03 (22 Sep 1997)"
#define BUILD_ENV "Build"
#define MODULEDB "ModuleDB"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment