Jonathan-LeRoux / IguanaTex

A PowerPoint add-in allowing you to insert LaTeX equations into PowerPoint presentations on Windows and Mac
http://www.jonathanleroux.org/software/iguanatex/
Other
851 stars 59 forks source link

PowerPoint couldn't load the add-in "IguanaTex_v1_60_2.ppam" error message #58

Closed Atcold closed 6 months ago

Atcold commented 7 months ago

Recently, I've been getting the following error when starting up PowerPoint.

PowerPoint couldn't load the add-in "/Users/atcold/Library/Group Containers/UBF8T346G9.Office/User Content.localized/Add-Ins.localized/IguanaTex_v1_60_2.ppam".

If I cd in that location, I find IguanaTex_v1_60_3.ppam. I wonder what is looking for IguanaTex_v1_60_2.ppam.

The plugin seems to work just fine, though.

Jonathan-LeRoux commented 7 months ago

I'm guessing the .ppam file for the previous version was deleted when you upgraded to v1.60.3, but the add-in was not unregistered in PowerPoint.

Do you remember if you upgraded to v1.60.3 manually or using @tsung-ju's brew installation? The brew installation doesn't unregister previous versions, but it also doesn't delete the ppam file, so it shouldn't create an issue. Could you maybe have deleted it when installing manually?

If you look into Tools > PowerPoint Add-ins..., do you see both versions? If not, maybe you will need to use AppleScript to fix it. I know next to nothing about AppleScript, but, based on @tsung-ju's homebrew script, I'm guessing something like this could work:

version '1.60.2'
ppam_name = "IguanaTex_v#{version.gsub('.', '_')}.ppam"
tell application "Microsoft PowerPoint"
  if add ins is not missing value then
    repeat with addIn in (add ins as list)
      if name of addIn = "#{ppam_name}" then
        set loaded of addIn to false
        set auto load of addIn to false
        set registered of addIn to false
      end if
    end repeat
  end if
end tell
Atcold commented 7 months ago

My brew updates automatically all its packages, therefore it bumped up IguanaTeX as well. I see both versions under PowerPoint Add-ins, with the older one disabled.

image

Still, PowerPoint looks for the missing file at boot. I guess I can just delete the item in the panel.

Atcold commented 7 months ago

Confirming that deleting the item gets rid of the error message. The brew script should remove the previous version, rather than just disable it, when it removes the file. Otherwise, it should not remove files.

Jonathan-LeRoux commented 7 months ago

Thanks for the update! It's odd that the brew upgrade removed the file without unregistering it. I'm wondering if this could happen because the upgrade happened while PowerPoint was open: I just tried with the machine of a colleague of mine and the same thing happened. Now I need to find someone else on v1.60.2 to try upgrading after closing PowerPoint (is it possible to downgrade a third-party cask to a previous version??).

Jonathan-LeRoux commented 6 months ago

I did some tests and found that closing PowerPoint did not helpbrew automatically remove the old add-in from the list of add-ins in PowerPoint. I thus improved the upgrade instructions in the README.md of @tsung-ju's homebrew-iguanatexmac repo, and opened a PR. Hopefully, it will be merged soon.

tsung-ju commented 6 months ago

The Homebrew script was intended to unregister the add-in from PowerPoint. However, it seems PowerPoint change their api so that the add-in's name no longer includes a ".ppam" suffix, which broke the script. This should be easy to fix. I will look into it.

Jonathan-LeRoux commented 6 months ago

Thanks as always! Feel free to ignore/edit my PR.

Atcold commented 3 months ago

Thanks to both! 😀