axmolengine / axmol

Axmol Engine – A Multi-platform Engine for Desktop, XBOX (UWP) and Mobile games. (A fork of Cocos2d-x-4.0)
https://axmol.dev
MIT License
923 stars 205 forks source link

Windows wrong copy .dll paths after build #1238

Closed iAndyHD3 closed 1 year ago

iAndyHD3 commented 1 year ago

Following the windows guide to link axmol dynamically, after building axmol tries to copy the dlls to the .exe output folder however the paths are wrong

  Syncing resources for OpenGD ...
  Syncing to C:/Users/user/Desktop/projects/axmol/OpenGD/build/bin/OpenGD/RelWithDebInfo/Content
  OpenGD.vcxproj -> C:\Users\user\Desktop\projects\axmol\OpenGD\build\bin\OpenGD\RelWithDebInfo\OpenGD.exe

  Error copying file (if different) from "C:/Users/user/Desktop/projects/axmol/axmol/thirdparty/openssl/prebuilt/window
  s/x64/libcrypto-3-x64.dll" to "C:/Users/user/Desktop/projects/axmol/OpenGD/build/bin/OpenGD/RelWithDebInfo".
  Error copying file (if different) from "C:/Users/user/Desktop/projects/axmol/axmol/thirdparty/openssl/prebuilt/window
  s/x64/libssl-3-x64.dll" to "C:/Users/user/Desktop/projects/axmol/OpenGD/build/bin/OpenGD/RelWithDebInfo".
  Error copying file (if different) from "C:/Users/user/Desktop/projects/axmol/axmol/thirdparty/curl/prebuilt/windows/x
  64/libcurl.dll" to "C:/Users/user/Desktop/projects/axmol/OpenGD/build/bin/OpenGD/RelWithDebInfo".
  Error copying file (if different) from "C:/Users/user/Desktop/projects/axmol/axmol/thirdparty/zlib/prebuilt/windows/x
  64/zlib1.dll" to "C:/Users/user/Desktop/projects/axmol/OpenGD/build/bin/OpenGD/RelWithDebInfo".

The issue specifically is the prebuilt binaries are in the win folder and not in the windows folder. I have looked through the cmake code and it seems to be set correctly in AXPlatform.cmake so im not really sure what is making the path wrong

halx99 commented 1 year ago

Delete CMakeCache.txt from your build dir then try re-generate project again.

iAndyHD3 commented 1 year ago

doesn't work sadly

i added a few some additional cmake deubg messages, but here is the entire log

C:\Users\user\Desktop\projects\axmol\OpenGD>cmake -B build "-DAX_PREBUILT_DIR=build_x64"
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.35.32217.1
-- The CXX compiler identification is MSVC 19.35.32217.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using system env var _AX_ROOT=C:\Users\user\Desktop\projects\axmol\axmol
CMake Warning (dev) at C:/Users/user/Desktop/projects/axmol/axmol/cmake/Modules/AXBuildSet.cmake:22 (option):
  Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
  --help-policy CMP0077" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  For compatibility with older versions of CMake, option is clearing the
  normal variable 'AX_ENABLE_EXT_LUA'.
Call Stack (most recent call first):
  CMakeLists.txt:70 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- settingplatformwin
-- platofrmspecpathC:/Users/user/Desktop/projects/axmol/OpenGD/prebuilt/win/x64
-- CMAKE_HOST_SYSTEM_VERSION: 10.0.19045
-- CMAKE_SYSTEM_VERSION: 10.0.19045
-- CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION: 10.0.22621.0
-- CMAKE_C_STANDARD=99
-- CMAKE_CXX_STANDARD=20
-- using Windows MSVC generate axmol project, MSVC_VERSION:1935
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe
-- The ASM_NASM compiler identification is unknown
-- Didn't find assembler
-- The nasm compiler speed up libraries: jpeg(libjpeg-turbo)
CMake Warning at C:/Users/user/Desktop/projects/axmol/axmol/cmake/Modules/AXConfigDefine.cmake:184 (message):
  The nasm compiler doesn't present on your system PATH, please download
  from: https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/
Call Stack (most recent call first):
  C:/Users/user/Desktop/projects/axmol/axmol/cmake/Modules/AXBuildSet.cmake:33 (include)
  CMakeLists.txt:70 (include)

-- PROJECT_NAME:OpenGD
-- PROJECT_SOURCE_DIR:C:/Users/user/Desktop/projects/axmol/OpenGD
-- _AX_ROOT_PATH:C:/Users/user/Desktop/projects/axmol/axmol
-- CMAKE_MODULE_PATH:C:/Users/user/Desktop/projects/axmol/axmol/cmake/Modules/
-- PROJECT_BINARY_DIR:C:/Users/user/Desktop/projects/axmol/OpenGD/build
-- ENGINE_BINARY_PATH:C:/Users/user/Desktop/projects/axmol/OpenGD/build/engine
-- PYTHON_PATH:C:/Users/user/AppData/Local/Programs/Python/Python311/python.exe
-- _AX_COMMAND_PATH:C:/Users/user/Desktop/projects/axmol/axmol/tools/console/bin/axmol
-- HOST_SYSTEM:Windows
-- CMAKE_SYSTEM_NAME:Windows
-- CMAKE_GENERATOR_PLATFORM:
-- CMAKE_SYSTEM_PROCESSOR:AMD64
-- ARCH_ALIAS:x64
-- CMAKE_CXX_COMPILER_ID:MSVC
-- _AX_LUAJIT_ROOT:C:/Users/user/Desktop/projects/axmol/axmol/tools/console/bin/../plugins/plugin_luacompile/bin
-- LUAJIT32_COMMAND:LUAJIT32_COMMAND-NOTFOUND
-- LUAJIT64_COMMAND:LUAJIT64_COMMAND-NOTFOUND
-- settingplatformwin
-- platofrmspecpathC:/Users/user/Desktop/projects/axmol/OpenGD/prebuilt/win/x64
-- AX_USE_COMPAT_GL=OFF
-- AX_ENABLE_MSEDGE_WEBVIEW2=OFF
-- AX_ENABLE_MFMEDIA=ON
-- AX_ENABLE_EXT_IMGUI=ON
-- AX_ENABLE_EXT_FAIRYGUI=OFF
-- AX_ENABLE_EXT_LIVE2D=OFF
-- AX_ENABLE_EXT_GUI=ON
-- AX_ENABLE_EXT_ASSETMANAGER=OFF
-- AX_ENABLE_EXT_PARTICLE3D=OFF
-- AX_ENABLE_EXT_PHYSICS_NODE=OFF
-- AX_ENABLE_EXT_SPINE=OFF
-- AX_ENABLE_EXT_EFFEKSEER=OFF
-- AX_ENABLE_EXT_LUA=ON
-- Configuring done (41.6s)
-- Generating done (0.4s)
-- Build files have been written to: C:/Users/user/Desktop/projects/axmol/OpenGD/build

C:\Users\user\Desktop\projects\axmol\OpenGD>cmake --build build --config Release
MSBuild version 17.5.1+f6fdcf537 for .NET Framework

  Checking Build System
  Syncing resources for OpenGD ...
  Building Custom Rule C:/Users/user/Desktop/projects/axmol/OpenGD/CMakeLists.txt
      Syncing to C:/Users/user/Desktop/projects/axmol/OpenGD/build/bin/OpenGD/Release/Content
  Building Custom Rule C:/Users/user/Desktop/projects/axmol/OpenGD/CMakeLists.txt
  OpenGD.vcxproj -> C:\Users\user\Desktop\projects\axmol\OpenGD\build\bin\OpenGD\Release\OpenGD.exe
  Error copying file (if different) from "C:/Users/user/Desktop/projects/axmol/axmol/thirdparty/openssl/prebuilt/window
  s/x64/libcrypto-3-x64.dll" to "C:/Users/user/Desktop/projects/axmol/OpenGD/build/bin/OpenGD/Release".
  Error copying file (if different) from "C:/Users/user/Desktop/projects/axmol/axmol/thirdparty/openssl/prebuilt/window
  s/x64/libssl-3-x64.dll" to "C:/Users/user/Desktop/projects/axmol/OpenGD/build/bin/OpenGD/Release".
  Error copying file (if different) from "C:/Users/user/Desktop/projects/axmol/axmol/thirdparty/curl/prebuilt/windows/x
  64/libcurl.dll" to "C:/Users/user/Desktop/projects/axmol/OpenGD/build/bin/OpenGD/Release".
  Error copying file (if different) from "C:/Users/user/Desktop/projects/axmol/axmol/thirdparty/zlib/prebuilt/windows/x
  64/zlib1.dll" to "C:/Users/user/Desktop/projects/axmol/OpenGD/build/bin/OpenGD/Release".
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): e
rror MSB3073: The command "setlocal [C:\Users\user\Desktop\projects\axmol\OpenGD\build\OpenGD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): e
rror MSB3073: "C:\Program Files\CMake\bin\cmake.exe" -E copy_if_different C:/Users/user/Desktop/projects/axmol/axmol/th
irdparty/openssl/prebuilt/windows/x64/libcrypto-3-x64.dll C:/Users/user/Desktop/projects/axmol/axmol/thirdparty/openssl
/prebuilt/windows/x64/libssl-3-x64.dll C:/Users/user/Desktop/projects/axmol/axmol/thirdparty/curl/prebuilt/windows/x64/
libcurl.dll C:/Users/user/Desktop/projects/axmol/axmol/thirdparty/zlib/prebuilt/windows/x64/zlib1.dll C:/Users/user/Des
ktop/projects/axmol/axmol/build_x64/bin/Release/OpenAL32.dll C:/Users/user/Desktop/projects/axmol/OpenGD/build/bin/Open
GD/Release [C:\Users\user\Desktop\projects\axmol\OpenGD\build\OpenGD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): e
rror MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\user\Desktop\projects\axmol\OpenGD\build\OpenGD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): e
rror MSB3073: :cmEnd [C:\Users\user\Desktop\projects\axmol\OpenGD\build\OpenGD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): e
rror MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [C:\Users\user\Desktop\projects\axmol\OpenGD\bu
ild\OpenGD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): e
rror MSB3073: :cmErrorLevel [C:\Users\user\Desktop\projects\axmol\OpenGD\build\OpenGD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): e
rror MSB3073: exit /b %1 [C:\Users\user\Desktop\projects\axmol\OpenGD\build\OpenGD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): e
rror MSB3073: :cmDone [C:\Users\user\Desktop\projects\axmol\OpenGD\build\OpenGD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): e
rror MSB3073: if %errorlevel% neq 0 goto :VCEnd [C:\Users\user\Desktop\projects\axmol\OpenGD\build\OpenGD.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): e
rror MSB3073: :VCEnd" exited with code 1. [C:\Users\user\Desktop\projects\axmol\OpenGD\build\OpenGD.vcxproj]