# # Macros for bitwise works default WPS object structure # # Reserved ObjectIDs in this macro # - README # - LICENSE # - COPYRIGHT # - CHANGELOG # - DOCDIR # - FOLDER # - APP # # # bww_folder creates the following objects: # 1. The "bitwise works help center" object with an ObjectID of WP_BWWHELP # located in WP_ASSISTANCE # 2. The "Package Documentation" object with an ObjectID of WP_BWWDOC as a # shadow of the /@unixroot/usr/share/doc directory within the "bitwise works # help center" (WP_BWWHELP) # 3. The "bitwise works apps and ports" folder with an ObjectID of WP_BWWAPPS # within the "programs" (WP_PROGRAMSFOLDER) # 4. A shadow of the "bitwise works help center" with an ObjectID of # WP_BWWHELPSHADOW in the "bitwise works apps and ports" folder (WP_BWWAPPS) # 5. A folder for the installed app within the "bitwise works apps and ports" # (WP_BWWAPPS) folder # # The WPS objects 1.-4. are normally updated only and the reference counter in # wps_create is adjusted. Each app has to ensure the WPS objects 1.-4. exist # and therefore creates/updates them first, otherwise the counters would be # wrong. # # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # !!!!!! Make sure the -V option (if used) is not the last option, !!!!!! # !!!!!! otherwise the object is not generated. !!!!!! # !!!!!! This looks like a rpm issue !!!!!! # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # # %bww_folder -t TITLE [-V] [-n PACKAGE] # -t TITLE (Mandatory: Use TITLE as the folder title) # (TITLE *must* be a %global macro if it contains spaces) # -V (Optional: Do not add the version to the folder title) # -n PACKAGE (Optional: Associate the folder with PACKAGE, # otherwise with %{name}) %bww_folder(t:n:V)\ %{!?-t:%{error:%0: Missing mandatory TITLE parameter}}\ %bww_create_folder_id\ %global __bww_title %{-t*}\ %global __bww_title_ver %{!-V:%{__bww_title} %{version}}%{-V:%{__bww_title}}\ %wps_object_create WP_BWWHELP:WPFolder|bww Help||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;\ %wps_object_create WP_BWWDOC:WPShadow|Package Documentation||SHADOWID=((/@unixroot/usr/share/doc));\ %wps_object_create WP_BWWAPPS:WPFolder|bww Apps||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;\ %wps_object_create WP_BWWHELPSHADOW:WPShadow|bitwiseworks Help Center||SHADOWID=;\ %wps_object_create %{__bww_folder_id}:WPFolder|%{__bww_folder_name}||TITLE=%{__bww_title_ver};\ %{nil} # bww_app: # Creates an object in the "bitwise works apps and ports" folder, it will get # an ObjectID of BWW_%{name}__APP # # %bww_app [ID] -f APP -t TITLE [-n PACKAGE] [-s] [-a ASSOCIATIONS] [-i ICON] [-d STARTUPDIR] # ID (Optional: This ID is added to the ObjectID) # -f EXEFILE (Mandatory: Full path/to/app) # -t TITLE (Mandatory: Use TITLE as the app title) # (TITLE *must* be a %global macro if with spaces) # -n PACKAGE (Optional: Associate the folder with PACKAGE, # otherwise with %{name}) # -a ASSOCIATIONS (Optional: Associate a file filter to the object, for # examples *.txt or *.txt,*.pdf,*.html) # -i ICON (Optional: An icon is added to the object) # The icon file has to be copied to /@unixroot/usr/share/os2/icons during # installation! # -d STARTUPDIR (Optional: This value is set as STARTUPDIR in the wps object) # %bww_app(f:t:n:a:i:d:)\ %{!-f:%{error:%0: Missing mandatory EXEFILE parameter}}\ %{!-t:%{error:%0: Missing mandatory TITLE parameter}}\ %bww_create_folder_id\ %bww_create_app_id\ %global __bww_app_title %{-t*}\ %global __bww_app_icon %{!-i:}%{-i:ICONFILE=((/@unixroot/usr/share/os2/icons/%{-i*}));}\ %global __bww_app_assoc %{!-a:}%{-a:ASSOCFILTER=%{-a*};}\ %global __bww_app_startupdir %{!-d:}%{-d:STARTUPDIR=((%{-d*}));}\ %global __bww_app_name %{-f*}\ %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}\ %{nil} # bww_app_shadow: # A shadow of the object will be created in the given WPS destination # (will get a BWW_%{name}__APP__SHADOW WPS object ID) # # # %bww_app_shadow [ID] [-n PACKAGE] [-d ObjectID] # ID (Optional: This ID is added to the ObjectID) # -n PACKAGE (Optional: Associate the folder with PACKAGE, # otherwise with %{name}) # -d ObjectID (Optional: Create the shadow within this ObjectID, # otherwise use WP_DESKTOP) # # NOTE: Provide the ObjectID without <> brackets, as we add them in here # %bww_app_shadow(n:d:)\ %bww_create_folder_id\ %bww_create_app_id\ %global __bww_app_shadowdest %{!-d:WP_DESKTOP}%{-d:%{-d*}}\ %wps_object_create %{__bww_app_id}_%{__bww_app_shadowdest}_SHADOW:WPShadow|NotUsed|<%{__bww_app_shadowdest}>|SHADOWID=<%{__bww_app_id}>;\ %{nil} # bww_readme: # Creates a shadow of a readme file (will get a BWW_%{name}_README ObjectID) # # %bww_readme -f FILE [-n PACKAGE] # -f FILE (Mandatory: Create a shadow for the provided readme FILE) # -n PACKAGE (Optional: Associate the folder with PACKAGE, # otherwise with %{name}) %bww_readme(f:n:)\ %bww_file README\ %{nil} # bww_license: # Creates a shadow of a license file (will get a BWW_%{name}_LICENSE ObjectID) # # %bww_license -f LICENSE [-n PACKAGE] # -f FILE (Mandatory: Create a shadow for the provided license FILE) # -n PACKAGE (Optional: Associate the folder with PACKAGE, # otherwise with %{name}) %bww_license(f:n:)\ %bww_file LICENSE\ %{nil} # bww_copyright: # Creates a shadow of a copyright file (will get a BWW_%{name}_COPYRIGHT ObjectID) # # %bww_copyright -f FILE [-n PACKAGE] # -f FILE (Mandatory: Create a shadow for the provided copyright FILE) # -n PACKAGE (Optional: Associate the folder with PACKAGE, # otherwise with %{name}) %bww_copyright(f:n:)\ %bww_file COPYRIGHT\ %{nil} # bww_changelog: # Creates a shadow of a changelog file (will get a BWW_%{name}_CHANGELOG ObjectID) # # %bww_changelog -f FILE [-n PACKAGE] # -f FILE (Mandatory: Create a shadow for the provided changelog FILE) # -n PACKAGE (Optional: Associate the folder with PACKAGE, # otherwise with %{name}) %bww_changelog(f:n:)\ %bww_file CHANGELOG\ %{nil} # bww_docdir: # Creates a shadow of a doc directory (will get a BWW_%{name}_DOCDIR ObjectID) # # %bww_docdir -f FILE [-n PACKAGE] # -f FILE (Mandatory: Create a shadow for the provided doc FILE (directory in this case)) # -n PACKAGE (Optional: Associate the folder with PACKAGE, # otherwise with %{name}) %bww_docdir(f:n:)\ %bww_file DOCDIR\ %{nil} # bww_file: # Creates a shadow of a file (will get a BWW_%{name}_ ObjectID) # # %bww_file ID -f FILE [-n PACKAGE] # ID (Mandatory: the name of the file for the WPS object id) # -f FILE (Mandatory: Create a shadow for the provided FILE) # -n PACKAGE (Optional: Associate the folder with PACKAGE, # otherwise with %{name}) %bww_file(f:n:)\ %{!?1:%{error:%0: Missing mandatory ObjectID parameter}}\ %{!-f:%{error:%0: Missing mandatory FILE parameter}}\ %bww_create_folder_id\ %global __bww_file_id %{1}\ %global __bww_file %{-f*}\ %wps_object_create BWW_%{__bww_folder_name}_%{__bww_file_id}:WPShadow|%{__bww_file_id}|<%{__bww_folder_id}>|SHADOWID=((%{__bww_file}))\ %{nil} %bww_create_folder_id(n:)\ %global __bww_folder_name %{!-n:%{name}}%{-n:%{-n*}}\ %global __bww_folder_id BWW_%{__bww_folder_name}_FOLDER\ %{nil} %bww_create_app_id(n:)\ %global __bww_pkg_id %{?1:_%{1}}%{!?1:}\ %global __bww_app_id BWW_%{__bww_folder_name}%{__bww_pkg_id}_APP\ %{nil}