maybe building again, patched references to old core folder.
[feisty_meow.git] / production / setup_src / bundle_example / example_manifest.txt
1 ; example manifest file for application bundler.
2
3 [toc]
4 set_source_temporary_dir=t
5 establish_new_temp_dir=t
6 ; we whack the temporary directory before creating it in case it was there.
7 whack_temporary_dir_before=t
8 make_temporary_dir=t
9 show_variables=t
10 set_target=t
11 set_bogus=t
12 set_nechung_dir=t
13 copy_nechung_to_tempdir=t
14 copy_fortunes_to_tempdir=t
15 using_target=t
16 using_vars=t
17 absolute_path=t
18 wildcard_congelio=t
19 wildcard_specific=t
20 recursing_doodle=t
21 execute_source_side=t
22 execute_target_side=t
23 target_exec_sans_source=t
24 error_check=t
25 no_replacement=t
26 install_but_backup=t
27 test_variable_defined=t
28 whack_temporary_dir_after=t
29
30 [set_target]
31 variable=TARGET=$TMP/bundle_example_yo
32 ; this is an example of setting a variable.  the variables found in a section
33 ; should be the only content provided (no source or target is needed).  in
34 ; this example, the variable is "TARGET" and it's being set to a folder under
35 ; the TMP directory.
36 ; "TARGET" is actually a special variable; it is the main installation root
37 ; for all bundled products.  if it is going to be overridden, it should be the
38 ; first item in the table of contents; this ensures all other targets see
39 ; the chosen default target location.
40
41 [set_bogus]
42 variable=BOGUS=petunias
43 ; this is a simple variable that can be used to test overriding variables by
44 ; passing them on the command line to the unpacker exe.
45
46 [set_source_temporary_dir]
47 variable=SOURCE_TEMP=$HOME/.tmp_nechung
48 ; provides a folder to use for testing nechung stuff.
49
50 [establish_new_temp_dir]
51 variable=TMP=$SOURCE_TEMP
52 ; changes the temporary directory over to a location we think we can always
53 ; stay in control of.
54
55 [set_nechung_dir]
56 variable=NECHUNG=$SOURCE_TEMP/example.txt
57 ; provides the nechung oracle (used later) with a datafile.
58
59 [make_temporary_dir]
60 source=$UNIX_BIN/mkdir
61 parms="$SOURCE_TEMP"
62 no_pack=true
63 exec_source=true
64
65 [show_variables]
66 source=$UNIX_BIN/echo
67 parms="srctmp" "$SOURCE_TEMP" "EXECdir" "$EXECUTABLE_DIR" "exeend" "$EXE_END"
68 no_pack=true
69 exec_source=true
70
71 [whack_temporary_dir_before]
72 source=$UNIX_BIN/rm
73 parms="-rf" "$SOURCE_TEMP"
74 no_pack=true
75 exec_source=true
76 error_okay = true
77   ; for some reason rm is complaining about this, even though it's working.
78
79 ; this redundancy is an example of why we need an aliasing system for
80 ; creating multiple TOC items that actually call the same real section.
81 ; ini file format betrays us there since we cannot have two identical names
82 ; in the same section.
83 [whack_temporary_dir_after]
84 source=$UNIX_BIN/rm
85 parms="-rf" "$SOURCE_TEMP"
86 no_pack=true
87 exec_source=true
88 error_okay = true
89   ; for some reason rm is complaining about this, even though it's working.
90
91 ; the copy steps are preparing for running nechung.  we need a place where
92 ; we should always be able to write some new files, since nechung writes its
93 ; index of the fortunes when it's first run, and that's what SOURCE_TEMP is
94 ; for.
95 [copy_nechung_to_tempdir]
96 source=$UNIX_BIN/cp
97 parms="$EXECUTABLE_DIR/nechung$EXE_END" "$SOURCE_TEMP/nechung$EXE_END"
98 no_pack=true
99 exec_source=true
100
101 [copy_fortunes_to_tempdir]
102 source=$UNIX_BIN/cp
103 parms="$REPOSITORY_DIR/nucleus/applications/nechung/example.txt" "$SOURCE_TEMP/example.txt"
104 no_pack=true
105 exec_source=true
106
107 [using_target]
108 source=$EXECUTABLE_DIR/bytedump$EXE_END
109 target=$TARGET/bytedunker$EXE_END
110 ; a special variable called TARGET is the default location where files will
111 ; be stored.  this is basically the main installation folder.  the TARGET
112 ; folder can be specified on the command line when a bundle is installed.
113 ; note the automatic variable called EXE_END; this is set to ".exe" for win32
114 ; operating systems and is blank for others (so far).
115
116 [using_vars]
117 source=$CLAM_BIN/value_tagger$EXE_END
118 target=$TMP/using_varsilator$EXE_END
119 ; variables in the source get resolved at packing time.
120 ; variables in the target get resolved during unbundling time.
121
122 [absolute_path]
123 source=$EXECUTABLE_DIR/nechung$EXE_END
124 target=/tmp/spoonbender/nechung$EXE_END
125 ; simple file copy to an absolute path.
126
127 [wildcard_congelio]
128 source=$REPOSITORY_DIR/nucleus/library/test_basis/*
129 target=$TARGET/muse_files
130 ; wildcards are supported.  this will put all the files from that directory
131 ; "test_basis" into the target in a folder called "muse_files".
132
133 [wildcard_specific]
134 source=$REPOSITORY_DIR/nucleus/library/basis/*.h
135 target=$TARGET/basis_headers
136 ; this is a more specific wildcard that tests a pattern on the end, rather
137 ; than the "get everything" of a bare asterisk.
138
139 [recursing_doodle]
140 source=$REPOSITORY_DIR/nucleus
141 target=$TARGET/srcpack/doodle_src
142 recurse=1
143 ; this shows a recursive copy of the directory "core" into a new directory
144 ; on the target called "doodle_src".  this matches the last component of the
145 ; source directly to the last component of the target, so that the files
146 ; in doodle will show up under doodle_src.
147 ; the flag "recurse" must also be set in the section.  if it has any contents
148 ; besides zero ("0") or "false", then it will be evaluated as enabling
149 ; recursion.  it should not be an empty string (since that is equivalent to it
150 ; not being set at all).
151 ; currently, recursion and wildcards cannot be mixed.
152
153 [execute_source_side]
154 source=$SOURCE_TEMP/nechung$EXE_END
155 exec_source=true
156 no_pack=true
157 ; this is an example of having a source side file be executed (the
158 ; "exec_source" item in the section specifies this).  the file will be
159 ; executed on the source side while the bundle is being packed.  the "no_pack"
160 ; flag means that the source exe will not even be copied to the target
161 ; location.  when this particular item is hit on the source side, nechung will
162 ; be executed and a fortune will be displayed if the database is accessible.
163
164 [execute_target_side]
165 source=$EXECUTABLE_DIR/bytedump$EXE_END
166 target=$TARGET/meldrick$EXE_END
167 exec_target=true
168 parms="$TARGET/srcpack/doodle_src/library/basis/trap_new.addin"
169 ; this is an example of a target side executable.  note that we are providing
170 ; a set of parameters to this exe, each of which should be quoted and separated
171 ; by spaces from the next parameter.  note that when this bundle is unpacked,
172 ; there will be a spew of byte data from this command.
173
174 [target_exec_sans_source]
175 target=$TARGET/bytedunker$EXE_END
176 ; the bytedunker application is copied in a previous step.
177 exec_target=true
178 no_pack=true
179 parms="$TARGET/srcpack/doodle_src/library/data_struct/makefile"
180 ; this is an example of a target side executable where the source is not 
181 ; specified and no_pack is used.  this means that the target app must already
182 ; exist in the target location.
183
184 [error_check]
185 source=$EXECUTABLE_DIR/bytedump$EXE_END
186 target=$TARGET/pungentina$EXE_END
187 exec_target=true
188 no_pack=true
189 parms="this" "command will fail" "because it won't be created"
190 error_okay = true
191 ; shows how the "error_okay" flag can be used to keep a failed run of
192 ; an executable program from stopping the unbundling process.
193
194 [no_replacement]
195 source=$PRODUCTION_DIR/feisty_meow_config.ini
196 target=$TARGET/buildonia.ini
197 no_replace=true
198 ; this shows how the "no_replace" macro will avoid overwriting a file if it
199 ; already exists.  this emulates the non-overwriting style of copy that most
200 ; installers support.
201 ; to test this option out, run the example app you create to a particular
202 ; directory, then edit the installed version of buildonia.ini to change it
203 ; around, and run the same app again on the same directory.  the result
204 ; should be that your changes are kept.
205
206 [install_but_backup]
207 source=$PRODUCTION_DIR/feisty_meow_config.ini
208 target=$TARGET/build_file_uhh
209 make_backup=t
210 ; this simple example shows the backing up of a file before the packed
211 ; version gets installed.  that ensures that we never clobber a file if
212 ; we know ahead of time that it could have user configured changes or
213 ; another reason not to just write on top of it.
214
215 [test_variable_defined]
216 assert_defined=TMP
217 ; checks that the variable is defined, so that we know the installer can
218 ; rely on them.  this is really only needed if the installer is assuming
219 ; that the variable will be present, and if the install will fail without
220 ; the variable.  it makes the most sense when we cannot know the variable
221 ; ahead of time or when we don't want to have to know it.
222
223