mgieseki / dvisvgm

A fast DVI, EPS, and PDF to SVG converter
https://dvisvgm.de
GNU General Public License v3.0
294 stars 28 forks source link

Question: compile package #221

Closed povpie closed 1 year ago

povpie commented 1 year ago

What am I doing wrong? To compile the package on windows 10 I'm doing the following:

Download zip code from git and extract Open CMD and usecd C/filepath/src (I also tried with cd/filepath/dvisvgm-master) When I try to run ./configure I get the error: '.' is not recognized as an internal or external command, operable program or batch file.

mgieseki commented 1 year ago

The easiest way to build dvisvgm on Windows is to use MS Visual Studio 2022 (the free community edition is sufficient). File README in the vc folder contains some information about what to do. There's no need to build the single libraries separately and you don't need the autotools scripts, like configure.

povpie commented 1 year ago

Thanks Martin. What should I do with the files that I downloaded from https://github.com/mgieseki/ttfautohint-dll?

mgieseki commented 1 year ago

Hi Daniel, If you downloaded the zip file from the release section, you just need to extract its contents to directory vc\ttfautohint. You should also put ttfautohint.dll in a directory covered by the search path, e.g. the same directory where dvisvgm.exe or mutool.exe is located so that dvisvgm can find it later on.

povpie commented 1 year ago

Hi martin, I think I did all the steps but still got these errors:

Build started... 1>------ Build started: Project: freetype, Configuration: Debug x64 ------ 1>autofit.c 1>ftcid.c 1>bdf.c 1>cff.c 1>ftbase.c 1>ftbitmap.c 1>ftcache.c 1>ftdebug.c 1>ftfstype.c 1>ftgasp.c 1>ftglyph.c 1>ftgzip.c 1>ftinit.c 1>ftlzw.c 1>ftstroke.c 1>ftsystem.c 1>ftsdfcommon.c 1>c1 : fatal error C1083: Cannot open source file: 'src\sdf\ftsdfcommon.c': No such file or directory 1>sdf.c 1>c1 : fatal error C1083: Cannot open source file: 'src\sdf\sdf.c': No such file or directory 1>smooth.c 1>ftbbox.c 1>ftmm.c 1>ftpfr.c 1>ftsynth.c 1>fttype1.c 1>ftwinfnt.c 1>ftgxval.c 1>ftotval.c 1>ftpatent.c 1>pcf.c 1>pfr.c 1>psaux.c 1>pshinter.c 1>psmodule.c 1>raster.c 1>sfnt.c 1>ftsvg.c 1>c1 : fatal error C1083: Cannot open source file: 'src\svg\ftsvg.c': No such file or directory 1>svg.c 1>c1 : fatal error C1083: Cannot open source file: 'src\svg\svg.c': No such file or directory 1>truetype.c 1>type1.c 1>type1cid.c 1>type42.c 1>C:\Users\danie\Documents\dvisvgm-master\dvisvgm-master\vc\freetype\src\truetype\ttgload.c(1817,42): warning C4312: 'type cast': conversion from 'unsigned long' to 'void ' of greater size (compiling source file src\truetype\truetype.c) 1>winfnt.c 1>Done building project "freetype.vcxproj" -- FAILED. 2>------ Build started: Project: dvisvgm, Configuration: Debug x64 ------ 2>cl : command line warning D9035: option 'Gm' has been deprecated and will be removed in a future release 2>cl : command line warning D9030: '/Gm' is incompatible with multiprocessing; ignoring /MP switch 2>TTFAutohint.cpp 2>C:\Users\danie\Documents\dvisvgm-master\dvisvgm-master\src\ttf\TTFAutohint.cpp(51,10): fatal error C1083: Cannot open include file: 'ttfautohint.h': No such file or directory 2>FontEngine.cpp 2>C:\Users\danie\Documents\dvisvgm-master\dvisvgm-master\src\FontEngine.cpp(309,28): error C2664: 'FT_UInt FT_Get_Name_Index(FT_Face,FT_String )': cannot convert argument 2 from 'const char ' to 'FT_String ' 2>C:\Users\danie\Documents\dvisvgm-master\dvisvgm-master\src\FontEngine.cpp(309,60): message : Conversion loses qualifiers 2>C:\Users\danie\Documents\dvisvgm-master\dvisvgm-master\vc\freetype\include\freetype\freetype.h(3935,3): message : see declaration of 'FT_Get_Name_Index' 2>C:\Users\danie\Documents\dvisvgm-master\dvisvgm-master\src\FontEngine.cpp(309,28): message : while trying to match the argument list '(const FT_Face, const char *)' 2>Generating Code... 2>Done building project "dvisvgm.vcxproj" -- FAILED. ========== Build: 0 succeeded, 2 failed, 8 up-to-date, 0 skipped ========== ========== Elapsed 00:07,070 ==========

If I try with the option "build dvgsvgm ctrl B" I get the following:

Build started... 1>------ Build started: Project: freetype, Configuration: Debug x64 ------ 1>ftsdfcommon.c 1>sdf.c 1>c1 : fatal error C1083: Cannot open source file: 'src\sdf\ftsdfcommon.c': No such file or directory 1>ftsvg.c 1>c1 : fatal error C1083: Cannot open source file: 'src\sdf\sdf.c': No such file or directory 1>c1 : fatal error C1083: Cannot open source file: 'src\svg\ftsvg.c': No such file or directory 1>svg.c 1>c1 : fatal error C1083: Cannot open source file: 'src\svg\svg.c': No such file or directory 1>Done building project "freetype.vcxproj" -- FAILED. 2>------ Build started: Project: dvisvgm, Configuration: Debug x64 ------ 2>cl : command line warning D9035: option 'Gm' has been deprecated and will be removed in a future release 2>cl : command line warning D9030: '/Gm' is incompatible with multiprocessing; ignoring /MP switch 2>TTFAutohint.cpp 2>C:\Users\danie\Documents\dvisvgm-master\dvisvgm-master\src\ttf\TTFAutohint.cpp(51,10): fatal error C1083: Cannot open include file: 'ttfautohint.h': No such file or directory 2>FontEngine.cpp 2>C:\Users\danie\Documents\dvisvgm-master\dvisvgm-master\src\FontEngine.cpp(309,28): error C2664: 'FT_UInt FT_Get_Name_Index(FT_Face,FT_String )': cannot convert argument 2 from 'const char ' to 'FT_String ' 2>C:\Users\danie\Documents\dvisvgm-master\dvisvgm-master\src\FontEngine.cpp(309,60): message : Conversion loses qualifiers 2>C:\Users\danie\Documents\dvisvgm-master\dvisvgm-master\vc\freetype\include\freetype\freetype.h(3935,3): message : see declaration of 'FT_Get_Name_Index' 2>C:\Users\danie\Documents\dvisvgm-master\dvisvgm-master\src\FontEngine.cpp(309,28): message : while trying to match the argument list '(const FT_Face, const char )' 2>Generating Code... 2>Done building project "dvisvgm.vcxproj" -- FAILED. ========== Build: 0 succeeded, 2 failed, 8 up-to-date, 0 skipped ========== ========== Elapsed 00:03,220 ==========

mgieseki commented 1 year ago

Did you copy the sources of the latest FreeType version (2.12.1) to vc\freetype? It seems there are some files missing, maybe because of an older release.

You also need to copy the contents of ttfautohint-1.8.4-dll64.zip to vc\ttfautohint. According to the compiler messages, theses files are missing too.

I recommend to build the release version instead of the debug one. Just selcte "Release" from the drop down list in the toolbar of Visual Studio.

povpie commented 1 year ago

Ok, finally. I had downloaded the wrong files or wrong versions. Now it was built in one go without problems. Thank you so much @mgieseki

Best.