]> 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 createButton
27     set createButton.In "exec command; quit"
28     set createButton.Label "Go"
29
30 new LayoutLine main
31     connect windowTitle.Widget main.Widget1
32     connect name.Widget main.Widget2
33     connect author.Widget main.Widget3
34     connect description.Widget main.Widget4
35     connect createButton.Widget main.Widget5
36     set main.WinTitle "Create new black box package"
37     set main.WinDialog true
38     set main.WinWidth 400 
39     set main.WinHeight 250 
40
41
42 new Configuration conf
43 new ConcatStrings concatStrCommand
44 #    set concatStrCommand.In1 "."
45     connect conf.BinPath concatStrCommand.In1
46     connect conf.FileSeparator concatStrCommand.In2 
47     set concatStrCommand.In3 "bbCreatePackage "
48 new ConcatStrings concatStr
49     connect  concatStrCommand.Out concatStr.In1 
50     connect dir.Out concatStr.In2 
51     set concatStr.In3 " "
52     connect name.Out concatStr.In4 
53     set concatStr.In5 " '"
54     connect author.Out concatStr.In6 
55     set concatStr.In7 "' '"
56     connect description.Out concatStr.In8 
57     set concatStr.In9 "'"
58
59
60 new ExecSystemCommand command
61     connect concatStr.Out command.In
62     print $concatStr.Out$
63
64 exec main
65