]> Creatis software - bbtk.git/blob - packages/toolsbbtk/bbs/appli/CreatePackage.bbs
*** empty log message ***
[bbtk.git] / packages / toolsbbtk / bbs / appli / CreatePackage.bbs
1 description "Creates a new bbtk package file structure on disk (Graphical user interface for the script bbCreatePackage)."
2 author "laurent.guigues at creatis.insa-lyon.fr"
3 category "bbtk tool"
4
5 load wx
6 load std 
7
8 new OutputText windowTitle
9   set windowTitle.In "Package informations"
10
11 new DirectorySelector dir
12     set dir.Message "Select the location of your new package"
13
14 new InputText name
15     set name.Title "Name         (1 word)"
16     set name.In "NEW_PACKAGE"
17
18 new InputText author
19     set author.Title "Author(s)           (caracters   '<',  '>' not accepted...)"
20     set author.In "_author_"
21
22 new InputText description
23     set description.Title "Description            (caracters   '<',  '>' not accepted...)"
24     set description.In "_description_"
25
26 new CommandButton cancelButton
27     set cancelButton.In "quit"
28     set cancelButton.Label "Cancel"
29
30 new CommandButton createButton
31     set createButton.In "exec command; quit"
32     set createButton.Label "Go"
33
34 new LayoutLine buttons
35     set buttons.Orientation Horizontal
36     connect cancelButton.Widget buttons.Widget1
37     connect createButton.Widget buttons.Widget2
38
39 new LayoutLine main
40     connect windowTitle.Widget main.Widget1
41     connect name.Widget main.Widget2
42     connect author.Widget main.Widget3
43     connect description.Widget main.Widget4
44     connect buttons.Widget main.Widget5
45     set main.WinTitle "Create new black box package"
46     set main.WinDialog true
47     set main.WinWidth 400 
48     set main.WinHeight 250 
49
50
51 new Configuration conf
52 new ConcatStrings concatStrCommand
53 #    set concatStrCommand.In1 "."
54     connect conf.BinPath concatStrCommand.In1
55     connect conf.FileSeparator concatStrCommand.In2 
56     set concatStrCommand.In3 "bbCreatePackage "
57 new ConcatStrings concatStr
58     connect  concatStrCommand.Out concatStr.In1 
59     connect dir.Out concatStr.In2 
60     set concatStr.In3 " "
61     connect name.Out concatStr.In4 
62     set concatStr.In5 " '"
63     connect author.Out concatStr.In6 
64     set concatStr.In7 "' '"
65     connect description.Out concatStr.In8 
66     set concatStr.In9 "'"
67
68
69 new ExecSystemCommand command
70     connect concatStr.Out command.In
71     print $concatStr.Out$
72
73 exec main
74