如何构建aseprite可执行文件

时间:2016-01-14 18:24:16

标签: cmake visual-studio-2015 nmake

我正在尝试使用本教程https://github.com/aseprite/aseprite/blob/master/INSTALL.md

编译aseprite

我已经安装了Windows 10 SDK和Visual Studio 2015

我正在使用CMake GUI,因为我不熟悉所有

使用命令行

这是CMake日志

The C compiler identification is MSVC 19.0.23506.0
The CXX compiler identification is MSVC 19.0.23506.0
Check for working C compiler using: Visual Studio 14 2015
Check for working C compiler using: Visual Studio 14 2015 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler using: Visual Studio 14 2015
Check for working CXX compiler using: Visual Studio 14 2015 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
Looking for include file stdint.h
Looking for include file stdint.h - found
Performing Test HAVE_STDINT_H
Performing Test HAVE_STDINT_H - Success
Performing Test HAVE_SCHED_YIELD
Performing Test HAVE_SCHED_YIELD - Failed
Performing Test ASEPRITE_LITTLE_ENDIAN
Performing Test ASEPRITE_LITTLE_ENDIAN - Success
Found DXGUID: C:/Program Files (x86)/Windows Kits/10/Lib/10.0.10586.0/um/x64/dxguid.lib  
Looking for sys/types.h
Looking for sys/types.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of off64_t
Check size of off64_t - failed
Looking for fseeko
Looking for fseeko - not found
Looking for unistd.h
Looking for unistd.h - not found
Looking for include file dlfcn.h
Looking for include file dlfcn.h - not found
Looking for include file fcntl.h
Looking for include file fcntl.h - found
Looking for include file gl/gl.h
Looking for include file gl/gl.h - not found
Looking for include file inttypes.h
Looking for include file inttypes.h - found
Looking for include file memory.h
Looking for include file memory.h - found
Looking for include file rle.h
Looking for include file rle.h - not found
Looking for include file stdarg.h
Looking for include file stdarg.h - found
Looking for include file stdlib.h
Looking for include file stdlib.h - found
Looking for include file strings.h
Looking for include file strings.h - not found
Looking for include file string.h
Looking for include file string.h - found
Looking for include file sys/stat.h
Looking for include file sys/stat.h - found
Looking for include file unistd.h
Looking for include file unistd.h - not found
Looking for include file varargs.h
Looking for include file varargs.h - found
Looking for include file X11/Xlib.h
Looking for include file X11/Xlib.h - not found
Looking for include file X11/Xutil.h
Looking for include file X11/Xutil.h - not found
Looking for vprintf
Looking for vprintf - not found
Looking for _doprnt
Looking for _doprnt - not found
Looking for strdup
Looking for strdup - found
curl version=[7.21.6]
wldap32 not found CURL_DISABLE_LDAP set ON
Looking for getch in ws2_32;
Looking for getch in ws2_32; - found
Looking for getch in winmm;ws2_32
Looking for getch in winmm;ws2_32 - found
Looking for cldap_open in wldap32
Looking for cldap_open in wldap32 - found
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing:  OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR) 
OpenSSL NOT Found, disabling CMAKE_USE_OPENSSL
Looking for idna_to_ascii_lz in idn;ws2_32;winmm
Looking for idna_to_ascii_lz in idn;ws2_32;winmm - not found
Looking for ldap_init in ldap;ws2_32;winmm
Looking for ldap_init in ldap;ws2_32;winmm - not found
Looking for include file ws2tcpip.h
Looking for include file ws2tcpip.h - found
Looking for include files ws2tcpip.h, winsock2.h
Looking for include files ws2tcpip.h, winsock2.h - found
Looking for 3 include files ws2tcpip.h, ..., stdio.h
Looking for 3 include files ws2tcpip.h, ..., stdio.h - found
Looking for 4 include files ws2tcpip.h, ..., windows.h
Looking for 4 include files ws2tcpip.h, ..., windows.h - found
Looking for 5 include files ws2tcpip.h, ..., winsock.h
Looking for 5 include files ws2tcpip.h, ..., winsock.h - found
Looking for 6 include files ws2tcpip.h, ..., sys/filio.h
Looking for 6 include files ws2tcpip.h, ..., sys/filio.h - not found
Looking for 6 include files ws2tcpip.h, ..., sys/ioctl.h
Looking for 6 include files ws2tcpip.h, ..., sys/ioctl.h - not found
Looking for 6 include files ws2tcpip.h, ..., sys/resource.h
Looking for 6 include files ws2tcpip.h, ..., sys/resource.h - not found
Looking for 8 include files ws2tcpip.h, ..., sys/uio.h
Looking for 8 include files ws2tcpip.h, ..., sys/uio.h - not found
Looking for 8 include files ws2tcpip.h, ..., sys/un.h
Looking for 8 include files ws2tcpip.h, ..., sys/un.h - not found
Looking for 9 include files ws2tcpip.h, ..., arpa/tftp.h
Looking for 9 include files ws2tcpip.h, ..., arpa/tftp.h - not found
Looking for 9 include files ws2tcpip.h, ..., assert.h
Looking for 9 include files ws2tcpip.h, ..., assert.h - found
Looking for 10 include files ws2tcpip.h, ..., crypto.h
Looking for 10 include files ws2tcpip.h, ..., crypto.h - not found
Looking for 10 include files ws2tcpip.h, ..., des.h
Looking for 10 include files ws2tcpip.h, ..., des.h - not found
Looking for 10 include files ws2tcpip.h, ..., err.h
Looking for 10 include files ws2tcpip.h, ..., err.h - not found
Looking for 10 include files ws2tcpip.h, ..., errno.h
Looking for 10 include files ws2tcpip.h, ..., errno.h - found
Looking for 12 include files ws2tcpip.h, ..., gssapi/gssapi.h
Looking for 12 include files ws2tcpip.h, ..., gssapi/gssapi.h - not found
Looking for 12 include files ws2tcpip.h, ..., gssapi/gssapi_generic.h
Looking for 12 include files ws2tcpip.h, ..., gssapi/gssapi_generic.h - not found
Looking for 12 include files ws2tcpip.h, ..., gssapi/gssapi_krb5.h
Looking for 12 include files ws2tcpip.h, ..., gssapi/gssapi_krb5.h - not found
Looking for 12 include files ws2tcpip.h, ..., idn-free.h
Looking for 12 include files ws2tcpip.h, ..., idn-free.h - not found
Looking for 12 include files ws2tcpip.h, ..., ifaddrs.h
Looking for 12 include files ws2tcpip.h, ..., ifaddrs.h - not found
Looking for 13 include files ws2tcpip.h, ..., krb.h
Looking for 13 include files ws2tcpip.h, ..., krb.h - not found
Looking for 13 include files ws2tcpip.h, ..., libgen.h
Looking for 13 include files ws2tcpip.h, ..., libgen.h - not found
Looking for 13 include files ws2tcpip.h, ..., libssh2.h
Looking for 13 include files ws2tcpip.h, ..., libssh2.h - not found
Looking for 13 include files ws2tcpip.h, ..., limits.h
Looking for 13 include files ws2tcpip.h, ..., limits.h - found
Looking for 14 include files ws2tcpip.h, ..., locale.h
Looking for 14 include files ws2tcpip.h, ..., locale.h - found
Looking for 15 include files ws2tcpip.h, ..., netinet/tcp.h
Looking for 15 include files ws2tcpip.h, ..., netinet/tcp.h - not found
Looking for 15 include files ws2tcpip.h, ..., openssl/crypto.h
Looking for 15 include files ws2tcpip.h, ..., openssl/crypto.h - not found
Looking for 15 include files ws2tcpip.h, ..., openssl/engine.h
Looking for 15 include files ws2tcpip.h, ..., openssl/engine.h - not found
Looking for 15 include files ws2tcpip.h, ..., openssl/err.h
Looking for 15 include files ws2tcpip.h, ..., openssl/err.h - not found
Looking for 15 include files ws2tcpip.h, ..., openssl/pem.h
Looking for 15 include files ws2tcpip.h, ..., openssl/pem.h - not found
Looking for 15 include files ws2tcpip.h, ..., openssl/pkcs12.h
Looking for 15 include files ws2tcpip.h, ..., openssl/pkcs12.h - not found
Looking for 15 include files ws2tcpip.h, ..., openssl/rsa.h
Looking for 15 include files ws2tcpip.h, ..., openssl/rsa.h - not found
Looking for 15 include files ws2tcpip.h, ..., openssl/ssl.h
Looking for 15 include files ws2tcpip.h, ..., openssl/ssl.h - not found
Looking for 15 include files ws2tcpip.h, ..., openssl/x509.h
Looking for 15 include files ws2tcpip.h, ..., openssl/x509.h - not found
Looking for 15 include files ws2tcpip.h, ..., pem.h
Looking for 15 include files ws2tcpip.h, ..., pem.h - not found
Looking for 15 include files ws2tcpip.h, ..., poll.h
Looking for 15 include files ws2tcpip.h, ..., poll.h - not found
Looking for 15 include files ws2tcpip.h, ..., rsa.h
Looking for 15 include files ws2tcpip.h, ..., rsa.h - not found
Looking for 17 include files ws2tcpip.h, ..., ssl.h
Looking for 17 include files ws2tcpip.h, ..., ssl.h - not found
Looking for 17 include files ws2tcpip.h, ..., stdbool.h
Looking for 17 include files ws2tcpip.h, ..., stdbool.h - found
Looking for 21 include files ws2tcpip.h, ..., stropts.h
Looking for 21 include files ws2tcpip.h, ..., stropts.h - not found
Looking for 22 include files ws2tcpip.h, ..., tld.h
Looking for 22 include files ws2tcpip.h, ..., tld.h - not found
Looking for 26 include files ws2tcpip.h, ..., ldap.h
Looking for 26 include files ws2tcpip.h, ..., ldap.h - not found
Looking for 26 include files ws2tcpip.h, ..., sys/utsname.h
Looking for 26 include files ws2tcpip.h, ..., sys/utsname.h - not found
Looking for 26 include files ws2tcpip.h, ..., idna.h
Looking for 26 include files ws2tcpip.h, ..., idna.h - not found
LDAP_H not found CURL_DISABLE_LDAP set ON
Check size of size_t
Check size of size_t - done
Check size of ssize_t
Check size of ssize_t - failed
Check size of long long
Check size of long long - done
Check size of long
Check size of long - done
Check size of short
Check size of short - done
Check size of int
Check size of int - done
Check size of __int64
Check size of __int64 - done
Check size of time_t
Check size of time_t - done
Looking for basename
Looking for basename - not found
Looking for strncmpi
Looking for strncmpi - not found
Looking for alarm
Looking for alarm - not found
Looking for gethostbyname
Looking for gethostbyname - found
Looking for strtoll
Looking for strtoll - found
Looking for _strtoi64
Looking for _strtoi64 - found
Looking for strerror_r
Looking for strerror_r - not found
Looking for siginterrupt
Looking for siginterrupt - not found
Looking for fork
Looking for fork - not found
Looking for freeaddrinfo
Looking for freeaddrinfo - found
Looking for freeifaddrs
Looking for freeifaddrs - not found
Looking for pipe
Looking for pipe - not found
Looking for ftruncate
Looking for ftruncate - not found
Looking for getprotobyname
Looking for getprotobyname - found
Looking for getrlimit
Looking for getrlimit - not found
Looking for idn_free
Looking for idn_free - not found
Looking for idna_strerror
Looking for idna_strerror - not found
Looking for tld_strerror
Looking for tld_strerror - not found
Looking for setlocale
Looking for setlocale - found
Looking for setrlimit
Looking for setrlimit - not found
Looking for fcntl
Looking for fcntl - not found
Looking for ioctl
Looking for ioctl - not found
Looking for setsockopt
Looking for setsockopt - found
Looking for inet_pton
Looking for inet_pton - not found
Performing Curl Test HAVE_FCNTL_O_NONBLOCK
Performing Curl Test HAVE_FCNTL_O_NONBLOCK - Failed
Performing Curl Test HAVE_IOCTLSOCKET
Performing Curl Test HAVE_IOCTLSOCKET - Success
Performing Curl Test HAVE_IOCTLSOCKET_CAMEL
Performing Curl Test HAVE_IOCTLSOCKET_CAMEL - Failed
Performing Curl Test HAVE_IOCTLSOCKET_CAMEL_FIONBIO
Performing Curl Test HAVE_IOCTLSOCKET_CAMEL_FIONBIO - Success
Performing Curl Test HAVE_IOCTLSOCKET_FIONBIO
Performing Curl Test HAVE_IOCTLSOCKET_FIONBIO - Success
Performing Curl Test HAVE_IOCTL_FIONBIO
Performing Curl Test HAVE_IOCTL_FIONBIO - Failed
Performing Curl Test HAVE_IOCTL_SIOCGIFADDR
Performing Curl Test HAVE_IOCTL_SIOCGIFADDR - Failed
Performing Curl Test HAVE_SETSOCKOPT_SO_NONBLOCK
Performing Curl Test HAVE_SETSOCKOPT_SO_NONBLOCK - Failed
Performing Curl Test HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID
Performing Curl Test HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID - Failed
CMake Warning (dev) at third_party/curl/CMakeLists.txt:562 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "TIME_WITH_SYS_TIME" will no longer be dereferenced
  when the policy is set to NEW.  Since the policy is not set the OLD
  behavior will be used.
Call Stack (most recent call first):
  third_party/curl/CMakeLists.txt:664 (curl_internal_test)
This warning is for project developers.  Use -Wno-dev to suppress it.

Performing Curl Test HAVE_SOCKLEN_T
Performing Curl Test HAVE_SOCKLEN_T - Success
Performing Curl Test HAVE_BOOL_T
Performing Curl Test HAVE_BOOL_T - Success
Performing Curl Test HAVE_FILE_OFFSET_BITS
Performing Curl Test HAVE_FILE_OFFSET_BITS - Failed
Performing Curl Test HAVE_GLIBC_STRERROR_R
Performing Curl Test HAVE_GLIBC_STRERROR_R - Failed
Performing Curl Test HAVE_POSIX_STRERROR_R
Performing Curl Test HAVE_POSIX_STRERROR_R - Failed
Check size of curl_off_t
Check size of curl_off_t - failed
Check size of socklen_t
Check size of socklen_t - done
Performing Test curl_cv_recv
Performing Test curl_cv_recv - Success
CMake Warning (dev) at third_party/curl/CMake/CurlCheckCSourceCompiles.cmake:16 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "curl_cv_func_recv_test" will no longer be
  dereferenced when the policy is set to NEW.  Since the policy is not set
  the OLD behavior will be used.
Call Stack (most recent call first):
  third_party/curl/CMake/OtherTests.cmake:47 (curl_check_c_source_compiles)
  third_party/curl/CMakeLists.txt:792 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

Performing Test int recv(int, void *, size_t, int) (curl_cv_func_recv_test)
Performing Test int recv(int, void *, size_t, int) (curl_cv_func_recv_test) - Success
Performing Test curl_cv_send
Performing Test curl_cv_send - Success
Performing Test int send(int, const void *, size_t, int) (curl_cv_func_send_test)
Performing Test int send(int, const void *, size_t, int) (curl_cv_func_send_test) - Success
Performing Test HAVE_MSG_NOSIGNAL
Performing Test HAVE_MSG_NOSIGNAL - Failed
Performing Test HAVE_STRUCT_TIMEVAL
Performing Test HAVE_STRUCT_TIMEVAL - Success
Performing Test HAVE_POLL_FINE
Performing Test HAVE_POLL_FINE - Failed
Check size of sig_atomic_t
Check size of sig_atomic_t - done
Performing Test HAVE_SIG_ATOMIC_T_NOT_VOLATILE
Performing Test HAVE_SIG_ATOMIC_T_NOT_VOLATILE - Success
Check size of struct sockaddr_storage
Check size of struct sockaddr_storage - failed
Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
Creating directory F:/aseprite/aseprite-source/build/third_party/freetype2/include/freetype/config
Creating file F:/aseprite/aseprite-source/build/third_party/freetype2/include/freetype/config/ftconfig.h
Creating file F:/aseprite/aseprite-source/build/third_party/freetype2/include/freetype/config/ftoption.h
Performing Test WORDS_BIGENDIAN
Performing Test WORDS_BIGENDIAN - Failed
Configuring done
Generating done

These are the files CMake created

我没有可以找到可执行文件的bin文件夹

我想我只是错过了这一步,而不是做错了什么

  

执行其中一个cmake .. -G <generator>命令后,必须编译执行make,nmake,打开解决方案等的项目。

我尝试使用开发人员提示进行visual studio,但这就是我得到的

C:\WINDOWS\system32>cd F:\aseprite\aseprite-source\build

C:\WINDOWS\system32>nmake aseprite

Microsoft (R) Program Maintenance Utility Version 14.00.23506.0
Copyright (C) Microsoft Corporation.  All rights reserved.

NMAKE : fatal error U1073: don't know how to make 'aseprite'
Stop.

C:\WINDOWS\system32>nmake /f aseprite PREFIX="F:\aseprite\aseprite-source\build"

Microsoft (R) Program Maintenance Utility Version 14.00.23506.0
Copyright (C) Microsoft Corporation.  All rights reserved.

NMAKE : fatal error U1052: file 'aseprite' not found
Stop.

C:\WINDOWS\system32>nmake /f aseprite.sln PREFIX="F:\aseprite\aseprite-source\build"

Microsoft (R) Program Maintenance Utility Version 14.00.23506.0
Copyright (C) Microsoft Corporation.  All rights reserved.

NMAKE : fatal error U1052: file 'aseprite.sln' not found
Stop.

C:\WINDOWS\system32>nmake /f aseprite.sln

Microsoft (R) Program Maintenance Utility Version 14.00.23506.0
Copyright (C) Microsoft Corporation.  All rights reserved.

NMAKE : fatal error U1052: file 'aseprite.sln' not found
Stop.

C:\WINDOWS\system32>

我已经用谷歌搜索了大约3个小时,我不明白我接下来应该做什么我道歉但这是我第一次编写程序,所以我有点盲目

3 个答案:

答案 0 :(得分:2)

C:\WINDOWS\system32>cd F:\aseprite\aseprite-source\build没有效果,因为您未在F驱动器上,因为您可以在下一行提示中看到: C:\WINDOWS\system32>nmake aseprite

尝试以下顺序:

f:
cd F:\aseprite\aseprite-source\build
msbuild aseprite.sln

答案 1 :(得分:2)

CMake用于以编译器和平台无关的方式配置和生成构建系统/ IDE项目。

根据您发布的内容,当您点击Cmake-gui中的Visual Studio时,似乎您已使用Configure生成器。

这会生成项目文件,解决方案文件以及您需要在Visual Studio中打开它的所有铃声和口哨(通常只需双击.sln文件)。我没有以这种方式使用CMake,但如果我没有弄错,你可以在Visual Studio中构建项目(一切都应该设置)。

或者(命令行方式越多),就是使用不同的生成器。为此,您需要从另一个build目录开始或删除当前目录,因为在CMake初始配置运行后您无法更改生成器。
似乎NMake应该适合你(我的系统上没有它)。使用NMake Makefiles生成器在另一个目录中再次运行配置后,只需在命令窗口中导航(可能是开发人员提示也可以),然后发出命令:

nmake

这应该为您构建一个seprite,并且您会在aseprite.exe文件夹中找到bin

编辑:Mohammad's answer还有另一个问题的关键,你还没有改变驱动器,正如他所指出的那样,msbuild可用于从命令行构建Visual Studio解决方案。

答案 2 :(得分:-1)

我终于设法让它发挥作用

修复此错误

  

LINK:致命错误LNK1104:无法打开文件&#39; .. \ lib .. \ libcurl.lib&#39;

我不得不从build / lib复制并粘贴libcurl.lib库,就像它在这里所说的https://github.com/aseprite/aseprite/issues/788

之后我再次尝试构建,我收到了此错误

  

C:\ Program Files(x86)\ Windows   套件\ 10 \ Lib \ 10.0.10586.0 \ um \ x64 \ dxguid.lib:警告LNK4272:库   机器类型&#39; x64&#39;与目标机器类型冲突&#39; X86&#39;

所以我删除了构建文件夹,在CMake中更改了我的生成器&#34; Visual Studio 14 2015&#34;到#34; Visual Studio 14 2015 x64&#34;,再次生成所有内容,重复步骤1并在visual studio中最后一次重建它,最后创建了aseprite.exe文件