| 1 | #
|
|---|
| 2 | # Macros for bitwiseworks default WPS object structure
|
|---|
| 3 | #
|
|---|
| 4 | # bww_folder creates the 5 common WPS objects
|
|---|
| 5 | # - Create bitwiseworks Help Center
|
|---|
| 6 | # - Create shadow of the apps doc dir in the bitwise help Center
|
|---|
| 7 | # - Create bitwiseworks Apps and Ports folder
|
|---|
| 8 | # - Create shadow of the bitwise help Center in the Apps and ports folder (if provided)
|
|---|
| 9 | # - Create folder for the installed app
|
|---|
| 10 | #
|
|---|
| 11 | # bww_app creates the WPS object for the installed app
|
|---|
| 12 | # - Create program object for the installed app in the app folder
|
|---|
| 13 | # - Associate file filter with the installed app (if provided)
|
|---|
| 14 | # - Associate Icon to the app (if provided)
|
|---|
| 15 | # - Create shadow of the installed app on the desktop (if provided)
|
|---|
| 16 | #
|
|---|
| 17 | # bww_readme creates the WPS object for the readme
|
|---|
| 18 | # - Create shadow of a file
|
|---|
| 19 | #
|
|---|
| 20 | # parameter (-t) (used in bww_folder, bww_app)
|
|---|
| 21 | # this is the desired title for the folder or the app, if this parameter is left
|
|---|
| 22 | # out, we use %{summary} as the title
|
|---|
| 23 | #
|
|---|
| 24 | # parameter (-d) (used in bww_folder, bww_readme)
|
|---|
| 25 | # use this name as the document directory part
|
|---|
| 26 | # If this parameter is not provided, %_defaultdocdir/%{name}-%{version} is used
|
|---|
| 27 | #
|
|---|
| 28 | # parameter (-e) (used in bww_app)
|
|---|
| 29 | # This is the name of the app w/o the extension
|
|---|
| 30 | # This parameter is mandatory to create a WPS object
|
|---|
| 31 | #
|
|---|
| 32 | # parameter (-i) (used in bww_app)
|
|---|
| 33 | # Icon for the app. If this parameter is left out, no icon is added
|
|---|
| 34 | # The icon has to be copied to /@unixroot/usr/share/os2/icons during installation
|
|---|
| 35 | # If this parameter is not provided, no icons are added
|
|---|
| 36 | #
|
|---|
| 37 | # parameter (-a) (used in bww_app)
|
|---|
| 38 | # Associate a file filter (for example -a *.txt) to the app
|
|---|
| 39 | # If this parameter is not provided, no associations are added
|
|---|
| 40 | #
|
|---|
| 41 | # parameter (-s) (used in bww_folder, bww_app)
|
|---|
| 42 | # Create a shadow
|
|---|
| 43 | # If this parameter is not provided, no shadow is generated
|
|---|
| 44 | #
|
|---|
| 45 | # parameter (-o) (used in bww_app)
|
|---|
| 46 | # App extension including the . like .cmd .bat .sh
|
|---|
| 47 | # If this parameter is not provided, then .exe is used
|
|---|
| 48 | #
|
|---|
| 49 | # parameter (-r) (used in bww_readme)
|
|---|
| 50 | # Create a shadow for the provided readme
|
|---|
| 51 | # If this parameter is not provided, then no shadow is created
|
|---|
| 52 | #
|
|---|
| 53 |
|
|---|
| 54 | %bww_folder(t:d:s:)\
|
|---|
| 55 | %if %{undefined __bww_folder_done}\
|
|---|
| 56 | %define __bww_title %{!-t:%{summary} %{version}}%{-t:%{-t*}}\
|
|---|
| 57 | %define __bww_docdir %{!-d:%_defaultdocdir/%{name}-%{version}}%{-d:%{-d*}}\
|
|---|
| 58 | %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));\
|
|---|
| 59 | %wps_object_create %{name}_BWWHELP:WPShadow|Readme|<WP_BWWHELP>|SHADOWID=((%{__bww_docdir}));\
|
|---|
| 60 | %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;\
|
|---|
| 61 | %{-s:%{expand:%wps_object_create WP_BWWHELPSHADOW:WPShadow|bitwiseworks Help Center|<WP_BWWAPPS>|SHADOWID=<WP_BWWHELP>;}}\
|
|---|
| 62 | %wps_object_create %{name}_FOLDER:WPFolder|%{name}|<WP_BWWAPPS>|TITLE=%{__bww_title};\
|
|---|
| 63 | %global __bww_folder_done 1\
|
|---|
| 64 | %endif\
|
|---|
| 65 | %{nil}
|
|---|
| 66 |
|
|---|
| 67 | %bww_app(t:e:s:i:a:o:)\
|
|---|
| 68 | %define __bww_exeTitle %{!-t:%{summary}}%{-t:%{-t*}}\
|
|---|
| 69 | %define __bww_exeIcon %{!-i:}%{-i:ICONFILE=((/@unixroot/usr/share/os2/icons/%{-i*}));}\
|
|---|
| 70 | %define __bww_exeAssoc %{!-a:}%{-a:ASSOCFILTER=%{-a*};}\
|
|---|
| 71 | %define __bww_exeName %{!-o:%{-e*}.exe}%{-o:%{-e*}%{-o*}}\
|
|---|
| 72 | %{-e:%{expand:%wps_object_create %{-e*}_EXE:WPProgram|%{__bww_exeTitle}|<%{name}_FOLDER>|EXENAME=((%_bindir/%{__bww_exeName}));STARTUPDIR=((%_bindir));TITLE=%{__bww_exeTitle};%{__bww_exeIcon}%{__bww_exeAssoc}}}\
|
|---|
| 73 | %{-s:%{-e:%{expand:%wps_object_create %{-e*}_SHADOW:WPShadow|%{__bww_exeTitle}|<WP_DESKTOP>|SHADOWID=<%{-e*}_EXE>;}}}\
|
|---|
| 74 | %{nil}
|
|---|
| 75 |
|
|---|
| 76 | %bww_readme(r:d:)\
|
|---|
| 77 | %define __bww_docdir %{!-d:%_defaultdocdir/%{name}-%{version}}%{-d:%{-d*}}\
|
|---|
| 78 | %{-r:%{expand:%wps_object_create %{-r*}_README:WPShadow|Readme|<%{name}_FOLDER>|SHADOWID=((%{__bww_docdir}/%{-r*}))}}\
|
|---|
| 79 | %{nil}
|
|---|