| 1 | #
|
|---|
| 2 | # Macros for bitwiseworks default WPS object structure
|
|---|
| 3 | #
|
|---|
| 4 | # Reserved WPS ID's in this macro
|
|---|
| 5 | # - README
|
|---|
| 6 | # - LICENSE
|
|---|
| 7 | # - COPYRIGHT
|
|---|
| 8 | # - CHANGELOG
|
|---|
| 9 | # - DOCDIR
|
|---|
| 10 | # - FOLDER
|
|---|
| 11 | # - APP
|
|---|
| 12 | #
|
|---|
| 13 | #
|
|---|
| 14 | # bww_folder creates:
|
|---|
| 15 | # the bww help center as WP_BWWHELP wps id in WP_ASSISTANCE
|
|---|
| 16 | # a shadow of the /@unixroot/usr/share/doc dir as WP_BWWDOC in the bww help center (WP_BWWHELP)
|
|---|
| 17 | # the bww apps folder as WP_BWWAPPS in WP_PROGRAMSFOLDER
|
|---|
| 18 | # a shadow of the bww help center as WP_BWWHELPSHADOW in the bww apps folder (WP_BWWAPPS)
|
|---|
| 19 | # a folder for the installed app
|
|---|
| 20 | #
|
|---|
| 21 | # the first 4 WPS objects are usually only updated and the referenc counter in wps_create is adjusted
|
|---|
| 22 | # it is necessary that every app creates the bww_folder first, as else the counters are wrong
|
|---|
| 23 | #
|
|---|
| 24 | # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|---|
| 25 | # !!!!!! be aware that the -V option (if used) is not the last option. !!!!!!
|
|---|
| 26 | # !!!!!! as else the complete object is not generated. !!!!!!
|
|---|
| 27 | # !!!!!! this looks like a rpm issue !!!!!!
|
|---|
| 28 | # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|---|
| 29 | #
|
|---|
| 30 | # %bww_folder -t TITLE [-V] [-n PAGKAGE]
|
|---|
| 31 | # -t TITLE (Mandatory: use TITLE as the folder title)
|
|---|
| 32 | # (TITLE *must* be a %global macro if with spaces)
|
|---|
| 33 | # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
|
|---|
| 34 | # -V (when provided: don't add the version to the folder title)
|
|---|
| 35 |
|
|---|
| 36 | %bww_folder(t:n:V)\
|
|---|
| 37 | %{!?-t:%{error:%0: Missing mandatory TITLE parameter}}\
|
|---|
| 38 | %bww_create_folder_id\
|
|---|
| 39 | %global __bww_title %{-t*}\
|
|---|
| 40 | %global __bww_title_ver %{!-V:%{__bww_title} %{version}}%{-V:%{__bww_title}}\
|
|---|
| 41 | %wps_object_create WP_BWWHELP:WPFolder|bww Help|<WP_ASSISTANCE>|TITLE=bitwiseworks Help Center;SHOWALLINTREEVIEW=YES;ICONRESOURCE=60,PMWP.DLL;ICONNRESOURCE=83,PMWP.DLL;BACKGROUND=((/@unixroot/usr/share/os2/bww/bwwfbkg.bmp));ALWAYSSORT=YES;DEFAULTSORT=-1;DEFAULTVIEW=TREE;OPEN=TREE;NODELETE=YES;\
|
|---|
| 42 | %wps_object_create WP_BWWDOC:WPShadow|Package Documentation|<WP_BWWHELP>|SHADOWID=((/@unixroot/usr/share/doc));\
|
|---|
| 43 | %wps_object_create WP_BWWAPPS:WPFolder|bww Apps|<WP_PROGRAMSFOLDER>|TITLE=bitwiseworks Apps and Ports;ICONRESOURCE=1,BWWRES.DLL;ICONNFILE=((/@unixroot/usr/share/os2/bww/bwwfldro.ico));BACKGROUND=((/@unixroot/usr/share/os2/bww/bwwfbkg.bmp));ICONVIEW=FLOWED;\
|
|---|
| 44 | %wps_object_create WP_BWWHELPSHADOW:WPShadow|bitwiseworks Help Center|<WP_BWWAPPS>|SHADOWID=<WP_BWWHELP>;\
|
|---|
| 45 | %wps_object_create %{__bww_folder_id}:WPFolder|%{__bww_folder_name}|<WP_BWWAPPS>|TITLE=%{__bww_title_ver};\
|
|---|
| 46 | %{nil}
|
|---|
| 47 |
|
|---|
| 48 | # bww_app creates:
|
|---|
| 49 | # a object in the bww folder (will get a BWW_%{name}_<ID>_APP WPS object ID)
|
|---|
| 50 | #
|
|---|
| 51 | # %bww_app [ID] -f APP -t TITLE [-n PACKAGE] [-s] [-a ASSOCIATIONS] [-i ICON] [-d STARTUPDIR]
|
|---|
| 52 | # ID (when provided: this ID is added to the WPS id)
|
|---|
| 53 | # -f EXEFILE (Mandatory: fullpath/to/app)
|
|---|
| 54 | # -t TITLE (Mandatory: use TITLE as the app title)
|
|---|
| 55 | # (TITLE *must* be a %global macro if with spaces)
|
|---|
| 56 | # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
|
|---|
| 57 | # -a ASSOCIATIONS (when provided: associate a file filter to the object)
|
|---|
| 58 | # examples are *.txt or *.txt,*.pdf,*.html
|
|---|
| 59 | # -i ICON (when provided: an icon is added to the object)
|
|---|
| 60 | # The icon has to be copied to /@unixroot/usr/share/os2/icons during
|
|---|
| 61 | # installation!
|
|---|
| 62 | # -d STARTUPDIR (when provided: this value is set as STARTUPDIR in the wps object)
|
|---|
| 63 | #
|
|---|
| 64 |
|
|---|
| 65 | %bww_app(f:t:n:a:i:d:)\
|
|---|
| 66 | %{!-f:%{error:%0: Missing mandatory EXEFILE parameter}}\
|
|---|
| 67 | %{!-t:%{error:%0: Missing mandatory TITLE parameter}}\
|
|---|
| 68 | %bww_create_folder_id\
|
|---|
| 69 | %bww_create_app_id\
|
|---|
| 70 | %global __bww_app_title %{-t*}\
|
|---|
| 71 | %global __bww_app_icon %{!-i:}%{-i:ICONFILE=((/@unixroot/usr/share/os2/icons/%{-i*}));}\
|
|---|
| 72 | %global __bww_app_assoc %{!-a:}%{-a:ASSOCFILTER=%{-a*};}\
|
|---|
| 73 | %global __bww_app_startupdir %{!-d:}%{-d:STARTUPDIR=((%{-d*}));}\
|
|---|
| 74 | %global __bww_app_name %{-f*}\
|
|---|
| 75 | %wps_object_create %{__bww_app_id}:WPProgram|%{__bww_app_title}|<%{__bww_folder_id}>|EXENAME=((%{__bww_app_name}));%{__bww_app_startupdir}TITLE=%{__bww_app_title};%{__bww_app_icon}%{__bww_app_assoc}\
|
|---|
| 76 | %{nil}
|
|---|
| 77 |
|
|---|
| 78 | # bww_app_shadow creates:
|
|---|
| 79 | # a shadow of the object on the given WPS destination (will get a BWW_%{name}_<ID>_APP_SHADOW WPS object ID)
|
|---|
| 80 | #
|
|---|
| 81 | #
|
|---|
| 82 | # %bww_app_shadow [ID] -t TITLE [-n PACKAGE] [-d WPSID]
|
|---|
| 83 | # ID (when provided: this ID is added to the WPS id)
|
|---|
| 84 | # -t TITLE (Mandatory: use TITLE as the app title)
|
|---|
| 85 | # (TITLE *must* be a %global macro if with spaces)
|
|---|
| 86 | # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
|
|---|
| 87 | # -d WPSID (when provided: use this ID as the parent, else use WP_DESKTOP)
|
|---|
| 88 | #
|
|---|
| 89 |
|
|---|
| 90 | %bww_app_shadow(t:n:d:)\
|
|---|
| 91 | %{!-t:%{error:%0: Missing mandatory TITLE parameter}}\
|
|---|
| 92 | %bww_create_folder_id\
|
|---|
| 93 | %bww_create_app_id\
|
|---|
| 94 | %global __bww_app_title %{-t*}\
|
|---|
| 95 | %global __bww_app_shadowdest %{!-d:WP_DESKTOP}%{-d:%{-d*}}\
|
|---|
| 96 | %wps_object_create %{__bww_app_id}_%{__bww_app_shadowdest}_SHADOW:WPShadow|%{__bww_app_title}|<%{__bww_app_shadowdest}>|SHADOWID=<%{__bww_app_id}>;\
|
|---|
| 97 | %{nil}
|
|---|
| 98 |
|
|---|
| 99 | # bww_readme creates:
|
|---|
| 100 | # a shadow of a readme file (will get a BWW_%{name}_README WPS ID)
|
|---|
| 101 | #
|
|---|
| 102 | # %bww_readme -f FILE [-n PACKAGE]
|
|---|
| 103 | # -f FILE (Mandatory: create a shadow for the provided readme FILE)
|
|---|
| 104 | # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
|
|---|
| 105 |
|
|---|
| 106 | %bww_readme(f:n:)\
|
|---|
| 107 | %bww_file README\
|
|---|
| 108 | %{nil}
|
|---|
| 109 |
|
|---|
| 110 | # bww_license creates:
|
|---|
| 111 | # a shadow of a license file (will get a BWW_%{name}_LICENSE WPS ID)
|
|---|
| 112 | #
|
|---|
| 113 | # %bww_license -f LICENSE [-n PACKAGE]
|
|---|
| 114 | # -f FILE (Mandatory: create a shadow for the provided license FILE)
|
|---|
| 115 | # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
|
|---|
| 116 |
|
|---|
| 117 | %bww_license(f:n:)\
|
|---|
| 118 | %bww_file LICENSE\
|
|---|
| 119 | %{nil}
|
|---|
| 120 |
|
|---|
| 121 | # bww_copyright creates:
|
|---|
| 122 | # a shadow of a copyright file (will get a BWW_%{name}_COPYRIGHT WPS ID)
|
|---|
| 123 | #
|
|---|
| 124 | # %bww_copyright -f FILE [-n PACKAGE]
|
|---|
| 125 | # -f FILE (Mandatory: create a shadow for the provided copyright FILE)
|
|---|
| 126 | # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
|
|---|
| 127 |
|
|---|
| 128 | %bww_copyright(f:n:)\
|
|---|
| 129 | %bww_file COPYRIGHT\
|
|---|
| 130 | %{nil}
|
|---|
| 131 |
|
|---|
| 132 | # bww_changelog creates:
|
|---|
| 133 | # a shadow of a changelog file (will get a BWW_%{name}_CHANGELOG WPS ID)
|
|---|
| 134 | #
|
|---|
| 135 | # %bww_changelog -f FILE [-n PACKAGE]
|
|---|
| 136 | # -f FILE (Mandatory: create a shadow for the provided changelog FILE)
|
|---|
| 137 | # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
|
|---|
| 138 |
|
|---|
| 139 | %bww_changelog(f:n:)\
|
|---|
| 140 | %bww_file CHANGELOG\
|
|---|
| 141 | %{nil}
|
|---|
| 142 |
|
|---|
| 143 | # bww_docdir creates:
|
|---|
| 144 | # a shadow of a doc directory (will get a BWW_%{name}_DOCDIR WPS ID)
|
|---|
| 145 | #
|
|---|
| 146 | # %bww_docdir -f FILE [-n PACKAGE]
|
|---|
| 147 | # -f FILE (Mandatory: create a shadow for the provided doc FILE (directory in this case))
|
|---|
| 148 | # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
|
|---|
| 149 |
|
|---|
| 150 | %bww_docdir(f:n:)\
|
|---|
| 151 | %bww_file DOCDIR\
|
|---|
| 152 | %{nil}
|
|---|
| 153 |
|
|---|
| 154 | # bww_file creates:
|
|---|
| 155 | # a shadow of a file (will get a BWW_%{name}_<ID> WPS object ID)
|
|---|
| 156 | #
|
|---|
| 157 | # %bww_file ID -f FILE [-n PACKAGE]
|
|---|
| 158 | # ID (Mandatory: the name of the file for the WPS object id)
|
|---|
| 159 | # -f FILE (Mandatory: create a shadow for the provided FILE)
|
|---|
| 160 | # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
|
|---|
| 161 |
|
|---|
| 162 | %bww_file(f:n:)\
|
|---|
| 163 | %{!?1:%{error:%0: Missing mandatory WPS ID parameter}}\
|
|---|
| 164 | %{!-f:%{error:%0: Missing mandatory FILE parameter}}\
|
|---|
| 165 | %bww_create_folder_id\
|
|---|
| 166 | %global __bww_file_id %{1}\
|
|---|
| 167 | %global __bww_file %{-f*}\
|
|---|
| 168 | %wps_object_create BWW_%{__bww_folder_name}_%{__bww_file_id}:WPShadow|%{__bww_file_id}|<%{__bww_folder_id}>|SHADOWID=((%{__bww_file}))\
|
|---|
| 169 | %{nil}
|
|---|
| 170 |
|
|---|
| 171 |
|
|---|
| 172 | %bww_create_folder_id(n:)\
|
|---|
| 173 | %global __bww_folder_name %{!-n:%{name}}%{-n:%{-n*}}\
|
|---|
| 174 | %global __bww_folder_id BWW_%{__bww_folder_name}_FOLDER\
|
|---|
| 175 | %{nil}
|
|---|
| 176 |
|
|---|
| 177 | %bww_create_app_id(n:)\
|
|---|
| 178 | %global __bww_pkg_id %{?1:_%{1}}%{!?1:}\
|
|---|
| 179 | %global __bww_app_id BWW_%{__bww_folder_name}%{__bww_pkg_id}_APP\
|
|---|
| 180 | %{nil}
|
|---|
| 181 |
|
|---|