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

433 commits

Author SHA1 Message Date
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
Roland Heyder 021d8068c1 Merge branch 'main' into wiki-dev 2022-05-31 17:53:05 +02: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
Roland Heyder 7b91fdc592 Add -u command line switch
- `qb64 -u` can be used during build to populate internal/help, it basically invokes the "Update all pages" action from the IDE's Help menu
- switch is not listed in -? usage help, as I consider it a hidden build-only option
2022-05-31 00:56:32 +02: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
SteveMcNeill c1d12259cb Added to win setup to clean up the mingw compiler after installation.
Fixed the issue where some Linux distros won't clean up the exe when Run Only is selected in the menu bar.

Fixes: #16
Fixes: #54
2022-05-21 12:25:41 -04:00
Matthew Kilgore 4a8a7ce594 Redirect stderr to compilelog rather than errorcompilelog
Having two separate files for the compile output is just too confusing,
and it adds an extra file users need to look at and give us when there
are issues. This change simply makes qb64.bas send both the stdout and
stderr output to compilelog.txt.

Fixes: #61
2022-05-18 09:20:30 -04:00
Matthew Kilgore 73c1c7245d Turn off optimization for now
We'll turn this on later when we have it better sorted out.
2022-05-14 12:15:35 -04:00
Matthew Kilgore 4d61ff7995 Fix quoting on Windows Resource files 2022-05-12 00:53:24 -04:00
Matthew Kilgore 794f76a534 Provide CFLAGS_EXTRA 2022-05-12 00:21:02 -04:00
Matthew Kilgore 11ec9237a3 Add support for mylib$ and mylibopt$ 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 d18fc78fcd Formatting 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 cfb86d2c8f Stop running windres from qb64.bas
Makefile does this
2022-05-12 00:21:02 -04:00
Matthew Kilgore 30c620cfda Initial qb64.bas changes 2022-05-12 00:21:02 -04:00
Matthew Kilgore 5a81e22879 Bump next version to 0.6.0 2022-05-07 19:57:38 -04:00
Matthew Kilgore 7d7d16c4f6 Use $EXEICON and $VERSIONINFO in qb64.bas 2022-05-07 19:57:38 -04:00
Matthew Kilgore a9fd9551af Allow numerical VersionInfo values to set corresponding string values
The resource file we create contains two separate values for FileVersion
and ProductVersion. Currently, they are actually represented by two
separate values in $VERSIONINFO and effectively require duplicating the
information between them.

My understanding is that the string values should always be the same as
the numerical versions, so to make $VERSIONINFO easier to use this
changes the logic so that setting the numerical version will
automatically also set the string version if values for them are not
provided.
2022-05-06 14:29:37 -04:00
Matthew Kilgore 0930d51b9c Move some file-related functions into utilities/file.bas 2022-05-06 13:42:35 -04:00
Matthew Kilgore c165476838 Create icon.rc file on all platforms, copy ico file into temp
Previously, the creation of the icon.rc file was restricted to be
Windows only because Windows is the only platform with a use for that
file. Unfortunately, this breaks a fundimental assumption about how the
QB64 C++ generation works, because we only have one set of
`./internal/source` files from which we build all versions of QB64 for
all platforms. Due to that, the built version needs to include all files
needed by all platforms, regardless of which one is doing the building.
So to that end, all platforms should produce the icon.rc, even if it
will not be used on that platform.

Additionally, the path to the icon file in `icon.rc` is problimatic
because it is made into an absolute path. This blocks `qb64.bas` from
using `$EXEICON` because the absolute path is not predictable, as
the location we create ./internal/source will be different from the
location we build ./internal/source. Effectively this means that the
`icon.rc` file in `./internal/source` would always be wrong.

The solution is to not use an absolute path, with the other option being
to have the icon in the same directory as the resource file. This is
actually relatively easy to acomplish since icon files are not terribly
large and we can simply copy it into the temp directory.

Thus, that is what this change does - the specified icon file is copied
into the temp directory as `icon.ico`, which allows use to use
`icon.ico` in the `icon.rc` file and have it always work regardless of
directory.

The internal logic was also cleaned up a bit. The creation of these
files is no longer Windows specific, and the $EXEICON parsing no longer
writes to the `icon.rc` file - rather, the entire thing is generated
together, with both the $VERSIONINFo and $EXEICON depending on which
were provided.
2022-05-06 13:42:35 -04:00
SteveMcNeill e0dea015fc include path in deleted filename 2022-05-01 19:26:48 -04:00
SteveMcNeill 40ed008e9f Fix to Incorrect flag name 2022-05-01 19:11:38 -04:00
SteveMcNeill 9b87eff34b Capitalize Keywords in QB64.bas 2022-05-01 18:02:15 -04:00
SteveMcNeill 65c75b0df6 Add option to menu to make temp files
It's working and tested in Windows.
Still needs to be tested in Linux and Mac, but I *think* it'll work for them as well.  ;)
2022-04-29 03:57:25 -04:00
Matthew Kilgore 7be379c39d Add version calculation and separate label vs. commit
This slightly changes how the versioning works.
2022-04-28 17:19:37 -04:00
Fellippe Heitor 627b85c4bd Add support to number formats in Watch Panel
Allows changing display format of numbers
between decimal, hex, octal and binary.
2022-03-09 14:31:55 -03:00
Fellippe Heitor 937df8823c Revert "Fix assignments involving arrays (closes #216)"
This reverts commit 39f7d8f07b.
2022-03-01 23:18:33 -03:00
Fellippe Heitor 42c9e7327f Revert "Reset flag wholearrayreference as needed"
This reverts commit 4e41877eb0.
2022-03-01 23:17:45 -03:00
Fellippe Heitor 4e41877eb0 Reset flag wholearrayreference as needed 2022-03-01 22:34:36 -03:00
Fellippe Heitor 39f7d8f07b Fix assignments involving arrays (closes #216)
Array index could be omitted in cases where
it was actually needed
2022-03-01 22:10:28 -03:00
Fellippe Heitor 2926fea0e9 Fix indentation in disabled precompiler blocks 2022-02-24 22:57:33 -03:00
Fellippe Heitor 84873f88d8 Revert "Make indent level only increase once..."
This reverts commit 1e679627f4.
2022-02-23 01:27:59 -03:00
Fellippe Heitor 55c365763c Fix capitalization of arrays in U/LBound calls
Previous fix needed to be reverted; this is the new
attempt at fixing the issue.
2022-02-22 23:51:04 -03:00
Fellippe Heitor 02af89c94d Fix capitalization of 'to' in Case statements 2022-02-22 22:54:12 -03:00
FellippeHeitor c30120ee46 Fix building static libraries in Linux
With QB64 stored in a path with spaces in it,
building static libraries on demand would
fail silently.
2022-02-13 09:53:30 -03:00
FellippeHeitor b87dde8d89 Fix issue with $NoPrefix in Declare Library blocks 2022-01-23 22:03:13 -03:00
FellippeHeitor 03982022dc Fix error with stray As in Sub parameters
Things like this used to be treated as valid:
```
Sub foo(bar As)
End Sub
```
2022-01-21 13:16:57 -03:00
Fellippe Heitor 9f81ba1e1f Update qb64.bas
Fix critical regression in `FUNCTION fixoperationorder$()`

Using UBound/LBound in an expression would cause issues with other functions.
2021-11-06 17:55:48 -03:00
Kit 72126a1289
Make $NOPREFIX-friendly versions of $COLOR includes (#206)
* Create `$NOPREFIX`-friendly version of `color0.bi`

* Create color32_noprefix.bi

* add conditional for noprefix $color

* oh. it was that easy?

* Update CHANGELOG.md

* Update help files [ci-skip]

Co-authored-by: all-other-usernames-were-taken <74026992+all-other-usernames-were-taken@users.noreply.github.com>
2021-11-05 01:46:28 -03:00
Roland Heyder ce3c459dad Implements the _Bin$ function
Usage is analog to the legacy OCT$ and HEX$ functions.
2021-10-14 00:17:35 +02:00
FellippeHeitor bbf931d3ee Fix UDT internal arrays retaining values after loading files 2021-10-12 01:07:23 -03:00
FellippeHeitor 65e6f44a2f Fix "Duplicate definition" error with ON ERROR
Long-standing issue involving static arrays in subs/functions
with ON ERROR trapping active.
2021-10-12 00:36:52 -03:00
FellippeHeitor 151d68ddcc Fix Input$() from file/port switching focus to the debuggee 2021-10-03 11:20:18 -03:00
FellippeHeitor 7ab98a5a9e Remove previous variables from Watch List if TYPEs change 2021-10-02 03:52:40 -03:00
FellippeHeitor 7c17c987cb Keep watch list selection across edits (same session) 2021-10-02 02:38:12 -03:00
FellippeHeitor 1e679627f4 Make indent level only increase once per line; closes #176 2021-09-30 00:48:38 -03:00
FellippeHeitor 17686ee09c Add temporary error reporting through the console. 2021-09-29 20:11:33 -03:00
FellippeHeitor a5c2b130a5 Fix bad pointer arithmetic on void (macOS). 2021-09-28 04:00:43 -03:00
FellippeHeitor 7413e2fe6f Adapt CLEAR to deal with var-length UDT variables. 2021-09-27 22:55:01 -03:00