GitLab has been upgraded to 13.7.4 If you encounter any issues mail code@riscosopen.org

Commit 9d059a42 authored by Steve Revill's avatar Steve Revill

Added "Build directory" to the things you can do in the main window's menu.

You can now open the build directory from the main window's "View" submenu,
which complements the pre-existing functionality.

Also squashed a whole slew of build warnings. This was some shoddy code...

Version 0.26. Tagged as 'builder-0_26'
parent fdd47598
......@@ -13,4 +13,4 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine all THROWBACK=-throwback
amu_machine all THROWBACK=-throwback
\ No newline at end of file
......@@ -14,4 +14,4 @@
|
Dir <Obey$Dir>
amu_machine clean
stripdepnd Makefile
stripdepnd Makefile
\ No newline at end of file
......@@ -13,4 +13,4 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine debug THROWBACK=-throwback INSTDIR=<Install$Dir>.Apps
amu_machine debug THROWBACK=-throwback INSTDIR=<Install$Dir>.Apps
\ No newline at end of file
......@@ -13,4 +13,4 @@
| limitations under the License.
|
Dir <Obey$Dir>
amu_machine install THROWBACK=-throwback INSTDIR=<Install$Dir>.Apps
amu_machine install THROWBACK=-throwback INSTDIR=<Install$Dir>.Apps
\ No newline at end of file
| !Boot for Builder
| !Boot for BuildApp
IconSprites <Obey$Dir>.!Sprites
......@@ -12,4 +12,4 @@ Set AutoBuild$EnvName <Build>
If "%0" = "ImageName" Then do <Perl$Dir>.perl <Build$Dir>.BuildSys.perl.ImageName %1 Else do <Perl$Dir>.perl <Build$Dir>.BuildSys.perl.NewImName -verfile <Choices$dir>.AutoBuild.<Build>.Version %1
| the rest should be passed onto srcbuild
srcbuild -v %*2
srcbuild -v %*2
\ No newline at end of file
No preview for this file type
/* (0.25)
/* (0.26)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.25
#define Module_MajorVersion_CMHG 0.26
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 23 Jul 2014
#define Module_Date_CMHG 31 Oct 2014
#define Module_MajorVersion "0.25"
#define Module_Version 25
#define Module_MajorVersion "0.26"
#define Module_Version 26
#define Module_MinorVersion ""
#define Module_Date "23 Jul 2014"
#define Module_Date "31 Oct 2014"
#define Module_ApplicationDate "23-Jul-14"
#define Module_ApplicationDate "31-Oct-14"
#define Module_ComponentName "builder"
#define Module_ComponentPath "castle/RiscOS/Utilities/Release/builder"
#define Module_FullVersion "0.25"
#define Module_HelpVersion "0.25 (23 Jul 2014)"
#define Module_LibraryVersionInfo "0:25"
#define Module_FullVersion "0.26"
#define Module_HelpVersion "0.26 (31 Oct 2014)"
#define Module_LibraryVersionInfo "0:26"
......@@ -27,14 +27,13 @@
#include "kernel.h"
#include "gadgets.h"
#include "constants.h"
#include "main.h"
#include "parse.h"
#include "file.h"
#include "build.h"
#include "msg.h"
#include "DebugLib/DebugLib.h"
extern build_list_t *build_list;
extern char *build_tree;
/*
* populate the stringset
......
......@@ -31,9 +31,8 @@
#include "env.h"
#include "constants.h"
#include "main.h"
extern char *build_tree;
extern char *default_env;
/*
* Enumerate the env directory and present files as options in the stringset.
......
......@@ -24,6 +24,7 @@
#include "kernel.h"
#include "swis.h"
#include "file.h"
/*
* returns 0 - doesn't exist
......@@ -51,6 +52,8 @@ mkdir(char *dir, int mode)
{
_kernel_swi_regs reg;
(void)mode;
reg.r[0] = 8;
reg.r[1] = (int)dir;
reg.r[4] = 0;
......
......@@ -39,6 +39,7 @@
#include "resources.h"
#include "constants.h"
#include "main.h"
#include "msg.h"
#include "env.h"
#include "file.h"
......@@ -48,28 +49,31 @@
#define WimpVersion 350
static WimpPollBlock poll_block;
static MessagesFD messages;
static IdBlock id_block;
#define IGNORE(x) (void)(x)
int task_handle = 0; /* Wimp task handle */
int iconbar_id = 0; /* object ids */
int menu_iconbar_id = 0;
int menu_option_id = 0;
int menu_view_id = 0;
int window_options_id = 0;
int window_build_id = 0;
int proginfo_id = 0;
char *build_tree = NULL;
char *default_env = NULL;
int default_versioning = 0;
build_list_t *build_list = NULL;
int used_default_options = FALSE;
static WimpPollBlock poll_block;
static MessagesFD messages;
static IdBlock id_block;
static int task_handle = 0; /* Wimp task handle */
static int iconbar_id = 0; /* object ids */
static int menu_iconbar_id = 0;
static int menu_option_id = 0;
static int menu_view_id = 0;
static int window_options_id = 0;
static int window_build_id = 0;
static int proginfo_id = 0;
static int default_versioning = 0;
static int used_default_options = FALSE;
/*
* clean up before exit
*/
int
static int
quit_all(void)
{
build_free();
......@@ -90,7 +94,7 @@ quit_all(void)
* Event handler to be called when toolbox event 1 is generated (by click on the
* 'Quit' entry of the iconbar menu.
*/
int
static int
event_quit(int event_code, ToolboxEvent *event, IdBlock *id_block, void *handle)
{
event_code = event_code;
......@@ -105,7 +109,7 @@ event_quit(int event_code, ToolboxEvent *event, IdBlock *id_block, void *handle)
* Message handler to be called on receipt of a Quit or PreQuit message from the
* Wimp.
*/
int
static int
message_quit(WimpMessage *message, void *handle)
{
message = message;
......@@ -117,7 +121,7 @@ message_quit(WimpMessage *message, void *handle)
/*
* set build tree
*/
void
static void
set_build_tree(char *name)
{
if (build_tree) {
......@@ -135,7 +139,7 @@ set_build_tree(char *name)
/*
* Validate filetype of file then initiate a load and open the main window
*/
int
static int
message_data_open(WimpMessage *message, void *handle)
{
_kernel_oserror *err;
......@@ -184,7 +188,7 @@ message_data_open(WimpMessage *message, void *handle)
/*
* setup the versioning radio buttons appropriately
*/
int version_set_radios(ComponentId sel)
static int version_set_radios(ComponentId sel)
{
_kernel_oserror *er = NULL;
......@@ -217,7 +221,7 @@ int version_set_radios(ComponentId sel)
/*
* read in contents of defaults file
*/
int
static int
read_defaults(void)
{
FILE *fh=NULL;
......@@ -264,7 +268,7 @@ read_defaults(void)
/*
* read in contents of build trees file
*/
int
static int
read_builds(void)
{
FILE *fh=NULL;
......@@ -289,7 +293,7 @@ read_builds(void)
/*
* write the list of build directories to the defaults file
*/
int
static int
write_builds(void)
{
_kernel_oserror *err=NULL;
......@@ -324,7 +328,7 @@ write_builds(void)
/*
* save current options in a defaults file
*/
int
static int
write_defaults(void)
{
_kernel_oserror *err=NULL;
......@@ -376,7 +380,7 @@ write_defaults(void)
/*
* attach_other_handlers
*/
int
static int
attach_other_handlers(int event_code,ToolboxEvent *event,
IdBlock *id_block, void *handle)
{
......@@ -384,6 +388,10 @@ attach_other_handlers(int event_code,ToolboxEvent *event,
char template_name[25];
int i;
IGNORE(handle);
IGNORE(event);
IGNORE(event_code);
ERR_CHECK(err,toolbox_get_template_name(0,id_block->self_id,template_name,
sizeof(template_name),&i));
......@@ -408,10 +416,14 @@ attach_other_handlers(int event_code,ToolboxEvent *event,
/*
* Enter the correct version string into window
*/
int
static int
proginfo_show(int event_code,ToolboxEvent *event,
IdBlock *id_block, void *handle)
{
IGNORE(handle);
IGNORE(event);
IGNORE(event_code);
proginfo_set_version(0,id_block->self_id,msg_lookup("_Version"));
return 0;
}
......@@ -419,13 +431,17 @@ proginfo_show(int event_code,ToolboxEvent *event,
/*
* populate the windows with data prior to them being opened
*/
int
static int
window_show(int event_code,ToolboxEvent *event,
IdBlock *id_block, void *handle)
{
_kernel_oserror *err=NULL;
int i;
IGNORE(handle);
IGNORE(event);
IGNORE(event_code);
dprintf(("", "window_show() called\n"));
if (id_block->self_id == window_options_id) {
......@@ -459,12 +475,16 @@ window_show(int event_code,ToolboxEvent *event,
/*
* populate string set prior to it being shown
*/
int
static int
stringset_show(int event_code,ToolboxEvent *event,
IdBlock *id_block, void *handle)
{
_kernel_oserror *err=NULL;
IGNORE(handle);
IGNORE(event);
IGNORE(event_code);
if (id_block->self_id == window_options_id) {
if (id_block->self_component == OPTIONS_GADGET_ENV) {
/* check for build directory being selected */
......@@ -484,7 +504,7 @@ stringset_show(int event_code,ToolboxEvent *event,
/*
* deal with new stringset value
*/
int
static int
stringset_changed(int event_code,ToolboxEvent *event,
IdBlock *id_block, void *handle)
{
......@@ -492,6 +512,10 @@ stringset_changed(int event_code,ToolboxEvent *event,
char current[BUFFER_SIZE];
int i;
IGNORE(handle);
IGNORE(event);
IGNORE(event_code);
if (id_block->self_id == window_options_id)
{
if (id_block->self_component == OPTIONS_GADGET_TREE) {
......@@ -519,13 +543,18 @@ stringset_changed(int event_code,ToolboxEvent *event,
/*
* deal with radiobutton presses
*/
int radio_click(int event_code,ToolboxEvent *event,
static int radio_click(int event_code,ToolboxEvent *event,
IdBlock *id_block, void *handle)
{
_kernel_oserror *err=NULL;
int state = 0;
ComponentId sel = 0;
IGNORE(handle);
IGNORE(event);
IGNORE(event_code);
IGNORE(id_block);
/* Get state of ImageName */
err = radiobutton_get_state(0, window_options_id, OPTIONS_GADGET_IMAGENAME, &state, &sel);
......@@ -541,10 +570,14 @@ int radio_click(int event_code,ToolboxEvent *event,
/*
* deal with optionbutton presses
*/
int option_click(int event_code,ToolboxEvent *event,
static int option_click(int event_code,ToolboxEvent *event,
IdBlock *id_block, void *handle)
{
int i=0;
int i;
IGNORE(handle);
IGNORE(event);
IGNORE(event_code);
for (i=0; i<(sizeof(options)/sizeof(option_t)); i++)
{
......@@ -557,13 +590,17 @@ int option_click(int event_code,ToolboxEvent *event,
/*
* deal with button presses
*/
int action_click(int event_code,ToolboxEvent *event,
static int action_click(int event_code,ToolboxEvent *event,
IdBlock *id_block, void *handle)
{
_kernel_oserror *err=NULL;
_kernel_swi_regs reg;
int i;
IGNORE(handle);
IGNORE(event);
IGNORE(event_code);
if (id_block->self_id == window_options_id)
{
char cmd[BUFFER_SIZE];
......@@ -673,12 +710,17 @@ int action_click(int event_code,ToolboxEvent *event,
/*
* deal with clicks on the icon bar
*/
int
static int
iconbar_click(int event_code,ToolboxEvent *event,
IdBlock *id_block, void *handle)
{
IconbarClickedEvent *click_block = (IconbarClickedEvent *) event;
IGNORE(handle);
IGNORE(event);
IGNORE(event_code);
IGNORE(id_block);
dprintf(("", "Iconbar clicked\n"));
if (click_block->hdr.flags & Iconbar_Clicked_Select)
......@@ -697,13 +739,18 @@ iconbar_click(int event_code,ToolboxEvent *event,
/*
* deal with key presses
*/
int
static int
key_pressed(int event_code, WimpPollBlock *event,
IdBlock *id_block, void *handle)
{
_kernel_oserror *err = NULL;
WimpKeyPressedEvent *key_block = (WimpKeyPressedEvent *)event;
IGNORE(handle);
IGNORE(event);
IGNORE(event_code);
IGNORE(id_block);
ERR_CHECK_RETURN(err,wimp_process_key(key_block->key_code));
return 0;
......@@ -712,7 +759,7 @@ key_pressed(int event_code, WimpPollBlock *event,
/*
* deal with clicks on the menus
*/
int
static int
menu_selection(int event_code,ToolboxEvent *event,
IdBlock *id_block, void *handle)
{
......@@ -720,6 +767,10 @@ menu_selection(int event_code,ToolboxEvent *event,
_kernel_swi_regs reg;
char cmd[1024];
IGNORE(handle);
IGNORE(event);
IGNORE(event_code);
if (id_block->self_id == menu_iconbar_id) {
} else if (id_block->self_id == menu_option_id) {
switch (id_block->self_component)
......@@ -750,6 +801,11 @@ menu_selection(int event_code,ToolboxEvent *event,
reg.r[0] = (int)cmd;
ERR_CHECK_RETURN(err,_kernel_swi(OS_CLI,&reg,&reg));
break;
case VIEWMENU_BUILD :
sprintf(cmd,"Filer_Opendir <Build$Dir>");
reg.r[0] = (int)cmd;
ERR_CHECK_RETURN(err,_kernel_swi(OS_CLI,&reg,&reg));
break;
case VIEWMENU_LOGS :
sprintf(cmd,"Filer_Opendir %s.Logs",BUILDSYS_DIR);
reg.r[0] = (int)cmd;
......
......@@ -27,6 +27,7 @@
#include "kernel.h"
#include "swis.h"
#include "constants.h"
#include "msg.h"
#define MSG_SIZE 300
......
......@@ -27,6 +27,7 @@
#include <ctype.h>
#include "constants.h"
#include "parse.h"
/*
* compare two strings caselessly
......
/* Copyright 2014 Castle Technology Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
extern char *build_tree;
extern char *default_env;
extern build_list_t *build_list;
......@@ -53,6 +53,7 @@
#define VIEWMENU_COMPONENTS 0x00
#define VIEWMENU_DATABASE 0x01
#define VIEWMENU_BUILD 0x04
#define VIEWMENU_LOGS 0x02
#define VIEWMENU_IMAGES 0x03
......@@ -63,6 +64,11 @@
typedef struct { char name[16]; int id; int def;} option_t;
typedef struct { char action[30]; char msg[4]; int id;} version_t;
extern option_t options[];
extern version_t versioning[];
extern version_t new_versioning[];
option_t options[] = { "list", 0x13, 0,
"clean", 0x11, 0,
"clean_all", 0x20, 0,
......
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