Post by n00b on May 14, 2020 1:03:41 GMT -6
I just uploaded the latest release. This release has some new functions, bug fixes, new platform support, and drastically improved packaging tool. I will post some links on the forum when I get around to it but you can go to rcbasic.com to download the latest release with all the tools.
First lets go over the biggest new feature, web support. With the package tool you can now select to build for the web. To be able to use this you will need python 3 and git installed. The first time you attempt to build for the web it may take a while as it will download emscripten along with all the libraries needed to build your web app. Also, sound should work on all browsers now. One thing to take note of on the web port is that *.ogg files are the only music format that seems to work. This is a limitation of SDL_mixer with emscripten. For best performance on the web it is recommended you have the latest graphics drivers for your system installed.
There have also been a few functions added. Here is a list of the new functions:
There SetEnv function definition has also changed. Here is how you would call it now:
The packaging tool is now available for Windows as well as Linux. The generated linux bundles have been tested on live CD installs of Ubuntu, Linux Mint, Solus, Fedora, and MX Linux and ran just fine without requiring any additional libraries to be installed.
NOTE: On windows, the image you have selected for your icon won't be converted to a mac icon. If you want to set a custom icon for mac you need to create it yourself and then stick it in your project folder and name it Icon.icns. If you don't have a mac icon in your project folder it will give your app the rcbasic icon by default.
There has been a few bugs fixed. First, the floodfill function should work correctly now. There was a bug in the SetEnv() and Env() functions that was causing them to not be able to read or write variables in the calling environment on windows. These functions are now using the windows specific functions for handling environment variables on windows. The SetEnv was also causing a crash to happen if you called it more than once on linux. That has also been fixed. I fixed another issue on linux where if you had a folder with the same name as your cbc file the runtime would try to open the folder instead of your cbc file. There are other minor bugs that you can check the github commits on if you are curious.
There has also been quite a few new examples added and some changes to examples that were already there.
Lastly, the manual has undergone some more improvements. I added an alphabetical list of all of rcbasic's built-in functions, re-worded some of the stuff in some of the pages and added some extra content.
On top of the above issues, I also made a lot of improvements to my gui library. I will be posting an update to that soon as well.
First lets go over the biggest new feature, web support. With the package tool you can now select to build for the web. To be able to use this you will need python 3 and git installed. The first time you attempt to build for the web it may take a while as it will download emscripten along with all the libraries needed to build your web app. Also, sound should work on all browsers now. One thing to take note of on the web port is that *.ogg files are the only music format that seems to work. This is a limitation of SDL_mixer with emscripten. For best performance on the web it is recommended you have the latest graphics drivers for your system installed.
There have also been a few functions added. Here is a list of the new functions:
- Sub GetDesktopDisplayMode(index, ByRef w, ByRef h, ByRef freq) - This will get the Desktop Resolution and the refresh rate of the display
- Sub DrawImage_Transform(slot, x, y, w, h, src_x, src_y, src_w, src_h, angle, center_x, center_y, flip_h, flip_v) - Applies a number of transformations on an image in one function call
- Sub GetPowerInfo(ByRef status, ByRef secs, ByRef pct) - Gets the battery status and the amount of time it has left to charge
- Function SystemRam() - This returns exactly what you think it does
- Function SetRenderScaleQuality(n) - This function was added to address kennn request for anti-aliasing. If you set this to one it will produce an effect close to anti-aliasing
- Function EvalJS$(js_code$) 'Only useable in browser - Allows javascript code to run in a web app
- Function GetRenderScaleQuality() - This gets the current render scale quality set
There SetEnv function definition has also changed. Here is how you would call it now:
SetEnv("TestVar","Hello World", 1) 'The last parameter will determine if the variable should be overwritten (only applies to linux/mac os)
The packaging tool is now available for Windows as well as Linux. The generated linux bundles have been tested on live CD installs of Ubuntu, Linux Mint, Solus, Fedora, and MX Linux and ran just fine without requiring any additional libraries to be installed.
NOTE: On windows, the image you have selected for your icon won't be converted to a mac icon. If you want to set a custom icon for mac you need to create it yourself and then stick it in your project folder and name it Icon.icns. If you don't have a mac icon in your project folder it will give your app the rcbasic icon by default.
There has been a few bugs fixed. First, the floodfill function should work correctly now. There was a bug in the SetEnv() and Env() functions that was causing them to not be able to read or write variables in the calling environment on windows. These functions are now using the windows specific functions for handling environment variables on windows. The SetEnv was also causing a crash to happen if you called it more than once on linux. That has also been fixed. I fixed another issue on linux where if you had a folder with the same name as your cbc file the runtime would try to open the folder instead of your cbc file. There are other minor bugs that you can check the github commits on if you are curious.
There has also been quite a few new examples added and some changes to examples that were already there.
Lastly, the manual has undergone some more improvements. I added an alphabetical list of all of rcbasic's built-in functions, re-worded some of the stuff in some of the pages and added some extra content.
On top of the above issues, I also made a lot of improvements to my gui library. I will be posting an update to that soon as well.