1 description "Creates a new bbtk package file structure on disk (Graphical user interface for the shell script bbCreatePackage)."
2 author "laurent.guigues@creatis.insa-lyon.fr"
9 new DirectorySelector dir
10 set dir.Message "Select the location of your new package"
12 #-----------------------------------------------------------------------------
13 new OutputText dirOutput
14 connect dir.Out dirOutput.In
16 new OutputText windowTitle
17 set windowTitle.In "Create new package folder in :"
20 set name.Title "Name (1 word)"
21 set name.In "PACKAGE_NAME"
24 set author.Title "Author(s) "
25 set author.In "_author_"
27 new InputText description
28 set description.Title "Description (html format)"
29 set description.In "_description_"
31 new CommandButton cancelButton
32 set cancelButton.In "print **CANCEL**"
33 set cancelButton.Label "Cancel"
35 new CommandButton createButton
36 set createButton.In "print $concatStr.Out$; exec command;"
37 set createButton.Label "Run"
40 new LayoutLine buttons
41 set buttons.Orientation Horizontal
42 connect cancelButton.Widget buttons.Widget1
43 connect createButton.Widget buttons.Widget2
46 connect windowTitle.Widget main.Widget1
47 connect dirOutput.Widget main.Widget2
48 connect name.Widget main.Widget3
49 connect author.Widget main.Widget4
50 connect description.Widget main.Widget5
51 connect buttons.Widget main.Widget6
52 set main.WinTitle "Create new black box package"
53 # set main.WinDialog true
55 set main.WinHeight 400
57 new MultipleInputs close
58 connect close.Out main.WinClose
59 connect cancelButton.BoxChange close.In1
60 connect createButton.BoxChange close.In2
62 #-----------------------------------------------------------------------------
63 new Configuration conf
64 # on windows : enclose paths between double quotes
65 # if system==0 (Linux) dquote=space (ascci code 32)
66 # if system==1 (Win) dquote==" (ascii code 34)
67 new StringSelect onsystem
71 connect conf.SystemType onsystem.In
72 connect onsystem.Out dquote.In
75 new ConcatStrings dirStr
77 connect dquote.Out dirStr.In2
78 connect dir.Out dirStr.In3
79 connect dquote.Out dirStr.In4
82 new ConcatStrings nameStr
84 connect name.Out nameStr.In2
87 new ConcatStrings authorStr
88 set authorStr.In1 " '"
89 connect author.Out authorStr.In2
90 set authorStr.In3 "' "
92 new ConcatStrings descriptionStr
93 set descriptionStr.In1 " '"
94 connect description.Out descriptionStr.In2
95 set descriptionStr.In3 "' "
99 new ConcatStrings concatStrCommand
100 set concatStrCommand.In1 " "
101 connect dquote.Out concatStrCommand.In2
102 connect conf.BinPath concatStrCommand.In3
103 connect conf.FileSeparator concatStrCommand.In4
104 set concatStrCommand.In5 "bbCreatePackage"
105 connect dquote.Out concatStrCommand.In6
106 set concatStrCommand.In7 " "
108 new ConcatStrings concatStr
109 connect dquote.Out concatStr.In1
110 connect concatStrCommand.Out concatStr.In2
111 connect dirStr.Out concatStr.In3
112 connect nameStr.Out concatStr.In4
113 connect authorStr.Out concatStr.In5
114 connect descriptionStr.Out concatStr.In6
115 connect dquote.Out concatStr.In7
117 new ExecSystemCommand command
118 connect concatStr.Out command.In
121 new OutputText FinalMessage
122 set FinalMessage.WinWidth 100
123 set FinalMessage.WinHeight 100
124 set FinalMessage.In "Done !"