| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|\
| |
| |
| |
| | |
* dgud/wx/win32-debug-info:
Add win32 debug info to installer
|
| |
| |
| |
| | |
So the released wx can be debugged
|
|\ \
| |/
|/|
| |
| |
| |
| | |
* maint:
Updated OTP version
Prepare release
Update copyright year
|
| | |
|
| | |
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
* maint:
wx: Use temp env for send_msg
gl: Fix glDebugMessage functionality
Fix tests
Fix wx-3.2 macros and OpenGL support
wx: Add debug printouts for OpenGL
wx: Improve debug printouts
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
send_msg can be called via (gtk debug msgs) callback when the env is
already in use.
Noticed with a assert in debug compiled erl.
Solve by using a temporary "env" when sending msgs.
|
| |
| |
| |
| |
| | |
gl:getDebugMessageLog returned one list instead of several,
and gl:debugMessageInsert had an unused lenght parameter.
|
| |
| |
| |
| |
| | |
Clipboard test hangs on windows, when we run the tests from remote
without gui open.
|
| |
| |
| |
| |
| |
| | |
Some changed macros in 3.2.
Also add support function for OpenGL contexts.
|
| | |
|
| |
| |
| |
| | |
Remove printouts of large binaries.
|
| |
| |
| |
| | |
This reverts commit d4e4511b19f4126d9271a6e3a8fa2eb716da7e85.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Motivation:
An untested broken feature.
Can easily be enabled by setting CFLAGS and LDFLAGS.
|
| |
| |
| |
| | |
This reverts commit 1cf126f91eb533783409da95b117207d8c13d9aa.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
This reverts commit 587341d994f91af5b30483ee9434e932e3d7b802.
|
| | |
|
|\ \
| |/
| |
| |
| |
| |
| | |
* maint:
Updated OTP version
Prepare release
Update copyright year
|
| | |
|
| | |
|
|\ \
| |/ |
|
| |\
| | |
| | | |
wx: fix build issue when GL/glu.h is not present
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently the build of wx fails if GL/gl.h is present but GL/glu.h is
not. This may happen, for example, in macOS if the homebrew mesa package
is installed.
This change ensures that both GL/gl.h and GL/glu.h are present before
including them.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We move all the logic around bootstraps to the top
Makefile.in instead of sharing it with lib/Makefile.
Now there is a single place that lists which applications
are part of which bootstrap and which need to be built or
not built.
|
|\ \ \
| |/ / |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We cannot depend on `is_packaged_app()` check because it is not a
perfect way of checking if app is bundled.
It would return true when the app is bundled with a launcher like this:
```swift
import AppKit
let task = Process()
task.launchPath = "/Users/wojtek/src/otp/bin/erl"
task.arguments = ["-noshell", "-eval", "wx:new(), timer:sleep(5000), halt()"]
try task.run()
task.waitUntilExit()
```
It would return false for this launcher, however:
```swift
import AppKit
class AppDelegate: NSObject, NSApplicationDelegate {
func applicationDidFinishLaunching(_ aNotification: Notification) {
let task = Process()
task.launchPath = "/Users/wojtek/src/otp/bin/erl"
task.arguments = ["-noshell", "-eval", "wx:new(), timer:sleep(5000), halt()"]
try! task.run()
}
}
let app = NSApplication.shared
let delegate = AppDelegate()
app.delegate = delegate
app.run()
```
Btw, there has recently been a fix in wx [1] and we'd only be
able to take advantage of it when `OSXIsGUIApplication` returns true
(and when wx recognizes our app as properly bundled, see [2]).
And so I believe to support variety of scenarios, we need precise
control.
[1] https://github.com/wxWidgets/wxWidgets #22508
[2] https://github.com/erlang/otp #6070
|
|/ |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
* maint:
Updated OTP version
Prepare release
Update copyright year
|
| | |
|
| | |
|
| |\
| | |
| | |
| | |
| | | |
* dgud/wx/compile-wxWidgets-316/GH-5893/OTP-18064:
wx: Fix build problems with wxWidgets-3.1.6
|
|\ \ \
| | | |
| | | | |
wx: Document `wx:subscribe_events/0`
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
wx: Overload `OSXIsGUIApplication` with our own check
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Some macOS apps only run in the background and thus have no GUI. Some
apps only live in the "menu bar" (top-right corner) and thus don't have
the traditional GUI either. In both cases, we don't want the application
to show up in the Dock (and thus show up when switching apps with
cmd+tab, etc)
A standard way to do this to set `LSUIElement` to `true`. See:
https://developer.apple.com/documentation/bundleresources/information_property_list/lsuielement)
Here's an example script that builds such app:
#!/bin/sh
set -eo pipefail
cat <<EOF > app1.swift
import Cocoa
_ = NSApplication.shared
let window = NSWindow(
contentRect: NSMakeRect(800, 600, 320, 200),
styleMask: [.titled, .closable],
backing: .buffered,
defer: true
)
window.orderFrontRegardless()
window.title = "Example"
let menuItemOne = NSMenuItem()
menuItemOne.submenu = NSMenu()
menuItemOne.submenu?.items = [
NSMenuItem(title: "Quit", action: #selector(NSApplication.terminate(_:)), keyEquivalent: "q")
]
let menu = NSMenu()
menu.items = [menuItemOne]
NSApp.mainMenu = menu
NSApp.activate(ignoringOtherApps: true)
NSApp.run()
EOF
echo app1: building
mkdir -p app1.app/Contents/MacOS
swiftc app1.swift -o app1.app/Contents/MacOS/app1
echo app1: setting LSUIElement
cat <<EOF > app1.app/Contents/Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSUIElement</key>
<true/>
</dict>
</plist>
EOF
Besides the `LSUIElemet` property, there's also a programatic way of
setting this behaviour. If that is used, the property seems to be
ignored.
In our example app, if we make this code change:
+ NSApp.setActivationPolicy(.regular)
NSApp.run()
Then our app will show up in the Dock if though we set `LSUIElement`.
I tried using the `LSUIElement` property with wxErlang. Here's an
example script:
echo app2: building
mkdir -p app2.app/Contents/MacOS
cat <<EOF > app2.app/Contents/MacOS/app2
#!/bin/sh
set -eo pipefail
export PATH="$(dirname $(which erl)):\$PATH"
export WX_MACOS_NON_GUI_APP=true
erl -noshell -eval 'WX=wx:new(), F=wxFrame:new(WX,-1,"Hello"),
wxFrame:show(F),
MB=wxMenuBar:new(),
wxFrame:setMenuBar(F, MB),
wxFrame:connect(F, command_menu_selected, [{skip,true}]),
wxFrame:connect(F, close_window, [{skip,true}]),
receive Evt ->
io:format("~p~n", [Evt]),
halt()
end.
'
EOF
chmod +x app2.app/Contents/MacOS/app2
echo app2: setting LSUIElement
cat <<EOF > app2.app/Contents/Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSUIElement</key>
<true/>
</dict>
</plist>
EOF
When running it, the app shows up in the Dock.
I determined that wxWidgets sets the activation policy to regular here:
if ( !wxApp::sm_isEmbedded && wxTheApp && wxTheApp->OSXIsGUIApplication() )
{
CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle() ) ;
CFStringRef path = CFURLCopyFileSystemPath ( url , kCFURLPOSIXPathStyle ) ;
CFRelease( url ) ;
wxString app = wxCFStringRef(path).AsString(wxLocale::GetSystemEncoding());
if ( !app.EndsWith(".app") )
{
[NSApp setActivationPolicy: NSApplicationActivationPolicyRegular];
[NSApp activateIgnoringOtherApps: YES];
}
}
https://github.com/wxWidgets/wxWidgets/blob/v3.1.5/src/osx/cocoa/utils.mm#L90
Now, there are two conditions that gate this behaviour. The first one is
the one I'm overwriting, the call to `wxTheApp->OSXIsGUIApplication()`
method.
The second one is checking if the application is bundled. When running
wxErlang, that code is always executed even if the application is in
fact bundled.
I copied this checking code to `wxe_impl.cpp`:
--- a/lib/wx/c_src/wxe_impl.cpp
+++ b/lib/wx/c_src/wxe_impl.cpp
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <signal.h>
+#include <CoreServices/CoreServices.h>
#include <wx/wx.h>
@@ -180,6 +181,12 @@ bool WxeApp::OnInit()
wxInitAllImageHandlers();
#ifdef _MACOSX
+ CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle());
+ CFStringRef path = CFURLCopyFileSystemPath(url, kCFURLPOSIXPathStyle);
+ CFRelease(url);
+ wxString app = wxCFStringRef(path).AsString(wxLocale::GetSystemEncoding());
+ wxLogInfo(app);
And on my system the following was logged: `/Users/wojtek/src/otp/bin/aarch64-apple-darwin21.4.0`.
For this reason I've added an implementation of the first check,
`wxTheApp->OSXIsGUIApplication()` which uses wxErlang's way of detecting
if we are in a bundle.
|
|\ \ \ \ \
| |_|/ / /
|/| | | |
| | | | |
| | | | | |
* maint:
wx: Fix build problems with wxWidgets-3.1.6
|
| |\ \ \ \
| | |_|/ /
| |/| | /
| | | |/
| | |/| |
* dgud/wx/compile-wxWidgets-316/GH-5893/OTP-18064:
wx: Fix build problems with wxWidgets-3.1.6
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Update pushed to wx_api_branch on git@github.com:erlang/wxWidgets.git
and code re-generated.
|
|\ \ \ \
| |/ / / |
|
| | | |
| | | |
| | | |
| | | | |
Missed one place
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | | |
* maint:
wx: Fix configure on win32 with newer wxWidgets
|