Skip to content

Commit

Permalink
MSYS2 : Copy dlls (#6416)
Browse files Browse the repository at this point in the history
* Fix copy_dlls target to work with both Debug and Release executable.
Remove PLATFORM_PROJECT_EXISTING_TARGET

* Update changelog
  • Loading branch information
oxillo authored and ofTheo committed Nov 3, 2019
1 parent d48d142 commit 73cb6bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ PLATFORM/IDE SPECIFIC
### msys2
- add 64 bits support.
- setup : removed automatic setup of PATH environment variable(#5740). Move instructions to setup PATH to documentation.
- documentation : fix typo (#6211) and insist on the use of MINGW32 shell.
- documentation : fix typo (#6211) and insist on the use of MINGW32 shell.
- fixed 'copy_dlls' target to work woth both Debug and Release executables.

ADDONS
------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ PLATFORM_PROJECT_RELEASE_BIN_NAME=$(APPNAME).exe
PLATFORM_PROJECT_RELEASE_TARGET = bin/$(PLATFORM_PROJECT_RELEASE_BIN_NAME)
PLATFORM_PROJECT_DEBUG_TARGET = bin/$(PLATFORM_PROJECT_DEBUG_BIN_NAME)
PLATFORM_RUN_COMMAND = cd bin;./$(BIN_NAME)
ifneq ("$(wildcard $(PLATFORM_PROJECT_RELEASE_TARGET))","")
PLATFORM_PROJECT_EXISTING_TARGET=$(PLATFORM_PROJECT_RELEASE_TARGET)
else
PLATFORM_PROJECT_EXISTING_TARGET=$(PLATFORM_PROJECT_DEBUG_TARGET)
endif


##########################################################################################
# PLATFORM DEFINES
Expand Down Expand Up @@ -314,7 +308,8 @@ PLATFORM_DEBUG_ICON = $(OF_PLATFORM_MAKEFILES)/icon-debug.ico
copy_dlls:
@echo " copying dlls to bin"

@ntldd --recursive $(PLATFORM_PROJECT_EXISTING_TARGET) | grep -F "mingw32" | cut -d">" -f2 |cut -d" " -f2 >dlllist
@ntldd --recursive $(wildcard bin/$(APPNAME)*.exe) | sed -e 's:\\:/:g' | grep -F "$(MINGW_PREFIX)" | cut -d">" -f2 |cut -d" " -f2 >dlllist

@while read -r dll; do \
test -e "$$dll" && cp "$$dll" ./bin; \
done <dlllist
Expand Down

0 comments on commit 73cb6bf

Please sign in to comment.