preshing / cairo-windows Goto Github PK
View Code? Open in Web Editor NEWStandalone Cairo DLLs for Windows
License: The Unlicense
Standalone Cairo DLLs for Windows
License: The Unlicense
I had a look into some github bots that can update dependencies to see if they can help here.
In the end dependencies.io looked like the best, as they can update system dependencies, not just python or ruby libraries.es.
There are two parts, a CLI tool, which doesn't require an API key, and a github workflow, which does.
These both read a yaml file that describes dependencies.
Getting an API key needs a license, which can be purchased, + there is a form which open source projects can apply for a free license from, I filled this in and @davegaeddert was super helpful.
Thanks so much for sharing this with the community ❤️
I am trying to follow the steps you laid out here and I also referenced the cairo end-to-end build win32 instructions. I installed Visual Studio Build Tools 2017, and then after that tried to install Visual Studio Community 2017 as well. I am getting the following error:
build-cairo-windows.sh: line 69: devenv.com: command not found
FAILED COMMAND: devenv.com "projects\vstudio\vstudio.sln" -upgrade
Is there something different I need to install to get devenv.com? Do I need to get an older version of Microsoft Visual C++ Studio Express? I tried looking it up, but I had a hard time finding good information. Thanks!
Hello! I've been attempting to build this for the past day, but ended up on a strange linking error that I couldn't overcome. The script finishes all the way past the cairo code files, but generates errors from "zlib/deflate.c" once it tries to make the final lib for cairo. Here's a screenshot of the x86 Command Prompt.
Thanks for your project that works fine, except for pdf. I tried with success png and svg backends (from Zetcode cairo graphics tutorial), but didn't manage to make pdf backend work, it only creates a blank file that has 0 pages. Is there something that need to be added to have pdf support ?
Hi @preshing
Any chance of doing a release with the current version of Cairo?
Is it worth seeing up some kind of a bot to alert when a new version of Cairo is out?
I tried building locally, but it seems to get stuck trying to load the solution from the projects
folder.
Am I missing a step ?
./build-cairo-windows.sh
File ‘cairo-1.17.2.tar.xz’ already there; not retrieving.
File ‘pixman-0.40.0.tar.gz’ already there; not retrieving.
File ‘libpng-1.6.37.tar.gz’ already there; not retrieving.
File ‘zlib-1.2.11.tar.gz’ already there; not retrieving.
File ‘freetype-2.10.2.tar.gz’ already there; not retrieving.
Microsoft Visual Studio 2019 Version 16.7.2.
Copyright (C) Microsoft Corp. All rights reserved.
The license for Visual Studio expires in 30 days.
Invalid project
Use:
devenv [solutionfile | projectfile | folder | anyfile.ext] [switches]
The first argument for devenv is usually a solution file, project file or a folder.
You can also use any other file as the first argument if you want to have the
file open automatically in an editor. When you enter a project file, the IDE
looks for an .sln file with the same base name as the project file in the
parent directory for the project file. If no such .sln file exists, then the
IDE looks for a single .sln file that references the project. If no such single
.sln file exists, then the IDE creates an unsaved solution with a default .sln
file name that has the same base name as the project file.
Command line builds:
devenv solutionfile.sln /build [ solutionconfig ] [ /project projectnameorfile [ /projectconfig name ] ]
Available command line switches:
/Build Builds the solution or project with the specified solution
configuration. For example "Debug". If multiple platforms
are possible, the configuration name must be enclosed in quotes
and contain platform name. For example: "Debug|Win32".
/Clean Deletes build outputs.
/Command Starts the IDE and executes the command.
/Deploy Builds and then deploys the specified build configuration.
/DoNotLoadProjects Opens the specified solution without loading any projects.
/Edit Opens the specified files in a running instance of this
application. If there are no running instances, it will
start a new instance with a simplified window layout.
/LCID Sets the default language in the IDE for the UI.
/Log Logs IDE activity to the specified file for troubleshooting.
/NoVSIP Disables the VSIP developer's license key for VSIP testing.
/Out Appends the build log to a specified file.
/Project Specifies the project to build, clean, or deploy.
Must be used with /Build, /Rebuild, /Clean, or /Deploy.
/ProjectConfig Overrides the project configuration specified in the solution
configuration. For example "Debug". If multiple platforms are
possible, the configuration name must be enclosed in quotes
and contain platform name. For example: "Debug|Win32".
Must be used with /Project.
/Rebuild Cleans and then builds the solution or project with the
specified configuration.
/ResetSettings Restores the IDE's default settings, optionally resets to
the specified VSSettings file.
/ResetSkipPkgs Clears all SkipLoading tags added to VSPackages.
/Run Compiles and runs the specified solution.
/RunExit Compiles and runs the specified solution then closes the IDE.
/SafeMode Launches the IDE in safe mode loading minimal windows.
/Upgrade Upgrades the project or the solution and all projects in it.
A backup of these files will be created as appropriate. Please
see Help on 'Visual Studio Conversion Wizard' for more
information on the backup process.
Product-specific switches:
/debugexe Open the specified executable to be debugged. The remainder of
the command line is passed to this executable as its arguments.
/diff Compares two files. Takes four parameters:
SourceFile, TargetFile, SourceDisplayName(optional),
TargetDisplayName(optional)
Join collaboration session
/TfsLink Opens Team Explorer and launches a viewer for the
provided artifact URI if one is registered.
/useenv Use PATH, INCLUDE, LIBPATH, and LIB environment variables
instead of IDE paths for VC++ builds.
To attach the debugger from the command line, use:
VsJITDebugger.exe -p <pid>
FAILED COMMAND: devenv.com "projects\vstudio\vstudio.sln" -build "Release Library|$MSVC_PLATFORM_NAME" -project libpng
Hello,
First of all thanks so much for this. I've followed the instructions and built the DLLs without any problems at all, used it in my app and it's really improved the graphics performance (it's a wxWidgets based application). Rendering on Windows was slow, now it's much faster.
wxWidgets is hard coded to try and load "libcairo-2.dll". I can change that easily with a patch on my build system. It seems though that the pre-built binaries mentioned on the cairo download page is named "libcairo-2.dll".
So would it be best to also output libcairo-2.dll from this script as well?
I'm only asking as I need to either modify wxWidgets to use cairo.dll and link with cairo.lib, or change your script to output libcairo-2.dll and libcairo-2.lib (I cannot just rename the lib as it will still expect to find cairo.dll).
Thanks again,
Tony.
Is there an easy way to see which features cairo-windows had enabled when Cairo was built?
Hello all,
First, thanks for this. I'm using it as a renderer in a wxWidgets application, it's much faster than the default, 2D and GDI+ renderers.
One of our users has reported a problem. They use Chinese characters 易感者, which just display as three square boxes when using Cairo. I've searched the web, and found an old post saying they had trouble with Chinese characters. But found another post saying Chinese characters were fine. Japanese characters also display as square boxes, so I'm guessing it's a unicode problem. They all display fine using the other renderers provided in wxWidgets.
Could this be an issue with Cairo or maybe the way it's built?
Thanks in advance,
Tony.
I see @stuaxo setting up a script to update dependencies. Also, I prefer setting up a CI(May be Github Actions) to build and release when anything is updated. This would help us maintain the version of Cairo to latest and can be automated.
I tried https://github.com/naveen521kk/cairo-windows/runs/1037141588. Maybe if @preshing help me we can complete this easily.
cairo upstream recently got support for the meson build system which also supports Windows builds with MSVC.
Since this project seems to be one of the last users of the make based win32 build system, porting would allow upstream cairo to drop this old build system code.
I tried to compile for x86 but zlib failed.
error C2220: the following warning is treated as an error
1>C:\msys64\home\wasd\zlib\infback.c(622,9): warning C4061: enumerator 'HEAD' in switch of enum 'inflate_mode' is not explicitly handled by a case label
1>C:\msys64\home\wasd\zlib\inflate.h(20): message : see declaration of 'inflate_mode'
1>C:\msys64\home\wasd\zlib\infback.c(622,9): warning C4061: enumerator 'FLAGS' in switch of enum 'inflate_mode' is not explicitly handled by a case label
1>C:\msys64\home\wasd\zlib\inflate.h(20): message : see declaration of 'inflate_mode'
1>C:\msys64\home\wasd\zlib\infback.c(622,9): warning C4061: enumerator 'TIME' in switch of enum 'inflate_mode' is not explicitly handled by a case label
Here are part of the error codes, please help. Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.