* New Plugin  Install Icon Packs

Homeless Posts from the old forum system
Locked
User avatar
Jane
Site Admin
Posts: 8521
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

New Plugin  Install Icon Packs

Post by Jane »

I have done another plugin, again something I wanted.

Install FHUG Icon Packs

Install Icon packs to the Icon Folder on Family Historian.

The plugin will prompt for a zip file and create a subfolder in the FH icon folder with the same name as the zip file and add any bitmap (bmp) graphics files in to the folder. It will overwrite existing files with matching names.

It also uses a couple of new techniques, to download and install an additional lua dll to the plugin folder if it does not exist, as I needed zip support to open the icon zip files.

It's not in the store yet, but feel free to give it a try.

ID:6254
User avatar
tatewise
Megastar
Posts: 28488
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

New Plugin  Install Icon Packs

Post by tatewise »

Basically worked OK for me.

I know the Description explains how the Plugin works, but user has to open the Plugins window and use the Description scroll bar to read it all.
So, possibly some explanatory text is needed along with the GetFile dialogue?
e.g.

Code: Select all

    local dialogGetFile = iup.filedlg{
      dialogtype='OPEN',
      title='Select the downloaded Icon zip file to install in FH Icons subfolder',
      directory=documentsdir,
      filter='*.zip'
      }
    dialogGetFile:popup(iup.CENTER, iup.CENTER)
    if dialogGetFile.status ~= 0 then
        return
    end
    local path,file,ext = splitfilename(dialogGetFile.value)
The function installplugin(filename) worked but strictly:
(1) '\plugins\' folder should be '\Plugins\'
(2) SaveStringToFile(data,storein..'\'..filename) should be SaveStringToFile(data,storein..filename) to avoid duplicated
User avatar
Jane
Site Admin
Posts: 8521
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

New Plugin  Install Icon Packs

Post by Jane »

Thanks Mike I have done those.

BTW dialogGetFile.status is a string so needed '0' for the check.

I have now submitted this to the plugin store.
User avatar
tatewise
Megastar
Posts: 28488
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

New Plugin  Install Icon Packs

Post by tatewise »

I have run into a problem with the way this Plugin uses ProgramData Icons sub-folders.

The problem arises when transferring FH V5 from Windows XP to Windows 7/Vista, or vice versa.

Diagram Box Features select these installed Icons sub-folders with a full path name.
When the Diagram Settings are transferred in .fhdx files, these full path names no longer exist.
Therefore all those Icons vanish from the Diagrams and have to be re-selected!
The same will be true for the Primary Standard Diagrams stored in the Windows Registry if those keys are transferred.

To make these Icons truly portable they need to be installed in the ProgramData Icons folder itself.
Perhaps these Icons could have the Icon Pack Name prefixed to the Icon Filename instead of using an Icon Pack sub-folder.

Looking to the future, who knows what might happen in Windows 8 to the ProgramData path name?

The only other solution would be for Family Historian to store a relative path to Icons anywhere in the Icons folder or sub-folders.
This would be a straightforward extension to the current situation where only Icon Filenames are stored when selected from the ProgramData Icons folder.
Locked