dbsoft / dwindows

Dynamic Windows Library Mirror
Other
8 stars 1 forks source link

Broken on macOS m1 #13

Closed IsaacShelton closed 1 year ago

IsaacShelton commented 1 year ago

Operating System: macOS 13.2.1

dwindows version: latest cc1b01eb75e62511ab371c18963407ac1367889f (compiled from source)

I don't know if this library supports macOS anymore, but it seems broken.

It compiles and runs fine, but no Window actually shows

2023-09-12 09:25:05.435 dwtest[19171:4342448] Supports the HTML Widget: Enabled (1)
2023-09-12 09:25:05.435 dwtest[19171:4342448] Supports the DW_SIGNAL_HTML_RESULT callback: Enabled (1)
2023-09-12 09:25:05.435 dwtest[19171:4342448] Supports custom window border sizes: Unsupported (-1)
2023-09-12 09:25:05.435 dwtest[19171:4342448] Supports window frame transparency: Unsupported (-1)
2023-09-12 09:25:05.435 dwtest[19171:4342448] Supports Dark Mode user interface: Enabled (1)
2023-09-12 09:25:05.435 dwtest[19171:4342448] Supports auto completion in Multi-line Edit boxes: Enabled (1)
2023-09-12 09:25:05.435 dwtest[19171:4342448] Supports word wrapping in Multi-line Edit boxes: Enabled (1)
2023-09-12 09:25:05.435 dwtest[19171:4342448] Supports striped line display in container widgets: Enabled (1)
2023-09-12 09:25:05.435 dwtest[19171:4342448] Supports Multiple Document Interface window frame: Unsupported (-1)
2023-09-12 09:25:05.435 dwtest[19171:4342448] Supports status text area on notebook/tabbed controls: Unsupported (-1)
2023-09-12 09:25:05.435 dwtest[19171:4342448] Supports sending system notifications: Enabled (1)
2023-09-12 09:25:05.435 dwtest[19171:4342448] Supports UTF8 encoded Unicode text: Enabled (1)
2023-09-12 09:25:05.435 dwtest[19171:4342448] Supports Rich Edit based MLE control (Windows): Unsupported (-1)
2023-09-12 09:25:05.435 dwtest[19171:4342448] Supports icons in the taskbar or similar system widget: Enabled (1)
2023-09-12 09:25:05.435 dwtest[19171:4342448] Supports the Tree Widget: Enabled (1)
2023-09-12 09:25:05.435 dwtest[19171:4342448] Supports arbitrary window placement: Enabled (1)
2023-09-12 09:25:05.435 dwtest[19171:4342448] Supports alternate container view modes: Unsupported (-1)
2023-09-12 09:25:05.435 dwtest[19171:4342448] Supports the DW_SIGNAL_HTML_MESSAGE callback: Enabled (1)
2023-09-12 09:25:05.435 dwtest[19171:4342448] Supports render safe drawing mode, limited to expose: Disabled (0)
2023-09-12 09:25:05.464 dwtest[19171:4342448] DW_SIGNAL_SWITCH_PAGE: Window: 4f011b30 PageNum: 0 Itemdata: 0
dbsoft commented 1 year ago

Did you run it via the dwtest.app bundle it created? There are UI issues if you run just the binary directly and not from the app bundle.

It absolutely supports MacOS on M1 it is one of my primary development targets.

IsaacShelton commented 1 year ago

Sorry nevermind, I got it to work

Had to bundle the dylibs with the app so it would work without having to install the dylibs

IsaacShelton commented 1 year ago

Does look like canvas is broken though

Screenshot 2023-09-12 at 3 26 11 PM

dbsoft commented 1 year ago

You can "sudo make install" to install the dylibs on the system and not require that. Odd about the canvas, I have not had any problems with that. Will take a look on my M1 Mac later today.

ghost commented 1 year ago

You can "sudo make install" to install the dylibs on the system and not require that. Odd about the canvas, I have not had any problems with that. Will take a look on my M1 Mac later today.

Any news on this?

dbsoft commented 1 year ago

Screenshot 2023-09-16 at 3 36 32 PM

It displays fine for me on my M1.

IsaacShelton commented 1 year ago

What macOS sdk are you using by chance?

My xcodebuild -showsdks looks something like this:

DriverKit SDKs:
    DriverKit 22.4                  -sdk driverkit22.4

iOS SDKs:
    iOS 16.4                        -sdk iphoneos16.4

iOS Additional SDKs:
    Asset Runtime SDK for macOS hosts targeting iOS 16.4    -sdk assetruntime.host.macosx.target.iphoneos16.4

iOS Simulator SDKs:
    Simulator - iOS 16.4            -sdk iphonesimulator16.4

macOS SDKs:
    macOS 13.3                      -sdk macosx13.3
    macOS 13.3                      -sdk macosx13.3

tvOS SDKs:
    tvOS 16.4                       -sdk appletvos16.4

tvOS Additional SDKs:
    Asset Runtime SDK for macOS hosts targeting tvOS 16.4   -sdk assetruntime.host.macosx.target.appletvos16.4

tvOS Simulator SDKs:
    Simulator - tvOS 16.4           -sdk appletvsimulator16.4

watchOS SDKs:
    watchOS 9.4                     -sdk watchos9.4

watchOS Additional SDKs:
    Asset Runtime SDK for macOS hosts targeting watchOS 9.4 -sdk assetruntime.host.macosx.target.watchos9.4

watchOS Simulator SDKs:
    Simulator - watchOS 9.4         -sdk watchsimulator9.4

I had to fix some IMP stuff in mac/dw.m in order to get it to compile, since my sdk doesn't allow calling IMPs without casting them to the correct function pointer

For example this line (there were about 8 or 9 of them): https://gist.github.com/IsaacShelton/c083ccced3c02dfb7e69adef77632464#file-dw-m-L324

dbsoft commented 1 year ago

Was using the Xcode 14 RC at that moment, I believe.

IsaacShelton commented 1 year ago

My copy must not be able to find a few dynamic libraries or something then

The logs don't say that there are any missing though

dbsoft commented 12 months ago

Shouldn't need anything additional... I am not sure... if you run it from the command line does it say anything on the console?

IsaacShelton commented 12 months ago

No, running it for a little bit just gives:

❯ dwtest.app/Contents/MacOS/dwtest
2023-10-01 23:26:45.087 dwtest[25350:4345442] DW_SIGNAL_SWITCH_PAGE: Window: 36e51340 PageNum: 0 Itemdata: 0
2023-10-01 23:26:48.466 dwtest[25350:4345442] Initial: container: 371cd800 containerinfo: 371cd800 icon: 299c960
2023-10-01 23:26:48.466 dwtest[25350:4345442] Initial: container: 371cd800 containerinfo: 371cd800 icon: 299cbe0
2023-10-01 23:26:48.466 dwtest[25350:4345442] Initial: container: 371cd800 containerinfo: 371cd800 icon: 299cbe0
2023-10-01 23:26:48.489 dwtest[25350:4345442] before appending 500 items to combobox using dw_listbox_list_append()
2023-10-01 23:26:48.490 dwtest[25350:4345442] after appending 500 items to combobox
2023-10-01 23:26:51.088 dwtest[25350:4345442] DW_SIGNAL_SWITCH_PAGE: Window: 36e51340 PageNum: 1 Itemdata: 0
2023-10-01 23:27:01.068 dwtest[25350:4345442] DW_SIGNAL_SWITCH_PAGE: Window: 36e51340 PageNum: 0 Itemdata: 0
2023-10-01 23:27:01.848 dwtest[25350:4345442] DW_SIGNAL_SWITCH_PAGE: Window: 36e51340 PageNum: 1 Itemdata: 0
2023-10-01 23:27:02.177 dwtest[25350:4345442] DW_SIGNAL_SWITCH_PAGE: Window: 36e51340 PageNum: 3 Itemdata: 0
2023-10-01 23:27:02.880 dwtest[25350:4345442] DW_SIGNAL_SWITCH_PAGE: Window: 36e51340 PageNum: 6 Itemdata: 0
2023-10-01 23:27:03.602 dwtest[25350:4345442] DW_SIGNAL_SWITCH_PAGE: Window: 36e51340 PageNum: 7 Itemdata: 0
2023-10-01 23:27:04.388 dwtest[25350:4345442] DW_SIGNAL_SWITCH_PAGE: Window: 36e51340 PageNum: 6 Itemdata: 0
2023-10-01 23:27:05.417 dwtest[25350:4345442] DW_SIGNAL_SWITCH_PAGE: Window: 36e51340 PageNum: 3 Itemdata: 0
2023-10-01 23:27:06.425 dwtest[25350:4345442] DW_SIGNAL_SWITCH_PAGE: Window: 36e51340 PageNum: 2 Itemdata: 0
2023-10-01 23:27:06.688 dwtest[25350:4345442] DW_SIGNAL_SWITCH_PAGE: Window: 36e51340 PageNum: 1 Itemdata: 0
2023-10-01 23:27:17.971 dwtest[25350:4345442] DW_SIGNAL_SWITCH_PAGE: Window: 36e51340 PageNum: 2 Itemdata: 0
2023-10-01 23:27:18.765 dwtest[25350:4345442] DW_SIGNAL_SWITCH_PAGE: Window: 36e51340 PageNum: 3 Itemdata: 0
2023-10-01 23:27:19.385 dwtest[25350:4345442] DW_SIGNAL_SWITCH_PAGE: Window: 36e51340 PageNum: 2 Itemdata: 0
2023-10-01 23:27:23.444 dwtest[25350:4345442] DW_SIGNAL_SWITCH_PAGE: Window: 36e51340 PageNum: 0 Itemdata: 0
2023-10-01 23:27:27.836 dwtest[25350:4345442] +[CATransaction synchronize] called within transaction
2023-10-01 23:27:27.913 dwtest[25350:4345442] +[CATransaction synchronize] called within transaction
2023-10-01 23:27:30.886 dwtest[25350:4345442] +[CATransaction synchronize] called within transaction
2023-10-01 23:27:30.927 dwtest[25350:4345442] +[CATransaction synchronize] called within transaction
2023-10-01 23:27:31.934 dwtest[25350:4345442] Folder picked: None
2023-10-01 23:27:43.865 dwtest[25350:4345442] dwtest exiting...