| 1 | a shadow of a file (will geta BWW_%{name}_<ID>_FILE WPS object ID)#
|
|---|
| 2 | # Macros for bitwiseworks default WPS object structure
|
|---|
| 3 | #
|
|---|
| 4 | # bww_folder creates:
|
|---|
| 5 | # a folder for the installed app
|
|---|
| 6 | #
|
|---|
| 7 | # %bww_folder -t TITLE [-n PAGKAGE] [-V]
|
|---|
| 8 | # -t TITLE (Mandatory: use TITLE as the folder title)
|
|---|
| 9 | # (TITLE *must* be a %global macro if with spaces)
|
|---|
| 10 | # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
|
|---|
| 11 | # -V (when provided: don't add the version to the folder title)
|
|---|
| 12 |
|
|---|
| 13 | %bww_folder(t:n:V)\
|
|---|
| 14 | %{!?-t:%{error:%0: Missing mandatory TITLE parameter}}\
|
|---|
| 15 | %bww_create_folder_id\
|
|---|
| 16 | %global __bww_title %{-t*}\
|
|---|
| 17 | %global __bww_title_ver %{!-V:%{__bww_title} %{version}}%{-V:%{__bww_title}}\
|
|---|
| 18 | %wps_object_create %{__bww_folder_id}:WPFolder|%{__bww_folder_name}|<WP_BWWAPPS>|TITLE=%{__bww_title_ver};\
|
|---|
| 19 | %{nil}
|
|---|
| 20 |
|
|---|
| 21 | # bww_app creates:
|
|---|
| 22 | # a object in the bww folder (will get a BWW_%{name}_<ID>_APP WPS object ID)
|
|---|
| 23 | # a shadow of the object on the desktop (if requested) (will get a BWW_%{name}_<ID>_APP_SHADOW WPS object ID)
|
|---|
| 24 | #
|
|---|
| 25 | # %bww_app [ID] -f APP -t TITLE [-n PACKAGE] [-a ASSOCIATIONS] [-i ICON] [-d STARTUPDIR] [-s]
|
|---|
| 26 | # ID (when provided: this ID is added to the WPS id)
|
|---|
| 27 | # -f EXEFILE (Mandatory: fullpath/to/app)
|
|---|
| 28 | # -t TITLE (Mandatory: use TITLE as the app title)
|
|---|
| 29 | # (TITLE *must* be a %global macro if with spaces)
|
|---|
| 30 | # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
|
|---|
| 31 | # -a ASSOCIATIONS (when provided: associate a file filter to the object)
|
|---|
| 32 | # examples are *.txt or *.txt,*.pdf,*.html
|
|---|
| 33 | # -i ICON (when provided: a icon is added to the object)
|
|---|
| 34 | # The icon has to be copied to /@unixroot/usr/share/os2/icons during
|
|---|
| 35 | # installation!
|
|---|
| 36 | # -d STARTUPDIR (when provided: this value is set as STATUPDIR in the wps object)
|
|---|
| 37 | # -s (when provided: create a shadow on the desktop)
|
|---|
| 38 | #
|
|---|
| 39 |
|
|---|
| 40 | %bww_app(f:t:n:a:i:d:s)\
|
|---|
| 41 | %{!-f:%{error:%0: Missing mandatory EXEFILE parameter}}\
|
|---|
| 42 | %{!-t:%{error:%0: Missing mandatory TITLE parameter}}\
|
|---|
| 43 | %bww_create_folder_id\
|
|---|
| 44 | %bww_create_app_id\
|
|---|
| 45 | %global __bww_app_title %{-t*}\
|
|---|
| 46 | %global __bww_app_icon %{!-i:}%{-i:ICONFILE=((/@unixroot/usr/share/os2/icons/%{-i*}));}\
|
|---|
| 47 | %global __bww_app_assoc %{!-a:}%{-a:ASSOCFILTER=%{-a*};}\
|
|---|
| 48 | %global __bww_app_startupdir %{!-d:}%{-d:STARTUPDIR=((%{-d*}));}\
|
|---|
| 49 | %global __bww_app_name %{-f*}\
|
|---|
| 50 | %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}\
|
|---|
| 51 | %{-s:%wps_object_create %{__bww_app_id}_SHADOW:WPShadow|%{__bww_app_title}|<WP_DESKTOP>|SHADOWID=<%{__bww_app_id}>;}\
|
|---|
| 52 | %{nil}
|
|---|
| 53 |
|
|---|
| 54 | # bww_readme creates:
|
|---|
| 55 | # a shadow of a readme file (will get a BWW_%{name}_README_FILE WPS ID)
|
|---|
| 56 | #
|
|---|
| 57 | # %bww_readme -f FILE [-n PACKAGE]
|
|---|
| 58 | # -f FILE (Mandatory: create a shadow for the provided readme FILE)
|
|---|
| 59 | # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
|
|---|
| 60 |
|
|---|
| 61 | %bww_readme(f:n:)\
|
|---|
| 62 | %bww_file README\
|
|---|
| 63 | %{nil}
|
|---|
| 64 |
|
|---|
| 65 | # bww_license creates:
|
|---|
| 66 | # a shadow of a license file (will get a BWW_%{name}_LICENSE_FILE WPS ID)
|
|---|
| 67 | #
|
|---|
| 68 | # %bww_license -f LICENSE [-n PACKAGE]
|
|---|
| 69 | # -f FILE (Mandatory: create a shadow for the provided license FILE)
|
|---|
| 70 | # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
|
|---|
| 71 |
|
|---|
| 72 | %bww_license(f:n:)\
|
|---|
| 73 | %bww_file LICENSE\
|
|---|
| 74 | %{nil}
|
|---|
| 75 |
|
|---|
| 76 | # bww_copyright creates:
|
|---|
| 77 | # a shadow of a copyright file (will get a BWW_%{name}_COPYRIGHT_FILE WPS ID)
|
|---|
| 78 | #
|
|---|
| 79 | # %bww_copyright -f FILE [-n PACKAGE]
|
|---|
| 80 | # -f FILE (Mandatory: create a shadow for the provided copyright FILE)
|
|---|
| 81 | # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
|
|---|
| 82 |
|
|---|
| 83 | %bww_copyright(f:n:)\
|
|---|
| 84 | %bww_file COPYRIGHT\
|
|---|
| 85 | %{nil}
|
|---|
| 86 |
|
|---|
| 87 | # bww_file creates:
|
|---|
| 88 | # a shadow of a file (will get a BWW_%{name}_<ID>_FILE WPS object ID)
|
|---|
| 89 | #
|
|---|
| 90 | # %bww_file ID -f FILE [-n PACKAGE]
|
|---|
| 91 | # ID (Mandatory: the name of the file for the WPS object id)
|
|---|
| 92 | # -f FILE (Mandatory: create a shadow for the provided FILE)
|
|---|
| 93 | # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
|
|---|
| 94 |
|
|---|
| 95 | %bww_file(f:n:)\
|
|---|
| 96 | %{!?1:%{error:%0: Missing mandatory WPS ID parameter}}\
|
|---|
| 97 | %{!-f:%{error:%0: Missing mandatory FILE parameter}}\
|
|---|
| 98 | %bww_create_folder_id\
|
|---|
| 99 | %global __bww_file_id %{1}\
|
|---|
| 100 | %global __bww_file %{-f*}\
|
|---|
| 101 | %wps_object_create BWW_%{__bww_folder_name}_%{__bww_file_id}_FILE:WPShadow|%{__bww_file_id}|<%{__bww_folder_id}>|SHADOWID=((%{__bww_file}))\
|
|---|
| 102 | %{nil}
|
|---|
| 103 |
|
|---|
| 104 |
|
|---|
| 105 | %bww_create_folder_id(n:)\
|
|---|
| 106 | %global __bww_folder_name %{!-n:%{name}}%{-n:%{-n*}}\
|
|---|
| 107 | %global __bww_folder_id BWW_%{__bww_folder_name}_FOLDER\
|
|---|
| 108 | %{nil}
|
|---|
| 109 |
|
|---|
| 110 | %bww_create_app_id(n:)\
|
|---|
| 111 | %global __bww_pkg_id %{?1:_%{1}}%{!?1:}\
|
|---|
| 112 | %global __bww_app_id BWW_%{__bww_folder_name}%{__bww_pkg_id}_APP\
|
|---|
| 113 | %{nil}
|
|---|
| 114 |
|
|---|