Software
CHM Viewer for MacOS
23/05/18 10:43
This application is not my work nor have I made modifications to the source code - I have just made it compile for 64bit MacOS. The iCHM this works for is https://github.com/NSGod/ichm.
Whilst looking for a free CHM viewer I came across iCHM. I wanted to read the documentation for a third party library and didn't feel the need to spend money just to read the documentation. iCHM looked the part and worked; mostly. All the binaries I could find (before it became a pay for use application on the App Store) are 32 bit and won't be supported on MacOS after High Sierra. This bothers me as I know that at some stage in the future I'll have to go through the rigmarole of finding a free CHM viewer again. Given that older versions of iCHM are open source - I document here how I created a binary.
Disclaimer - Works for me. Your mileage and outcome may be different.
Procedure
Whilst looking for a free CHM viewer I came across iCHM. I wanted to read the documentation for a third party library and didn't feel the need to spend money just to read the documentation. iCHM looked the part and worked; mostly. All the binaries I could find (before it became a pay for use application on the App Store) are 32 bit and won't be supported on MacOS after High Sierra. This bothers me as I know that at some stage in the future I'll have to go through the rigmarole of finding a free CHM viewer again. Given that older versions of iCHM are open source - I document here how I created a binary.
Disclaimer - Works for me. Your mileage and outcome may be different.
Procedure
- You'll need to have Xcode installed. Off to the App Store if you haven't already.
- Download the sources for iCHM from GutHub here: https://github.com/NSGod/ichm
- iCHM requires some frameworks, all available on GitHub, get them here: https://github.com/dorianj/PSMTabBarControl, https://github.com/lvivski/chm_lib and https://github.com/sparkle-project/Sparkle. Use the green "Clone or download" control to download the full source archive of each framework.
- Create a Frameworks folder in the iCHM source folder.
- Extract all the frameworks zips to some temporary location. You can delete the sources once the frameworks are built.
- Open a terminal and cd to the PSMTabBarControl folder.
- Enter ./build.sh
- Copy the contents of build/Release to the iCHM/Frameworks folder.
- cd to the chm_lib folder.
- Enter ./build.sh
- Copy the contents of build/Release to the iCHM/Frameworks folder.
- cd to the Sparkle folder.
- Enter make release
- Copy the contents of build/Release to the iCHM/Frameworks folder.
- Open Xcode and open the iCHM Xcode project file. Perform the changes Xcode deems necessary.
- Go to the linker and remove the -lcrypto link module.
- Change the target platform to 10.12 and ensure 64bit is seclected.
- Change the version number to reflect the 64bit nature of the build. This is necessary but can remind you if you forget where it came from.
- Build a release and copy it to your Applications folder.
- Tada.