We were hard at work to be able to release this new beta of PureBasic so you could play with it during Xmas if you have some holidays 8). It was meant to be a medium sized release, but Fr34k decided to weight in and added a lot of commands, so it's now officially a big release ! Check for yourself:
As planed, we dropped the Windows XP support so we can now easily include cutting edge libraries like WebView and remove a lot of patches all accross the code base. Here is a small WebView example to get you started.
More examples for new functions can be found here:
https://www.purebasic.fr/english/viewtopic.php?p=613171#p613171
Have Fun !
The Fantaisie Software Team
- Added: WebViewGadget(), BindWebViewCallback(), UnbindWebViewCallback(), WebViewEvaluateScript() (Windows, OSX, GTK3)
- Added: CompareStructure(), CompareArray(), CompareList() and CompareMap() functions
- Added: CustomSortList() and CustomSortArray() functions to Sort library
- Added: CatchPack(), PackEntryDate()
- Added: #PB_Cipher_HMAC flag to fingerprint functions
- Added: CreatePasswordHash() and VerifyPasswordHash() functions (BCrypt algorithm)
- Added: DeriveCipherKey() to create a cipher key from a password (PBKDF2 algorithm)
- Added: SvgVectorOutput() for all OS
- Added: PdfVectorOutput() for all OS
- Added: DateUTC() to get the date in UTC time
- Added: ConvertDate(Date, #PB_Date_LocalTime/#PB_Date_UTC) to convert the date between UTC and localtime
- Added: AddPackDirectory(#Packer, PackedDirectoryName$) for empty directory
- Added: UseDialogOpenGLGadget() to avoid opengl dependencies by default when using dialogs.
- Added: UseDialogScintillaGadget() to avoid big lib dependency by default when using dialogs.
- Added: Case-insensitive subsystem support on Linux
- Added: 'Encoding' optional parameter to OpenPreference() to handle properly UTF-8 files without BOM
- Added: '#PB_Preference_NoBOM' flags for CreatePreference() to create UTF-8 preference files without BOM
- Added: --listfunctions/constants/interfaces and --querystructure support to Windows compiler.
- Added: #PB_EventType_ColumnClick for ListIconGadget()
- Added: #PB_String_EscapeJSON support to EscapeString() and UnescapeString().
- Added: Parent window support to all requesters
- Added: runtime warning if CreateThread() is used without ThreadSafe mode
- Added: #PB_EventType_Refresh support for ExplorerListGadget() (Window only)
- Added: GadgetItemID() support for PanelGadget() (Windows only)
- Added: WebGadget based on Edge component with the #PB_Web_Edge constant (Windows only)
- Added: localhost binding for InitFastCGI()
- Added: SystrayIconMenu() to automatically display a menu when clicking on the icon
- Added: ListIconGaget() column alignment support
- Updated: Toolchain on Windows now use VisualStudio 2022 and new MSVCRT for faster PureBasic programs and easier external libs integration.
- Updated: Date library for full 64bit support (new range is year 1601 to 9999)
- Updated: Minimum version for Linux x86 is now Debian 12
- Updated: Minimum version for Raspberry is now Debian 12 based PI OS
- Changed: Scintilla is now linked statically on Windows (distributing the scintilla.dll along your executable isn't needed anymore)
- Changed: the SysTray lib on Linux now use AppIndicator to support modern Linux distro in GTK3
- Changed: deprecated DESFingerprint() function - use the new CreatePasswordHash() instead.
- Removed: --listpath on Linux/OSX (now use --output to specify the output file)
- Removed: Windows XP support. Minimum supported version is now Windows Vista.
As planed, we dropped the Windows XP support so we can now easily include cutting edge libraries like WebView and remove a lot of patches all accross the code base. Here is a small WebView example to get you started.
Code : | Sélectionner tout |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | Html$ = ~"<button id=\"increment\">Tap me</button>\n"+ ~"<div>You tapped <span id=\"count\">0</span> time(s).</div>\n"+ ~"<button id=\"compute\">Compute</button>\n"+ ~"<div>Result of computation: <span id=\"compute-result\">0</span></div>\n"+ ~"<script>\n"+ ~" const [incrementElement, countElement, computeElement, "+ ~"computeResultElement] =\n"+ ~" document.querySelectorAll(\"#increment, #count, #compute, "+ ~"#compute-result\");\n"+ ~" document.addEventListener(\"DOMContentLoaded\", () => {\n"+ ~" incrementElement.addEventListener(\"click\", () => {\n"+ ~" window.increment().then(result => {\n"+ ~" countElement.textContent = result.count;\n"+ ~" });\n"+ ~" });\n"+ ~" computeElement.addEventListener(\"click\", () => {\n"+ ~" computeElement.disabled = true;\n"+ ~" window.compute(6, 7).then(result => {\n"+ ~" computeResultElement.textContent = result;\n"+ ~" computeElement.disabled = false;\n"+ ~" });\n"+ ~" });\n"+ ~" });\n"+ ~"</script>"; Procedure IncrementJS(Json$) Static i Debug "IncrementJS "+Json$ i+1 ProcedureReturn UTF8(~"{ \"count\": "+Str(i)+ "}") EndProcedure Procedure ComputeJS(Json$) Debug "ComputeJS "+Json$ ProcedureReturn UTF8(~"150") EndProcedure OpenWindow(0, 100, 100, 400, 400, "Hello", #PB_Window_SystemMenu) WebViewGadget(0, 0, 0, 400, 400) SetGadgetText(0, Html$) BindWebViewCallback(0, "increment", @IncrementJS()) BindWebViewCallback(0, "compute", @ComputeJS()) Repeat Event = WaitWindowEvent() Until Event = #PB_Event_CloseWindow |
More examples for new functions can be found here:
https://www.purebasic.fr/english/viewtopic.php?p=613171#p613171
Have Fun !
The Fantaisie Software Team