| 1 | #
|
|---|
| 2 | # Macros for bitwise works default WPS object structure
|
|---|
| 3 | #
|
|---|
| 4 | # Reserved ObjectIDs in this macro
|
|---|
| 5 | # - README
|
|---|
| 6 | # - LICENSE
|
|---|
| 7 | # - COPYRIGHT
|
|---|
| 8 | # - CHANGELOG
|
|---|
| 9 | # - DOCDIR
|
|---|
| 10 | # - FOLDER
|
|---|
| 11 | # - APP
|
|---|
| 12 | #
|
|---|
| 13 | #
|
|---|
| 14 | # bww_folder creates the following objects:
|
|---|
| 15 | # 1. The "bitwise works help center" object with an ObjectID of WP_BWWHELP
|
|---|
| 16 | # located in WP_ASSISTANCE
|
|---|
| 17 | # 2. The "Package Documentation" object with an ObjectID of WP_BWWDOC as a
|
|---|
| 18 | # shadow of the /@unixroot/usr/share/doc directory within the "bitwise works
|
|---|
| 19 | # help center" (WP_BWWHELP)
|
|---|
| 20 | # 3. The "bitwise works apps and ports" folder with an ObjectID of WP_BWWAPPS
|
|---|
| 21 | # within the "programs" (WP_PROGRAMSFOLDER)
|
|---|
| 22 | # 4. A shadow of the "bitwise works help center" with an ObjectID of
|
|---|
| 23 | # WP_BWWHELPSHADOW in the "bitwise works apps and ports" folder (WP_BWWAPPS)
|
|---|
| 24 | # 5. A folder for the installed app within the "bitwise works apps and ports"
|
|---|
| 25 | # (WP_BWWAPPS) folder
|
|---|
| 26 | #
|
|---|
| 27 | # The WPS objects 1.-4. are normally updated only and the reference counter in
|
|---|
| 28 | # wps_create is adjusted. Each app has to ensure the WPS objects 1.-4. exist
|
|---|
| 29 | # and therefore creates/updates them first, otherwise the counters would be
|
|---|
| 30 | # wrong.
|
|---|
| 31 | #
|
|---|
| 32 | # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|---|
| 33 | # !!!!!! Make sure the -V option (if used) is not the last option, !!!!!!
|
|---|
| 34 | # !!!!!! otherwise the object is not generated. !!!!!!
|
|---|
| 35 | # !!!!!! This looks like a rpm issue !!!!!!
|
|---|
| 36 | # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|---|
| 37 | #
|
|---|
| 38 | # %bww_folder -t TITLE [-V] [-n PACKAGE]
|
|---|
| 39 | # -t TITLE (Mandatory: Use TITLE as the folder title)
|
|---|
| 40 | # (TITLE *must* be a %global macro if it contains spaces)
|
|---|
| 41 | # -V (Optional: Do not add the version to the folder title)
|
|---|
| 42 | # -n PACKAGE (Optional: Associate the folder with PACKAGE,
|
|---|
| 43 | # otherwise with %{name})
|
|---|
| 44 |
|
|---|
| 45 | %bww_folder(t:n:V)\
|
|---|
| 46 | %{!?-t:%{error:%0: Missing mandatory TITLE parameter}}\
|
|---|
| 47 | %bww_create_folder_id\
|
|---|
| 48 | %global __bww_title %{-t*}\
|
|---|
| 49 | %global __bww_title_ver %{!-V:%{__bww_title} %{version}}%{-V:%{__bww_title}}\
|
|---|
| 50 | %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;\
|
|---|
| 51 | %wps_object_create WP_BWWDOC:WPShadow|Package Documentation|<WP_BWWHELP>|SHADOWID=((/@unixroot/usr/share/doc));\
|
|---|
| 52 | %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;\
|
|---|
| 53 | %wps_object_create WP_BWWHELPSHADOW:WPShadow|bitwiseworks Help Center|<WP_BWWAPPS>|SHADOWID=<WP_BWWHELP>;\
|
|---|
| 54 | %wps_object_create %{__bww_folder_id}:WPFolder|%{__bww_folder_name}|<WP_BWWAPPS>|TITLE=%{__bww_title_ver};\
|
|---|
| 55 | %{nil}
|
|---|
| 56 |
|
|---|
| 57 | # bww_app:
|
|---|
| 58 | # Creates an object in the "bitwise works apps and ports" folder, it will get
|
|---|
| 59 | # an ObjectID of BWW_%{name}_<ID>_APP
|
|---|
| 60 | #
|
|---|
| 61 | # %bww_app [ID] -f APP -t TITLE [-n PACKAGE] [-s] [-a ASSOCIATIONS] [-i ICON] [-d STARTUPDIR]
|
|---|
| 62 | # ID (Optional: This ID is added to the ObjectID)
|
|---|
| 63 | # -f EXEFILE (Mandatory: Full path/to/app)
|
|---|
| 64 | # -t TITLE (Mandatory: Use TITLE as the app title)
|
|---|
| 65 | # (TITLE *must* be a %global macro if with spaces)
|
|---|
| 66 | # -n PACKAGE (Optional: Associate the folder with PACKAGE,
|
|---|
| 67 | # otherwise with %{name})
|
|---|
| 68 | # -a ASSOCIATIONS (Optional: Associate a file filter to the object, for
|
|---|
| 69 | # examples *.txt or *.txt,*.pdf,*.html)
|
|---|
| 70 | # -i ICON (Optional: An icon is added to the object)
|
|---|
| 71 | # The icon file has to be copied to /@unixroot/usr/share/os2/icons during
|
|---|
| 72 | # installation!
|
|---|
| 73 | # -d STARTUPDIR (Optional: This value is set as STARTUPDIR in the wps object)
|
|---|
| 74 | #
|
|---|
| 75 |
|
|---|
| 76 | %bww_app(f:t:n:a:i:d:)\
|
|---|
| 77 | %{!-f:%{error:%0: Missing mandatory EXEFILE parameter}}\
|
|---|
| 78 | %{!-t:%{error:%0: Missing mandatory TITLE parameter}}\
|
|---|
| 79 | %bww_create_folder_id\
|
|---|
| 80 | %bww_create_app_id\
|
|---|
| 81 | %global __bww_app_title %{-t*}\
|
|---|
| 82 | %global __bww_app_icon %{!-i:}%{-i:ICONFILE=((/@unixroot/usr/share/os2/icons/%{-i*}));}\
|
|---|
| 83 | %global __bww_app_assoc %{!-a:}%{-a:ASSOCFILTER=%{-a*};}\
|
|---|
| 84 | %global __bww_app_startupdir %{!-d:}%{-d:STARTUPDIR=((%{-d*}));}\
|
|---|
| 85 | %global __bww_app_name %{-f*}\
|
|---|
| 86 | %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}\
|
|---|
| 87 | %{nil}
|
|---|
| 88 |
|
|---|
| 89 | # bww_app_shadow:
|
|---|
| 90 | # A shadow of the object will be created in the given WPS destination
|
|---|
| 91 | # (will get a BWW_%{name}_<ID>_APP_<ObjectId>_SHADOW WPS object ID)
|
|---|
| 92 | #
|
|---|
| 93 | #
|
|---|
| 94 | # %bww_app_shadow [ID] [-n PACKAGE] [-d ObjectID]
|
|---|
| 95 | # ID (Optional: This ID is added to the ObjectID)
|
|---|
| 96 | # -n PACKAGE (Optional: Associate the folder with PACKAGE,
|
|---|
| 97 | # otherwise with %{name})
|
|---|
| 98 | # -d ObjectID (Optional: Create the shadow within this ObjectID,
|
|---|
| 99 | # otherwise use WP_DESKTOP)
|
|---|
| 100 | #
|
|---|
| 101 | # NOTE: Provide the ObjectID without <> brackets, as we add them in here
|
|---|
| 102 | #
|
|---|
| 103 |
|
|---|
| 104 | %bww_app_shadow(n:d:)\
|
|---|
| 105 | %bww_create_folder_id\
|
|---|
| 106 | %bww_create_app_id\
|
|---|
| 107 | %global __bww_app_shadowdest %{!-d:WP_DESKTOP}%{-d:%{-d*}}\
|
|---|
| 108 | %wps_object_create %{__bww_app_id}_%{__bww_app_shadowdest}_SHADOW:WPShadow|NotUsed|<%{__bww_app_shadowdest}>|SHADOWID=<%{__bww_app_id}>;\
|
|---|
| 109 | %{nil}
|
|---|
| 110 |
|
|---|
| 111 | # bww_readme:
|
|---|
| 112 | # Creates a shadow of a readme file (will get a BWW_%{name}_README ObjectID)
|
|---|
| 113 | #
|
|---|
| 114 | # %bww_readme -f FILE [-n PACKAGE]
|
|---|
| 115 | # -f FILE (Mandatory: Create a shadow for the provided readme FILE)
|
|---|
| 116 | # -n PACKAGE (Optional: Associate the folder with PACKAGE,
|
|---|
| 117 | # otherwise with %{name})
|
|---|
| 118 |
|
|---|
| 119 | %bww_readme(f:n:)\
|
|---|
| 120 | %bww_file README\
|
|---|
| 121 | %{nil}
|
|---|
| 122 |
|
|---|
| 123 | # bww_license:
|
|---|
| 124 | # Creates a shadow of a license file (will get a BWW_%{name}_LICENSE ObjectID)
|
|---|
| 125 | #
|
|---|
| 126 | # %bww_license -f LICENSE [-n PACKAGE]
|
|---|
| 127 | # -f FILE (Mandatory: Create a shadow for the provided license FILE)
|
|---|
| 128 | # -n PACKAGE (Optional: Associate the folder with PACKAGE,
|
|---|
| 129 | # otherwise with %{name})
|
|---|
| 130 |
|
|---|
| 131 | %bww_license(f:n:)\
|
|---|
| 132 | %bww_file LICENSE\
|
|---|
| 133 | %{nil}
|
|---|
| 134 |
|
|---|
| 135 | # bww_copyright:
|
|---|
| 136 | # Creates a shadow of a copyright file (will get a BWW_%{name}_COPYRIGHT ObjectID)
|
|---|
| 137 | #
|
|---|
| 138 | # %bww_copyright -f FILE [-n PACKAGE]
|
|---|
| 139 | # -f FILE (Mandatory: Create a shadow for the provided copyright FILE)
|
|---|
| 140 | # -n PACKAGE (Optional: Associate the folder with PACKAGE,
|
|---|
| 141 | # otherwise with %{name})
|
|---|
| 142 |
|
|---|
| 143 | %bww_copyright(f:n:)\
|
|---|
| 144 | %bww_file COPYRIGHT\
|
|---|
| 145 | %{nil}
|
|---|
| 146 |
|
|---|
| 147 | # bww_changelog:
|
|---|
| 148 | # Creates a shadow of a changelog file (will get a BWW_%{name}_CHANGELOG ObjectID)
|
|---|
| 149 | #
|
|---|
| 150 | # %bww_changelog -f FILE [-n PACKAGE]
|
|---|
| 151 | # -f FILE (Mandatory: Create a shadow for the provided changelog FILE)
|
|---|
| 152 | # -n PACKAGE (Optional: Associate the folder with PACKAGE,
|
|---|
| 153 | # otherwise with %{name})
|
|---|
| 154 |
|
|---|
| 155 | %bww_changelog(f:n:)\
|
|---|
| 156 | %bww_file CHANGELOG\
|
|---|
| 157 | %{nil}
|
|---|
| 158 |
|
|---|
| 159 | # bww_docdir:
|
|---|
| 160 | # Creates a shadow of a doc directory (will get a BWW_%{name}_DOCDIR ObjectID)
|
|---|
| 161 | #
|
|---|
| 162 | # %bww_docdir -f FILE [-n PACKAGE]
|
|---|
| 163 | # -f FILE (Mandatory: Create a shadow for the provided doc FILE (directory in this case))
|
|---|
| 164 | # -n PACKAGE (Optional: Associate the folder with PACKAGE,
|
|---|
| 165 | # otherwise with %{name})
|
|---|
| 166 |
|
|---|
| 167 | %bww_docdir(f:n:)\
|
|---|
| 168 | %bww_file DOCDIR\
|
|---|
| 169 | %{nil}
|
|---|
| 170 |
|
|---|
| 171 | # bww_file:
|
|---|
| 172 | # Creates a shadow of a file (will get a BWW_%{name}_<ID> ObjectID)
|
|---|
| 173 | #
|
|---|
| 174 | # %bww_file ID -f FILE [-n PACKAGE]
|
|---|
| 175 | # ID (Mandatory: the name of the file for the WPS object id)
|
|---|
| 176 | # -f FILE (Mandatory: Create a shadow for the provided FILE)
|
|---|
| 177 | # -n PACKAGE (Optional: Associate the folder with PACKAGE,
|
|---|
| 178 | # otherwise with %{name})
|
|---|
| 179 |
|
|---|
| 180 | %bww_file(f:n:)\
|
|---|
| 181 | %{!?1:%{error:%0: Missing mandatory ObjectID parameter}}\
|
|---|
| 182 | %{!-f:%{error:%0: Missing mandatory FILE parameter}}\
|
|---|
| 183 | %bww_create_folder_id\
|
|---|
| 184 | %global __bww_file_id %{1}\
|
|---|
| 185 | %global __bww_file %{-f*}\
|
|---|
| 186 | %wps_object_create BWW_%{__bww_folder_name}_%{__bww_file_id}:WPShadow|%{__bww_file_id}|<%{__bww_folder_id}>|SHADOWID=((%{__bww_file}))\
|
|---|
| 187 | %{nil}
|
|---|
| 188 |
|
|---|
| 189 | %bww_create_folder_id(n:)\
|
|---|
| 190 | %global __bww_folder_name %{!-n:%{name}}%{-n:%{-n*}}\
|
|---|
| 191 | %global __bww_folder_id BWW_%{__bww_folder_name}_FOLDER\
|
|---|
| 192 | %{nil}
|
|---|
| 193 |
|
|---|
| 194 | %bww_create_app_id(n:)\
|
|---|
| 195 | %global __bww_pkg_id %{?1:_%{1}}%{!?1:}\
|
|---|
| 196 | %global __bww_app_id BWW_%{__bww_folder_name}%{__bww_pkg_id}_APP\
|
|---|
| 197 | %{nil}
|
|---|