Hi Toxaris,
Not much luck. Optimizing the jpegs failed. I notice your "windows" files are named jpegtran.exe whereas on a Mac they do not have the .exe file extensions. Should I rename them to match your names? I tried that and it does not help.
Here is what the output says when run on the Sigil_Plugin_Framework_rev4.epub:
Code:
Status: success
['mono', '/Users/kbhend/Library/Application Support/sigil-ebook/sigil/plugins/ePUBOptimizer/ePUBOptimizer.exe', '/Users/kbhend/Library/Application Support/sigil-ebook/sigil/plugins/ePUBOptimizer/dummy.epub']
Processing /Users/kbhend/Library/Application Support/sigil-ebook/sigil/plugins/ePUBOptimizer/dummy.epub
Get unique characters per font
Extract ePUB
Subset fonts
Optimizing OEBPS/Images/Manage_Plugins.jpg
Optimizing failed.
Optimizing OEBPS/Images/PluginRunner.jpg
Optimizing failed.
Optimizing OEBPS/Images/Sigil_Plugins_Menu.jpg
Optimizing failed.
Rebuild ePUB
Cleanup
open: invalid option -- o
Usage: open [-e] [-t] [-f] [-W] [-R] [-n] [-g] [-h] [-b <bundle identifier>] [-a <application>] [filenames] [--args arguments]
Help: Open opens files from a shell.
By default, opens each file using the default application for that file.
If the file is in the form of a URL, the file will be opened as a URL.
Options:
-a Opens with the specified application.
-b Opens with the specified application bundle identifier.
-e Opens with TextEdit.
-t Opens with default text editor.
-f Reads input from standard input and opens with TextEdit.
-F --fresh Launches the app fresh, that is, without restoring windows. Saved persistent state is lost, excluding Untitled documents.
-R, --reveal Selects in the Finder instead of opening.
-W, --wait-apps Blocks until the used applications are closed (even if they were already running).
--args All remaining arguments are passed in argv to the application's main() function instead of opened.
-n, --new Open a new instance of the application even if one is already running.
-j, --hide Launches the app hidden.
-g, --background Does not bring the application to the foreground.
-h, --header Searches header file locations for headers matching the given filenames, and opens them.
open: invalid option -- o
Usage: open [-e] [-t] [-f] [-W] [-R] [-n] [-g] [-h] [-b <bundle identifier>] [-a <application>] [filenames] [--args arguments]
Help: Open opens files from a shell.
By default, opens each file using the default application for that file.
If the file is in the form of a URL, the file will be opened as a URL.
Options:
-a Opens with the specified application.
-b Opens with the specified application bundle identifier.
-e Opens with TextEdit.
-t Opens with default text editor.
-f Reads input from standard input and opens with TextEdit.
-F --fresh Launches the app fresh, that is, without restoring windows. Saved persistent state is lost, excluding Untitled documents.
-R, --reveal Selects in the Finder instead of opening.
-W, --wait-apps Blocks until the used applications are closed (even if they were already running).
--args All remaining arguments are passed in argv to the application's main() function instead of opened.
-n, --new Open a new instance of the application even if one is already running.
-j, --hide Launches the app hidden.
-g, --background Does not bring the application to the foreground.
-h, --header Searches header file locations for headers matching the given filenames, and opens them.
open: invalid option -- o
Usage: open [-e] [-t] [-f] [-W] [-R] [-n] [-g] [-h] [-b <bundle identifier>] [-a <application>] [filenames] [--args arguments]
Help: Open opens files from a shell.
By default, opens each file using the default application for that file.
If the file is in the form of a URL, the file will be opened as a URL.
Options:
-a Opens with the specified application.
-b Opens with the specified application bundle identifier.
-e Opens with TextEdit.
-t Opens with default text editor.
-f Reads input from standard input and opens with TextEdit.
-F --fresh Launches the app fresh, that is, without restoring windows. Saved persistent state is lost, excluding Untitled documents.
-R, --reveal Selects in the Finder instead of opening.
-W, --wait-apps Blocks until the used applications are closed (even if they were already running).
--args All remaining arguments are passed in argv to the application's main() function instead of opened.
-n, --new Open a new instance of the application even if one is already running.
-j, --hide Launches the app hidden.
-g, --background Does not bring the application to the foreground.
-h, --header Searches header file locations for headers matching the given filenames, and opens them.
Optimization process complete
And here is what it looks like if I run it directly from the command line. It seems to be missing the jpeg input files:
Code:
KevinsiMac:ePUBOptimizer kbhend$ mono /Users/kbhend/Desktop/ePUBOptimizer/ePUBOptimizer.exe ./dummy.epub
Processing ./dummy.epub
Get unique characters per font
Extract ePUB
Subset fonts
Optimizing OEBPS/Images/Manage_Plugins.jpg
Empty input file
Optimizing OEBPS/Images/PluginRunner.jpg
Empty input file
Optimizing OEBPS/Images/Sigil_Plugins_Menu.jpg
Empty input file
Rebuild ePUB
Cleanup
KevinsiMac:ePUBOptimizer kbhend$
To test jpegtran I ran the following and it worked just fine:
./jpegtran -optimize ~/Desktop/Manage_Plugins.jpg > ~/Desktop/output.jpg
So jpegtran does seem to work.
I did notice one other windows executable called pngout.exe that does not seem to be part of Mono nor part of optipng. Is there a source archive for pngout as well I should have built?
Any ideas on how to debug further?
Thanks,
KevinH