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. |
||
---|---|---|
.ci | ||
.github/workflows | ||
internal | ||
licenses | ||
source | ||
tests | ||
.clang-format | ||
.gitignore | ||
CHANGELOG.md | ||
COPYING.txt | ||
qb64.1 | ||
README.md | ||
SAMPLES.txt | ||
setup_lnx.sh | ||
setup_osx.command | ||
setup_win.bat |
QB64
QB64 is a modern extended BASIC+OpenGL language that retains QB4.5/QBasic compatibility and compiles native binaries for Windows (XP and up), Linux and macOS.
Table of Contents
Installation
Download the appropriate package for your operating system over at https://github.com/QB64-Phoenix-Edition/QB64pe/releases/tag/v1.0alpha
Windows
Make sure to extract the package contents to a folder with full write permissions (failing to do so may result in IDE or compilation errors).
- It is advisable to to whitelist the QB64 folder in your antivirus/antimalware software *
macOS
Before using QB64 make sure to install the Xcode command line tools with:
xcode-select --install
Run ./setup_osx.command
to compile QB64 for your OS version.
Linux
Compile QB64 with ./setup_lnx.sh
.
Dependencies should be automatically installed. Required packages include OpenGL, ALSA and the GNU C++ Compiler.
Usage
Run the QB64 executable to launch the IDE, which you can use to edit your .BAS files. From there, hit F5 to compile and run your code.
To generate a binary without running it, hit F11.
Additionally, if you do not wish to use the integrated IDE and to only compile your program, you can use the following command-line calls:
qb64 -c yourfile.bas
qb64 -c yourfile.bas -o outputname.exe
Replacing -c
with -x
will compile without opening a separate compiler window.
Additional Information
More about QB64 at our wiki: https://qb64phoenix.com/qb64wiki
We have a community forum at: https://qb64phoenix.com/forum
We don't currently tweet. Sorry.
Find us on Discord: https://discord.gg/8YsAZrN3qb