Closed thehabes closed 5 years ago
we could also change
if (preferredFitter.endsWith("hshfitter.exe")) {
// do fitter stuff
}
to
if (preferredFitter.endsWith("hshfitter.exe")||preferredFitter.endsWith("hshfitter")) {
// do fitter stuff
}
but then a directory named hshfitter would allow the program to continue but crash later on a "directory is not a file" error.
As bryan states, do we want to make the app agnostic to the file name? If we don't we need to add documentation to instruct user to name it correctly to make sure the user changes the file name extension of the fitter for mac (add .cmd or .bash) Secondary issue is accessing a HSH Fitter Right now the compressor is no longer available for free for Mac from Kacadu and this might also happen to the fitter.
I think the best solution will require figuring out how HSHfitter is run on a Mac in a normal context. I don't have access to a Mac, but I can see that Cultural Heritage Imaging offers a Mac version of the software package that includes HSHfitter. http://culturalheritageimaging.org/What_We_Offer/Downloads/Process/index.html I can also see that the dmg file linked from there contains a couple of files or folders named HSHfitter:
./RTIbuilder-v2.0.2.app/Contents/Resources/Java/Fitters/HSHfitter
./RTIbuilder-v2.0.2.app/Contents/Resources/Java/Fitters/HSHfitter/hshfitter
./RTIbuilder-v2.0.2.app/Contents/Resources/Java/Fitters/HSHfitter/HSHfitter.dSYM
./RTIbuilder-v2.0.2.app/Contents/Resources/Java/Fitters/HSHfitter/HSHfitter.dSYM/Contents/Resources/DWARF/HSHfitter
./RTIbuilder-v2.0.2.app/Contents/Resources/Java/Plugins/HSHFitter
./RTIbuilder-v2.0.2.app/Contents/Resources/Java/Plugins/HSHFitter/HSHfitterPlugin.jar
I would be very surprised if the entire fitting can be run from a jar, but if one of those files is something like a mac executable we could have hshfitter (for Mac) and hshfitter.exe (for Windows and Wine) side by side and just figure out which one to use.
Extension checking is done and adds extensions when necessary for mac, the filename can be whatever.
We found that on a mac, the file being named
hshfitter
crashed the program with the message that said "could not identify the type of fitter you are using". This is becauseThe naming convention for the fitter either needs different logic or it should be stated somewhere clearly how it needs to be named.