Closed ronaldtse closed 3 years ago
Please address this issue before Monday if possible, it is now disrupting rspec testing of Metanorma
Strange - this link http://officecdn.microsoft.com/pr/OfficeMac/OfficePreview.pkg is now returning Bad Request. The archive.org link works well but of course not as fast.
This full package (OfficePreview.pkg
) is still available on:
It seems that the official download pages have suddenly been pulled, but the updater links are still available. In any case, they are all available on archive.org.
NOTE:
yumin.ttf
.Apparently the method of finding fonts is also documented here:
The Download.com/CNET link requires a signature, so an additional step is required to obtain the dynamic link from the website.
Steps:
The original archive.org link for the 2.66GB file doesn't work anymore.
Only these links work now:
Have issues extracting pkg
and cpio
from the excel package.
I do the following:
microsoft_excel_15.11.1_updater.pkg
with pkgutil
, it works, but could not find cross-platform Ruby solutionPayload
with Zlib
, it's okASCII cpio archive (pre-SVR4 or odc)
), current cpio unarchiver could not unarchive it, may be the old magic format would workWill continue.
Apparently 7zip supports it as per the post below?
more details: https://stackoverflow.com/questions/11298855/how-to-unpack-and-pack-pkg-file
a parser that can extract the PKG files: https://github.com/NiklasRosenstein/pbzx
Thanks, Ronald, it helped! :) Prototyped a working solution with the xar gem. I've done a small fix in the library which is needed to be published before usage but overall it's working.
7z can do it but not the version in a ruby gem.
The pbzx
script could not unpack it because this pkg file contains a plain xar format without a pbzx stream.
The xar gem needs to be compiled or libxar to exist in a system :( Trying to compile it.
Or we can try to make seven_zip_ruby work with XAR. p7zip supports it: https://github.com/masamitsu-murase/seven_zip_ruby/blob/v1.3.0/ext/p7zip/CPP/7zip/Archive/XarHandler.cpp
Fixed some issues and compiled xar on MacOS. Will do it with rake-compiler in a forked gem.
@alexeymorozov if you need a gem compiled for multiple platforms @CAMOBAP has experience with it, he could do the CI builds/release.
@CAMOBAP, thank you for work in https://github.com/fontist/extract_ttc/issues/3. It was helpful! Asked a question in Skype, please look when you have time.
I'd rather continue the work with some help but, if there are other thoughts, can switch to the next tasks.
Compiled the binary here. Currently have an issue with a local path to Ruby in a compiled binary. It was taken from a machine on which it was compiled.
@alexeymorozov I will provide PR for https://github.com/alexeymorozov/ruby-xar to compile libxar
properly
Though libarchive
has been compiled with no significant problem, seems that it could not extract our pkg/xar archive.
Test files:
require "ffi-libarchive"
path = File.expand_path('test.pkg', __dir__)
flags = Archive::EXTRACT_PERM
reader = Archive::Reader.open_filename(path)
reader.each_entry do |entry|
reader.extract(entry, flags.to_i)
end
reader.close
C implementation does not work either:
curl -O https://raw.githubusercontent.com/libarchive/libarchive/master/examples/tarfilter.c
gcc -I/usr/local/opt/libarchive/include -Wall -o tarfilter tarfilter.c -larchive -lz -lbz2
./tarfilter < test.pkg > ustar.tar
Though both implementation work with no problem with "tar.gz" archives.
Issue in libarchive: https://github.com/libarchive/libarchive/issues/456
Have some ideas:
libarchive
, can use original https://github.com/mackyle/xarRecompiled tarfilter
linking the latest compiled libarchive, and it worked. The system one is too old and has old bugs. Will continue.
Done.
To use new fonts excavate
(fontist's dependency) should be updated to v0.2.2 🚀
Thanks @alexeymorozov !
@alexeymorozov I was just checking #219 but it doesn't seem the corresponding Formula has been created in fontist/formula. This was originally necessary for #73 . Can you help check?
Strange - this link http://officecdn.microsoft.com/pr/OfficeMac/OfficePreview.pkg is now returning Bad Request. The archive.org link works well but of course not as fast.
This link is still working as of now.
The "Office 2016 for Mac Preview" is a free download that does not require any subscription (https://techcrunch.com/2015/03/05/office-2016-for-mac-preview-free/). It has a license that does not necessarily restrict font usage, which is good.
Original page: https://web.archive.org/web/20150507144723/http://products.office.com/en-US/mac/mac-preview
The active "subscription" would have expired in Oct 2015, but the software license does not restrict usage: https://blogs.office.com/2015/07/22/your-top-10-questions-about-office-2016-for-mac-answered
The original full package is available here (2.66 GB): http://officecdn.microsoft.com/pr/OfficeMac/OfficePreview.pkg (archive.org first link, archive.org latest)
Updated in 2015 June: https://support.microsoft.com/en-us/help/3074179/office-2016-for-mac-preview-june-23-2015-update
Updated files: Outlook: http://download.microsoft.com/download/C/C/C/CCC09D91-6F8D-42CB-B3B0-CA9667181DE8/Microsoft_Outlook_15.11.1_Updater.pkg (archive.org link) (449MB) PowerPoint: http://download.microsoft.com/download/7/9/d/79d18a87-4a64-4104-80a7-0917763d6161/microsoft_powerpoint_15.11.1_updater.pkg (archive.org lihk) (708MB) Word: http://download.microsoft.com/download/c/4/9/c498c0fa-f799-4764-b49e-f70b32e7c6cb/microsoft_word_15.11.1_updater.pkg (archive.org link) (846MB) Excel: http://download.microsoft.com/download/8/1/3/8136bf31-4c2e-4b5f-bee9-117ab004ab35/microsoft_excel_15.11.1_updater.pkg (archive.org link) (736MB)
The license (extracted from OfficePreview.pkg) is provided here: License.rtf.zip
If we want to work off OfficePreview.pkg (2.66GB, from 2015-06-09), the order is:
OfficePreview.pkg
Office_fonts.pkg
which is a directoryPayload
which is a ZIPFonts
which contain all fontsHere we prefer the Excel version (736MB, from the latest 2015-06-23 update, file date 2015-06-18) because it's smaller and the CDN is a lot faster than the OfficePreview.pkg.
microsoft_excel_15.11.1_updater.pkg
Microsoft_Excel.pkg
which is a directoryPayload
which is a ZIPMicrosoft Excel.app
which is a directoryContents/Resources/Fonts
which contain all fontsThe fonts contained in both of these directories are identical in file size and in count.
In particular, this also contains
msgothic.ttc
which contains PGothic as requested in #73 .Fonts provided:
Full EULA
Office for Mac Privacy Statement MICROSOFT SOFTWARE LICENSE TERMS MICROSOFT OFFICE FOR MAC These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft • updates, • supplements, • Internet-based services, and • support services for this software, unless other terms accompany those items. If so, those terms apply. By using the software, you accept these terms. If you do not accept them, do not use the software. As described below, using some features also operates as your consent to the transmission of certain standard computer information for Internet-based services. If you comply with these license terms, you have the perpetual rights below.