Windows cpdflin support
This commit is contained in:
parent
24fb572270
commit
73d624967f
|
@ -24,16 +24,25 @@ let find_cpdflin provided =
|
||||||
Some x -> Some x
|
Some x -> Some x
|
||||||
| None ->
|
| None ->
|
||||||
if Sys.file_exists "cpdflin" then Some "cpdflin" else
|
if Sys.file_exists "cpdflin" then Some "cpdflin" else
|
||||||
|
if Sys.file_exists "cpdflin.exe" then Some "cpdflin.exe" else
|
||||||
match option_map (is_at_path "cpdflin") (paths ()) with
|
match option_map (is_at_path "cpdflin") (paths ()) with
|
||||||
h::_ -> Some h
|
h::_ -> Some h
|
||||||
| _ -> None
|
| _ ->
|
||||||
|
match option_map (is_at_path "cpdflin.exe") (paths ()) with
|
||||||
|
h::_ -> Some h
|
||||||
|
| _ -> None
|
||||||
|
|
||||||
(* Call cpdflin, given the (temp) input name, the output name, and the location
|
(* Call cpdflin, given the (temp) input name, the output name, and the location
|
||||||
of the cpdflin binary. Returns the exit code. *)
|
of the cpdflin binary. Returns the exit code. *)
|
||||||
let call_cpdflin cpdflin temp output best_password =
|
let call_cpdflin cpdflin temp output best_password =
|
||||||
let command =
|
let command =
|
||||||
cpdflin ^ " " ^ Filename.quote temp ^
|
match Sys.os_type with
|
||||||
" \"" ^ best_password ^ "\" " ^ Filename.quote output
|
"Win32" ->
|
||||||
|
cpdflin ^ " --linearize " ^
|
||||||
|
Filename.quote temp ^ " " ^ Filename.quote output
|
||||||
|
| _ ->
|
||||||
|
cpdflin ^ " " ^ Filename.quote temp ^
|
||||||
|
" \"" ^ best_password ^ "\" " ^ Filename.quote output
|
||||||
in
|
in
|
||||||
Sys.command command
|
Sys.command command
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue