Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use arccon dotnet wrapper for axlstar tool used when compiling Arcane and Alien. #1792

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions axlstar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ elseif (AXLSTAR_DOTNET_RUNNER STREQUAL coreclr)
" You can download a binary version of '.Net 8' at the following address:\n"
" 'https://dotnet.microsoft.com/en-us/download´")
endif()
# La variable DOTNET_RUNNER_EXEC est utilisée pour la configuration de 'launcher.in'
set(DOTNET_RUNNER_EXEC ${DOTNET_EXEC})
set(DLL_EXE_EXTENSION .dll)
else()
message(FATAL_ERROR "Invalid value '${AXLSTAR_DOTNET_RUNNER}' for AXLSTAR_DOTNET_RUNNER. Only 'coreclr' is supported")
Expand Down Expand Up @@ -135,6 +133,16 @@ arccon_dotnet_install_publish_directory(DIRECTORY ${AXLSTAR_PUBLISH_DIR}
# Function pour configurer un script permettant de lancer une commande C#.
# Le script préfixe la commande par le lanceur utilisé
function(axlstar_configure_runner_script file_name command_name)
# Cette variable est normalement définie dans Arccon s'il est compilé
# en même temps que ce projet. Mais au cas où on utiliserait une ancienne
# version de Arccon, on la définit.
# Le wrapper est utilisé uniquement quand on compile axlstar (car il n'est
# pas installé). Pour la version installée on utilise l'exécutable 'dotnet'
# classique.
if (NOT DOTNET_EXEC_WRAPPER)
set (DOTNET_EXEC_WRAPPER "${DOTNET_EXEC}")
endif()

set(DLL_NAME Axlstar.Driver${DLL_EXE_EXTENSION})
set(COMMAND_NAME ${command_name})
set(AXLSTAR_INSTALL_BIN ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
Expand All @@ -145,9 +153,11 @@ function(axlstar_configure_runner_script file_name command_name)
set(file_name ${file_name}.bat)
endif()

set(AXLSTAR_DOTNET_EXEC "${DOTNET_EXEC_WRAPPER}")
configure_file(${LAUNCHER_NAME} ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/${file_name} @ONLY)

set(AXLSTAR_INSTALL_BIN ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR})
set(AXLSTAR_DOTNET_EXEC "${DOTNET_EXEC}")
configure_file(${LAUNCHER_NAME} ${CMAKE_BINARY_DIR}/bin_install/${file_name} @ONLY)
install(PROGRAMS ${CMAKE_BINARY_DIR}/bin_install/${file_name} DESTINATION ${CMAKE_INSTALL_BINDIR})
endfunction()
Expand Down
2 changes: 1 addition & 1 deletion axlstar/launcher.bat.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
call "@DOTNET_RUNNER_EXEC@" @DOTNET_RUNNER_ARGS@ "@AXLSTAR_INSTALL_BIN@/axlstar_dlls/@DLL_NAME@" @COMMAND_NAME@ %*
call "@AXLSTAR_DOTNET_EXEC@" @DOTNET_RUNNER_ARGS@ "@AXLSTAR_INSTALL_BIN@/axlstar_dlls/@DLL_NAME@" @COMMAND_NAME@ %*
2 changes: 1 addition & 1 deletion axlstar/launcher.sh.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
"@DOTNET_RUNNER_EXEC@" @DOTNET_RUNNER_ARGS@ "@AXLSTAR_INSTALL_BIN@/axlstar_dlls/@DLL_NAME@" @COMMAND_NAME@ "$@"
"@AXLSTAR_DOTNET_EXEC@" @DOTNET_RUNNER_ARGS@ "@AXLSTAR_INSTALL_BIN@/axlstar_dlls/@DLL_NAME@" @COMMAND_NAME@ "$@"
Loading