Skip to content

Commit

Permalink
Linux: Fix building in Debug mode (#64)
Browse files Browse the repository at this point in the history
Passing `OptimizeUI` removes the debug tools, which
are referenced by `#if DEBUG` code
  • Loading branch information
ISSOtm authored Aug 13, 2024
1 parent 9f1de7c commit 5e13e85
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,12 @@ DEBUGFOLDER := bin/$(MESENPLATFORM)/Debug
RELEASEFOLDER := bin/$(MESENPLATFORM)/Release
ifeq ($(DEBUG), 0)
OUTFOLDER = $(RELEASEFOLDER)
BUILD_TYPE = Release
BUILD_TYPE := Release
OPTIMIZEUI := -p:OptimizeUi=true
else
OUTFOLDER = $(DEBUGFOLDER)
BUILD_TYPE = Debug
BUILD_TYPE := Debug
OPTIMIZEUI :=
endif


Expand Down Expand Up @@ -185,8 +187,8 @@ ui: InteropDLL/$(OBJFOLDER)/$(SHAREDLIB)
rm -fr $(OUTFOLDER)/Dependencies/*
cp InteropDLL/$(OBJFOLDER)/$(SHAREDLIB) $(OUTFOLDER)/$(SHAREDLIB)
#Called twice because the first call copies native libraries to the bin folder which need to be included in Dependencies.zip
cd UI && dotnet publish -c $(BUILD_TYPE) -p:OptimizeUi="true" $(PUBLISHFLAGS)
cd UI && dotnet publish -c $(BUILD_TYPE) -p:OptimizeUi="true" $(PUBLISHFLAGS)
cd UI && dotnet publish -c $(BUILD_TYPE) $(OPTIMIZEUI) $(PUBLISHFLAGS)
cd UI && dotnet publish -c $(BUILD_TYPE) $(OPTIMIZEUI) $(PUBLISHFLAGS)

core: InteropDLL/$(OBJFOLDER)/$(SHAREDLIB)

Expand Down

0 comments on commit 5e13e85

Please sign in to comment.