@@ -17,7 +17,7 @@ suffix = case RbConfig::CONFIG['host_os']
17
17
os_based_on_ubuntu_16_04 = os . start_with? ( 'ubuntu_16.' ) || os . start_with? ( 'ubuntu_17.' )
18
18
os = 'ubuntu_16.04' if os_based_on_ubuntu_16_04
19
19
20
- os_based_on_ubuntu_18_04 = os . start_with? ( 'ubuntu_18.' ) || os . start_with? ( 'ubuntu_19.' ) || os . start_with? ( 'elementary' ) || os . start_with? ( 'linuxmint' ) || os . start_with? ( 'pop' )
20
+ os_based_on_ubuntu_18_04 = os . start_with? ( 'ubuntu_18.' ) || os . start_with? ( 'ubuntu_19.' ) || os . start_with? ( 'elementary' ) || os . start_with? ( 'linuxmint' ) || os . start_with? ( 'pop' ) || os . start_with? ( 'zorin' )
21
21
os = 'ubuntu_18.04' if os_based_on_ubuntu_18_04
22
22
23
23
os_based_on_ubuntu_20_04 = os . start_with? ( 'ubuntu_20.' )
@@ -29,9 +29,15 @@ suffix = case RbConfig::CONFIG['host_os']
29
29
os_based_on_centos_7 = os . start_with? ( 'amzn_2' )
30
30
os = 'centos_7' if os_based_on_centos_7
31
31
32
- os_based_on_debian_9 = / deepin/ . match? ( os )
32
+ os_based_on_debian_9 = ( /(debian_9| deepin)/ =~ os )
33
33
os = 'debian_9' if os_based_on_debian_9
34
34
35
+ os_based_on_debian = !os_based_on_debian_9 && os . start_with? ( 'debian' )
36
+ os = 'debian_10' if os_based_on_debian
37
+
38
+ os_based_on_archlinux = os . start_with? ( 'arch_' ) || os . start_with? ( 'manjaro_' )
39
+ os = 'archlinux' if os_based_on_archlinux
40
+
35
41
architecture = RbConfig ::CONFIG [ 'host_cpu' ] == 'x86_64' ? 'amd64' : 'i386'
36
42
37
43
"#{ os } _#{ architecture } "
@@ -41,6 +47,8 @@ suffix = case RbConfig::CONFIG['host_os']
41
47
'unknown'
42
48
end
43
49
50
+ suffix = ENV [ 'WKHTMLTOPDF_HOST_SUFFIX' ] unless ENV [ 'WKHTMLTOPDF_HOST_SUFFIX' ] . to_s . empty?
51
+
44
52
binary = "#{ __FILE__ } _#{ suffix } "
45
53
46
54
if File . exist? ( "#{ binary } .gz" ) && !File . exist? ( binary )
51
59
52
60
unless File . exist? binary
53
61
raise 'Invalid platform, must be running on Ubuntu 16.04/18.04/20.04 ' \
54
- 'CentOS 6/7/8, Debian 9/10, or intel-based Cocoa macOS ' \
62
+ 'CentOS 6/7/8, Debian 9/10, archlinux amd64, or intel-based Cocoa macOS ' \
55
63
"(missing binary: #{ binary } )."
56
64
end
57
65
0 commit comments