@@ -4,10 +4,11 @@ premake.modules.install_cef = {}
44
55-- Config variables
66local CEF_PATH = " vendor/cef3/"
7- local CEF_URL_PREFIX = " https ://mirror.mtasa .com/bdata/cef/ "
7+ local CEF_URL_PREFIX = " http ://opensource.spotify .com/cefbuilds/cef_binary_ "
88local CEF_URL_SUFFIX = " _windows32_minimal.tar.bz2"
99
10- local CEF_VERSION = " 80.0.4+g74f7b0c+chromium-80.0.3987.122" -- Change here to update CEF version
10+ -- Change here to update CEF version
11+ local CEF_VERSION = " 80.0.4+g74f7b0c+chromium-80.0.3987.122"
1112
1213function make_cef_download_url ()
1314 return CEF_URL_PREFIX .. http .escapeUrlParam (CEF_VERSION ).. CEF_URL_SUFFIX
@@ -22,20 +23,15 @@ newaction {
2223 if os .host () ~= " windows" then return end
2324
2425 -- Download md5
25- local correct_checksum , result_string = http .get (make_cef_download_url ().. " .md5 " )
26+ local correct_checksum , result_string = http .get (make_cef_download_url ().. " .sha1 " )
2627 if result_string ~= " OK" and result_string then
2728 print (" Could not check CEF checksum: " .. result_string )
2829 return -- Do nothing and rely on earlier installed files (to allow working offline)
29-
30- -- TODO(jusonex): It might make sense to fallback to spotify cef mirror
3130 end
3231
33- -- Trim whitespace
34- correct_checksum = correct_checksum :gsub (" [%s%c]" , " " )
35-
3632 -- Check md5
3733 local archive_path = CEF_PATH .. " temp.tar.bz2"
38- if os .isfile (archive_path ) and os .md5_file (archive_path ) == correct_checksum then
34+ if os .isfile (archive_path ) and os .sha1_file (archive_path ): lower ( ) == correct_checksum then
3935 print (" CEF consistency checks succeeded" )
4036 return
4137 end
@@ -56,10 +52,10 @@ newaction {
5652 -- Extract first bz2 and then tar
5753 os .extract_archive (archive_path , CEF_PATH , true ) -- Extract .tar.bz2 to .tar
5854 os .extract_archive (CEF_PATH .. " temp.tar" , CEF_PATH , true ) -- Extract .tar
59-
55+
6056 -- Move all files from cef_binary*/* to ./
6157 os .expanddir_wildcard (CEF_PATH .. " cef_binary*" , CEF_PATH )
62-
58+
6359 -- Delete .tar archive, but keep .tar.bz2 for checksumming
6460 os.remove (CEF_PATH .. " temp.tar" )
6561 end
0 commit comments