Why does boost have different downloads for windows and linux? - boost

This might be a stupid question, but if boost is meant to be cross-platform, why does each platform need its own version?
If I want to package a (header-only) subset of boost as a dependency with my project, do I need to include both windows and linux versions?

Line endings.
Windows IDEs typically prefer to edit all files in CR+LF (windows) line-ends.
All other platforms use LF (Unix) style line ends.
From old documentation:
.zip file
The .zip format is widely supported by both free decoders and
commercial compress/archive utilities. If you don't already have a
.zip file decoder, download one from the Info-ZIP web site, which
supplies versions for many operating systems. Text file line endings
in the .zip file are as supplied by each library developer. This
works fine for Windows, but not for Unix/Linux. The .tar.gz and
.tar.bz2 files supply Unix/Linux friendly line endings.
.tar.gz and .tar.bz2 files
The .tar.gz format is widely supported on Unix/Linux platforms. Some
Windows compress/archive utilities can read the format as well.
Because the gzip format compresses the archive as a single file rather
than compressing each file individually, the .tar.gz file is smaller
that the .zip file.
The .tar.bz2 format is becoming widely available on Unix/Linux
platforms and is built into many tar utilities. This format differs
for the .tar.gz format in the compression used, which is considerably
better and therefore creates smaller files.
Text file line endings in the .tar.gz and .tar.bz2 files have been
converted to newlines for ease of use on Unix/Linux platforms.

Related

How to how to install poppler from the .tar file downloaded from poppler official site

There is no useful information on the site describing how to install the file .I have tried extracting the .tar file, installing through command prompt . there is no information available on the web.OS used is windows 11. Its for a project to extract data from images, using OCR. Poppler is used for getting page numbers of the pdf file which will be converted to an image file later in the process."https://poppler.freedesktop.org/" is the site from which I downloaded the file.Is this the right site.Any answer is helpful.Thank you
Poppler source is constantly updated, and thus common for Linux and Mac users to build or brew on demand. It is not much different when using Programming Suites like Python, Ruby etc.
Windows users expect one exe, but the poppler utils were built as a spin off from non-commercial licensed xpdf and for personal 32 bit users that is often simpler.
I have given examples for how simple that xpdf unpacking can be for one exe in several posts such as https://stackoverflow.com/a/68697144/10802527 (how to scan a file list, not used here) and https://stackoverflow.com/a/73123537/10802527 (how to use to run a single file) and
https://stackoverflow.com/a/73437398/10802527 (running one exe on demand)
Poppler prebuilt binaries are available as 64bit only so the first step after making a work directory is download latest version from https://github.com/oschwartz10612/poppler-windows using most current
https://github.com/oschwartz10612/poppler-windows/releases/download/v22.04.0-0/Release-22.04.0-0.zip and save to the working folder, then you can use right click Extract All... OR
tar -m -xf Release-22.04.0-0.zip to unpack in that folder so it should look like in the binary folder
Now the exe files are in a subdirectory and when using those it is best if that folder is included on the path environment.
RESIST any means to add using set or worse setx simply add folder via system gui, note in some cases after saving the setting it may need log off and log on to stick and in very rare cases even a reboot/restart.

How do you get Firefox in a portable format for Mac, Linux and Windows?

Is it possible to get Firefox in a portable format?
The only "portable" version of FireFox I can find is on portableapps.com and it is just an installer, and from what I hear you cannot package that in your own application.
How do you get a portable version of Firefox for Windows, Mac or Linux?
For windows, just download the installer and run the Exe to completion then zip the result. This seems to work fine for use with Automated browser testing which is what I was using the portable zip for.
For Linux, you can just literally use the tar.bz2 file. It is basically portable in the default distribution already.
And for Mac you can mount the DMG file then just copy the zip contents.
One thing I also needed to do was to manually go through each file that started as executable and re-make them executable. Because the process of zipping up the files made the files non-executable.

I have downloaded a static built of a linux program. Where should I put the man pages?

I have downloaded a static built of a linux program (ffmpeg) I want to use in my Ubuntu 14.04
I just copy the executable (ffmpeg) into /usr/local/bin and the program works. I have been doing so for long now with this program. The author of the static built updates it very often.
But I have no man pages. Inside the directory where the static built comes, there is a directory called manpages. I think I might copy the files inside that directory (or the directory itself) to some location in my hard drive and from that moment I would be able to type in a console:
man ffmpeg
Where should I put those files?
Remark: I don't want to delve into the complexities of compiling the program on my own (gathering information about the components I should include in the compilation, etc) and I don't want to use the fork (avconv) of ffmpeg that unluckily comes with my ubuntu because of the multiple bugs I have experience with it, and because of its lack of some ffmpeg features (video de-shaking!). Thanks.
To find the paths on which man pages are searched, you can use the manpath command (see also this superuser question). In (my) Ubuntu 14.04 system, this delivers the following search path:
/usr/local/man:/usr/local/share/man:/usr/share/man
So you could just put the man pages into /usr/local/share/man.
I’m not sure which static build of ffmpeg you are using; if it‘s the one currently mentioned on the official ffmpeg page, then this will probably not work, though. The manpages directory of that distribution is not in the required man page format; the .txt files only contain dumps of man pages. Compare these .txt files to existing man pages under /usr/share/man, for example.

Does 7Zip SDK support also the container?

I am doing a some research on 7Zip SDK and I haven't find any info about the container. Does 7Zip SDK have the LZMA algorithm only or does it support also the 7Zip container?
Zip, for example, keeps the directory structure at the end of the file, is 7Zip doing the same or something similar?
According to how to compres a Folder uses lzma sdk? in the 7zip SDK, we have two levels:
LZMA compression - (over stream or buffer);
.7z archive format - The .7z archive format does handle archive/directory features.
Found a very good 7zip C++ wrapper on https://bitbucket.org/cmcnab/sevenzip which is a very good example and works great!

How to create ZIP files with specific encoding

On my Linux server I have some files with accented names (test-éàïù.zip).
When I add them to a new ZIP file using 7zip command-line tool, the charset/encoding information is not saved and when opened on a Windows computer, the archive does not correctly display filenames.
I know that 7zip creates Zip V1.0 archives, not 2.0. Maybe the charset is limited to MSDos charset ?
How could I specify an encoding using 7zip or another zip tool, in order to get portable archives?
This is a superuser question, BUT...
ZIP uses a default codepage of IBM437. There is the possibility to use UTF-8, but not all zip tools and libraries support that. Some zip tools will do arbitrary code pages, even though the zip spec allows only IBM437 or UTF-8. I think WinRar is one such tool.
DotNetZip does encoding. It will do UTF-8 or an arbitrary code page. if you're writing an app, there is a .NET library. If you are running from a script, there are command line tools. Either way, DotNetZip requires .NET. You will need Mono to run it on Linux.
example for the command line:
zipit.exe Olivier.zip -cp 860 test-éàïù.txt
(to use the 860 codepage) I'm not sure that Windows Explorer correctly handles zipfiles with alternate encoding for the filenames within the zips.
See How to zip specified folders with Command Line for more info on that zipit.exe tool.
Create a ZIP file using specified code page:
7z a -mcp=<code_page> -tzip <archive_name> <file_names>...
Extract files from a ZIP file using specified code page:
7z x -mcp=<code_page> <archive_name>
I know that 7zip creates Zip V1.0 archives, not 2.0.
I couldn't work out how to use 7zip to create a zip v1.0 archive.
You can create version 1 ZIP archives using Info-Zip’s zip 1.1, which is still available (download from the FTP http://infozip.sourceforge.net/Zip.html#Downloads). You’ll need to build it from source (make sysv on a Linux system); then you’ll be able to use the newly-built zip to create old-format archives:
]# ./zip filename.zip file1 file2 file3
]# file filename.zip
]# filename.zip: Zip archive data, at least v1.0 to extract

Resources