docubot 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/docubot.rb +1 -1
- data/lib/docubot/writers/chm.rb +12 -0
- metadata +1 -1
data/lib/docubot.rb
CHANGED
data/lib/docubot/writers/chm.rb
CHANGED
@@ -26,6 +26,18 @@ class DocuBot::CHMWriter < DocuBot::HTMLWriter
|
|
26
26
|
process.Terminate if process.CommandLine.include? @chm_path.gsub('/','\\')
|
27
27
|
end
|
28
28
|
end
|
29
|
+
|
30
|
+
# Help find hhc.exe
|
31
|
+
possible_hhc_spots = [ "C:\\Program Files\\HTML Help Workshop", "C:\\Program Files (x86)\\HTML Help Workshop" ]
|
32
|
+
path_directories = ENV['PATH'].split(';').concat( possible_hhc_spots )
|
33
|
+
ENV['PATH'] = path_directories.join(';')
|
34
|
+
unless path_directories.any?{ |dir| File.exists?( File.join(dir, 'hhc.exe' ) ) }
|
35
|
+
warn "Cannot find hhc.exe in your PATH or the standard install spots.\nDid you install HTML Help Workshop?"
|
36
|
+
FileUtils.rm( [ @hhc, @hhp, @hhk ] )
|
37
|
+
FileUtils.rm_r( @html_path )
|
38
|
+
exit 1
|
39
|
+
end
|
40
|
+
|
29
41
|
`hhc.exe "#{FileUtils.win_path @hhp}"`.gsub( /[\r\n]+/, "\n" )
|
30
42
|
puts "...%.2fs to create the CHM" % (Time.now-lap)
|
31
43
|
lap = Time.now
|