1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-03 18:11:20 +00:00
Commit graph

31 commits

Author SHA1 Message Date
Samuel Gomes fa0ba3e5d8
Merge branch 'main' into main 2022-09-18 14:49:58 +05:30
Matthew Kilgore a4d910207e Link winmm when using _DEVICES on Windows
The _DEVICES command pulls in some stuff that depends on `winmm`.
Normally this isn't a problem, but if `$CONSOLE:ONLY` is used then this
dependency can actually get removed from the `CXXLIBS` and cause linking
to fail.

It's easy enough to fix this by always adding `-lwinmm` if `_DEVICES` is
in use.

Fixes: #178
2022-09-17 03:06:24 -04:00
Samuel Gomes a100a434e4 Fix #175 2022-09-17 08:53:32 +05:30
Matthew Kilgore cebcb11646 Fix compiling source files with single quotes in name
Using single quotes in a file name wasn't working because the Makefile
was using single quotes itself to quote the filename when providing it
to the compiler. The Makefile was switched to use double quotes instead,
which work just as well but are allowed to contain single quotes inside
of them.

Since double quotes are a legal character to have in a file name on
Linux and Mac OS, I added extra logic to start escaping double quote
characters.

I added a test to verify that we can compile source files with single
quotes in the name. I could not add a test for double quotes since such
files cannot exist on Windows and thsu cannot easily be added to the
repository.
2022-09-09 09:59:43 -04:00
Matthew Kilgore 2b3403745c Add initial MIDI language support
This adds MIDI support to the language as a new unstable feature. There
are two new metacommands that come with this:

$Unstable: Midi
$MidiSoundFont: [Default|"filename"]

The $Unstable command is required to be able to use any of the other
commands, and just signifies that this is not a full part of the
language yet and may change in breaking ways before the API is
finalized.

The $MidiSoundFont command enables MIDI support in the compiled program,
and also specifies what sound font to use to play MIDI files. "Default"
will make use of the soundfont placed at
'./internal/support/default_soundfont.sf2', and otherwise a filename can
be specified to use any soundfont wanted.

In either case, the selected sound font is compiled into the executable
and then loaded at runtime.

Fixes: #115
2022-09-04 23:35:14 -04:00
Matthew Kilgore 41cc1e6569 Integrate the miniaudio backend into the build
This integrates the miniaudio backend, using a new `DEP_AUDIO_MINIAUDIO`
flag to enable it. This will allow consumers to choose which backend to
use.
2022-08-27 14:27:55 -04:00
Matthew Kilgore 20c9d41271 Use -no-pie on Linux
The -no-pie flag tells the compiler not to make a Position Independent
Executable. We don't really care which it chooses to make, but some file
explorers consider PIE executables to be shared objects and won't allow
you to run them directly. To avoid this, we're compiling with -no-pie.

Fixes: #142
2022-08-27 00:17:09 -04:00
Roland Heyder 2ec897b75d Step 10: Update remaining stuff
- checks all remaining occurrences of the term 'qb64', some remain untouched, some are renamed according to context
- also added new logo for README.md
- this step does finalize the 'Phoenix Edition' re-branding
2022-08-12 02:54:12 +02:00
Roland Heyder e68582b6f2 Step 7: Rename qb64.exe to qb64pe.exe
- Includes related LNX/OSX files
- Excludes mentions in the help (*.txt) files
2022-08-11 18:07:57 +02:00
Matthew Kilgore 93f47326a7 Add basic C++ testing build logic
This is a fairly flexable build framework for building C++ test
executables. The executables are defined in a list and each can be given
its own set of source files, compiler flags, linker flags, etc. The
test source files are compiled together at the same time to allow any
necessary files to get applied at compile time.

Later a script will run through the test executables.
2022-06-11 22:47:05 -04:00
Matthew Kilgore eb815c4220 Prepare for separate libqb, define C++ standard
This sets up a few different flags we'll need for the conditional
compiling, and also sets the C++ standard to gnu++11, which effectively
just matches what we were implicitly using before.
2022-06-11 22:47:05 -04:00
Matthew Kilgore 6cfd785708 Change libqb.o compile location 2022-06-11 20:43:28 -04:00
Matthew Kilgore d36edad30c Fix compilation of files with $ in the name
This is a bit of an odd one, but files with $ in the name don't compile
correctly due to expansion being done on the $.

The culprit here is `make`, as the syntax '$x' is interpreted to mean to
insert the expansion of the variable 'x'. To avoid this behavior we have
to replace every single $ with $$. Make will interpret the $$ to mean it
should insert a single $ and not do any expansion, which is what we
want.

Fixes: #96
2022-06-10 10:42:49 -04:00
Matthew Kilgore 2d919768ac Add C++ compiler settings dialog
The new dialogs includes 5 settings:

1. Flag to turn on Optimization (off by default)
2. Flag to strip symbols (On by default)
3. String for extra compiler flags
4. String for extra linker flags
5. Setting for max compiler processes (default of 3)

Fixes: #65
Fixes: #40
2022-05-30 23:15:04 -04:00
Matthew Kilgore 142f1d3615 Makefile should respect CXXFLAGS_EXTRA
The Makefile has an issue where it doesn't respect CXXFLAGS_EXTRA due to
directly setting CXXFLAGS to a new value after adding the extra flags.
2022-05-30 23:15:04 -04:00
Matthew Kilgore 9e2177deff Allow EXE name to have spaces in it
Makefile's generally hate spaces in filenames, and it's largely
impossible to make them work. Due to that, with the change to use a
`Makefile` the `EXE=` parameter did not work with spaces, and programs
such as "foo bar.bas" would not compile because it produces "foo
bar.exe" which has a space in the name.

There were options here, but in this very specific case it is actually
possible to allow the Makefile to work with spaces. `EXE` is only a
single filename, so as long as we always quote it correctly and the
provided `EXE=` parameter escapes the spaces with `\` then it will work.

Thus, we modified the Makefile to always do the quoting, and modified
QB64 to automatically escape the spaces in the executable name provided
to the Makefile.

I also modified the `compile_tests` to test that spaces in filenames and
paths of the executable correctly compile.

Fixes: #80
2022-05-22 23:59:06 -04:00
Matthew Kilgore c05ba9cedc Don't include the directory in symbol file name
The symbol file was intended to just make the executable name with
".sym" and be located in ./internal/temp. Unfortunately I forgot to
remove the directory from the EXE name, so it ended up producing an
incorrect filename for the ".sym" file.

Make already provide a `notdir` function, so we can use that to get just
the executable name.
2022-05-22 23:59:06 -04:00
Matthew Kilgore 493eccf370 Fix the dependency list of qbx.o to use TEMP_ID
The contents of the qbx.o being compiled is dependent on the contents of
./internal/temp* related to that qbx.o. The paticular ./internal/temp*
to use is controled by TEMP_ID.

Unfortunately TEMP_ID is omitted from the path used to generate the
dependency list, which means the `qbx.o` may not get recompiled when
code changes are made and multiple IDE instances are being used.

Fixes: #81
2022-05-22 23:58:54 -04:00
Matthew Kilgore 6adac0842e Remove unnecessary else logic from Makefile 2022-05-16 00:16:18 -04:00
Matthew Kilgore 790129dcef Skip the symbol stripping on OSX
The `objcopy` logic to produce a symbol file doesn't work on OSX, and it
seems it needs different lgoic to produce debug information, so for now
we're just going to skip it.
2022-05-15 17:13:10 -04:00
Matthew Kilgore b5ea3a081d Fix BUILD_QB64=y usage on Windows
BUILD_QB64=y sets the default EXE name to 'qb64', which is actually
wrong on Windows because it does not include the `.exe` extention. It
also works anyway but `objcopy` doesn't recognize the file without the
extension present.
2022-05-15 17:12:17 -04:00
Matthew Kilgore f399406f8f Produce a symbol file along with the executable
The symbol file is a file that aids in debugging by allowing a crash
dump from a stripped executable to have it's symbols applied to it. The
file itself ends up in ./internal/temp after compilation and is called
`EXEFILE.sym`.

FIxes: #53
2022-05-14 15:06:56 -04:00
Matthew Kilgore 7a5ca0c49c Cleanup unused Makefile stuff 2022-05-14 12:13:00 -04:00
Matthew Kilgore 336a7c3085 Build QB64 with icon 2022-05-12 00:34:48 -04:00
Matthew Kilgore fd6a201046 Require OS to be set when using the Makefile 2022-05-12 00:21:02 -04:00
Matthew Kilgore 10d12eddb8 Reorganize, add CFLAGS_EXTRA 2022-05-12 00:21:02 -04:00
Matthew Kilgore f1d9063980 Add support for CXXFLAGS_EXTRA and CXXLIBS_EXTRA 2022-05-12 00:21:02 -04:00
Matthew Kilgore bc7df798c3 make clean should clear ./internal/temp 2022-05-12 00:21:02 -04:00
Matthew Kilgore 23ef0aeca8 Add more tests and dynamic library support 2022-05-12 00:21:02 -04:00
Matthew Kilgore 2a4b637412 Separate _ICON usage from icon.rc
The Makefile was incorrectly tying together _ICON and icon.rc, making it
impossible to use one without the other. To fix this we introduce a new
DEP_ICON_RC flag, which indicates we need to use the icon.rc file (in
addition to regular icon support). DEP_ICON now only indicates we need
to support _ICON, and does not attempt to build the resource
information.
2022-05-12 00:21:02 -04:00
Matthew Kilgore c1639b3979 Add basic make build system 2022-05-12 00:21:02 -04:00