1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 13:50:36 +00:00

Merge pull request #58 from mkilgore/setup-win-report-error

Add error handling to setup_win.bat, fix objcopy command
This commit is contained in:
Matt Kilgore 2022-05-16 23:55:07 -04:00 committed by GitHub
commit f939b7ee6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 6 deletions

View file

@ -84,8 +84,12 @@ else
endif
ifdef BUILD_QB64
EXE ?= qb64
else
ifeq ($(OS),win)
EXE ?= qb64.exe
else
EXE ?= qb64
endif
endif
ifneq ($(filter clean,$(MAKECMDGOALS)),)
# We have to define this for the Makefile to work,
@ -97,8 +101,6 @@ ifndef EXE
$(error Please provide executable name as 'EXE=executable')
endif
endif
all: $(EXE)
CLEAN_LIST :=
@ -341,6 +343,8 @@ clean:
$(EXE): $(EXE_OBJS) $(EXE_LIBS)
$(CXX) $(CXXFLAGS) $(EXE_OBJS) -o $@ $(EXE_LIBS) $(CXXLIBS)
ifneq ($(filter-out osx,$(OS)),)
$(OBJCOPY) --only-keep-debug $@ $(PATH_INTERNAL_TEMP)/$@.sym
$(OBJCOPY) --strip-unneeded $@
endif

View file

@ -19,8 +19,11 @@ echo Extracting %MINGW% as C++ Compiler
:skipccompsetup
internal\c\c_compiler\bin\mingw32-make.exe OS=win clean
internal\c\c_compiler\bin\mingw32-make.exe OS=win BUILD_QB64=y
echo Cleaning...
internal\c\c_compiler\bin\mingw32-make.exe OS=win clean >NUL 2>NUL
echo Building QB64...
internal\c\c_compiler\bin\mingw32-make.exe OS=win BUILD_QB64=y || goto report_error
echo.
echo Launching 'QB64'
@ -28,3 +31,10 @@ qb64
echo.
pause
exit 0
report_error:
echo "Error compiling QB64."
echo "Please review above steps and report to https://github.com/QB64-Phoenix-Edition/QB64pe/issues if you can't get it to work"
exit 1