Revision history for RoxApplicationDirectory


Revision [30833]

Last edited on 2016-05-14 16:36:24 by don570 [dead roscidus.com link]
Additions:
[[http://rox.sourceforge.net/desktop/AppDirs.html]]


Revision [22087]

Edited on 2012-07-07 12:33:31 by darkcity [dead roscidus.com link]
Additions:
~~""AppRun"" - script to run program
~These typically contain the following - using [[AbiWord]] as an example-
~~%%<?xml version="1.0"?>
~~%%#!/bin/sh
~The ##"$@"## passes the file clicked on to the application.
[[http://roscidus.com/desktop/AppDirs ROX-App-Dirs on ROX homepage]]
Deletions:
~~"AppRun"" - script to run program
These typically contain the following - using [[AbiWord]] as an example-
%%
<?xml version="1.0"?>
%%
#!/bin/sh
The ##"$@"## passes the file clicked on to the application.
[[http://roscidus.com/desktop/AppDirs ""AppDirs"" on ROX desktop]] - in Puppy ""AppDirs"" are only used for 'right-click' file associations rather than containing the whole apps


Revision [22086]

Edited on 2012-07-07 12:30:08 by darkcity [dead roscidus.com link]
Additions:
====ROX Application Directories (ROX-App-Dirs)====
~Although the [[ROXFiler ROX Filer]] is used in many Puppy versions, the ROX Desktop Environment as a whole is not. ROX has the concept of using self contained **Application directories** (as its model, Risc OS, did). These directories would include program's help files, images, binaries and possibly other things. However, in Puppy most applications are installed to various places within the standard the [[RootFS Linux Root FS]].
==Location and linking==
~The location for ROX-App-Dirs is ##/usr/local/apps##
~Sometime the MIME-type directories link these directories.
~Standard files inside the directories are-
~~Appinfo.xml - information about app in xml
~~"AppRun"" - script to run program
~~"".DirIcon"" - image file icon for directory (many apps have an icon stored in ##/usr/share/pixmaps## which you can link)
~Appinfo.xml -
<?xml version="1.0"?>
~""AppRun"" -
The ##"$@"## passes the file clicked on to the application.
[[InternetMediaTypes Internet Media Types]]
----
==Categories==
CategoryGUI
Deletions:
====How to make Application Entries====
work in progress
//
There are two ways to associate file-types in Puppy. The first is the by setting the 'default action' when clicking a certain file type. The second is creating an option in the ##File 'filename'## menu when file is 'right-clicked'.
=='Right-click' Association==
MIME-Types are used to standardised file-types. The 'Right-click' options are stored in
##""/root/.config/rox.sourceforge.net/OpenWith""##
There is a directory for each mime-type in use, for example the MIME-Type directory for ##image/jpeg## becomes ##.image_jpeg##
~A shortcut for getting to this directory is to right-click on a jpeg and select
~//File 'filename.jpg' > Customise Menu ...//
Typically the MIME-type directories are filled with links to ROX ""AppDirs"" stored at ##/usr/local/apps##
If the application/action you want is already in this directory simply create a link in the MIME-type directory.
If not then create an ""AppDir"". They consist of a directory containing three files-
Appinfo.xml - information about app in xml
""AppRun"" - script to run program
"".DirIcon"" - image file icon for directory (many apps have an icon stored in ##/usr/share/pixmaps## which you can link)
Appinfo.xml -
%%<?xml version="1.0"?>
""AppRun"" -
%%#!/bin/sh
The ##"S@"## passes the file clicked on to the application.
To pass a file to a [[WINE]] program see the follow example with Irfanview

""AppRun"" -
%%#!/bin/sh
# Purpose: To convert Unix filename to DOS style to pass as an argument
# to wine when starting IrfanView from filer.
#
FileName="z:"${1//\//\\}
exec wine 'C:\\Program Files\\IrfanView\\i_view32.exe' $FileName%%
=='Default Action' Association==
To set the 'default action' of a file-type follow the following instructions (modified from [[http://www.murga-linux.com/puppy/viewtopic.php?p=363990 this thread]])
**1.** Check if your file-type has a MIME-type entry in Puppy Linux. They are stored in the text file ##/usr/share/mime/globs##
If file-type is already associated to the correct MIME-type jump to step 2.
Add or edit your MIME-Type to file-type definition. For example, if you have a TextMaker file whose extension is ##.tmd## and your making a non-standard MIME-type ##application/x-tmd## append the code ##application/x-tmd:*.tmd## to the globs file. ENSURE you end the line with a 'return' otherwise it won't work.
(The x- in the MIME-type name above is used to indicate that this type hasn't already been registered with the MIME-type authorities ([[www.iana.org/assignments/media-types/ media-types]]). i.e. It is a non-standard/private/local type, not an IANA officially registered one.)
**2.** Create an executable shell script in ##/usr/local/bin## , for starting up the TextMaker program and passing the 'clicked on' file to it. In our example, .tmd files will be associated to TextMaker. We'll make a script called ##textmaker## (though it could be anything you like):
textmaker -
%%
exec /usr/local/textmaker/tml "$@"
You don't need the path to the executable (in this case ##/usr/local/textmaker/##) if the path directory your Linux [[PATH]] environment variable.
If textmaker was a [[WINE]] program then the script might be-
textmaker -
%%#!/bin/sh
# Purpose: To convert Unix filename to DOS style to pass as an argument
# to wine when starting IrfanView from filer.
#
FileName="z:"${1//\//\\}
exec wine 'C:\\Program Files\\TextMaker\\TextMaker.exe' $FileName%%
**3.** Finally, tell the ROX filer to run that script when you click on your file-type. To do that you create another script in ##/root/Choices/MIME-types## named after the MIME-type. In our example the MIME type was application/x-tmd, so the file becomes ##application_x-tmd##-
application_x-tmd
%%#!/bin/sh
exec textmaker "$1"%%
~An alternative to step 3. is to use 'Set Run Action' i.e right click on a file of your type and enter the shell command. In our example it would be ##exec textmaker "$1"##.
~NOTE this alternative will save MIME-Type run action in ##/root/.config/rox.sourceforge.net/MIME-types## rather than ##/root/Choices/MIME-types##. This method will take precedence over using ##/root/Choices/MIME-types## (i.e. ROX looks to ##/root/.config/rox.sourceforge.net/MIME-types## first).
[[http://www.murga-linux.com/puppy/viewtopic.php?p=363429#363429 Example involving two MS applications running over wine, thread]]
[[http://www.murga-linux.com/puppy/viewtopic.php?p=363990 How to add a new MIME-type (file extension type) thread]]
[[http://theinfamousj.tumblr.com/post/13433505685/puppy-linux-adding-new-mime-filetypes adding MIME type on tumblr (with pics)]]
//


Revision [22083]

The oldest known version of this page was created on 2012-07-07 12:05:29 by darkcity [dead roscidus.com link]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki