Menu

Development-MacOS

Brad Lanam

Wiki Home
Developer Notes

otool -L <lib></lib>

vtool -show-build <lib or="" exec=""> # to see the min macos version</lib>

export MACOSX_DEPLOYMENT_TARGET=11

VLC Installation for development:

Start the VLC installer, drag the VLC installation to /Applications as normal.

Start the VLC installer, drag the VLC installation to $HOME/Applications. Rename to VLC3.app and VLC4.app.

Setting up MacOS
  • Users & Groups:

    • For each user:
      • Right click on user, advanced options, change directory to point
        to /Volumes/Users (Mojave and prior currently have symlinks).
        Need an extra admin account to change other accounts.
    • Add user to _developer group:
      • sudo dscl . append /Groups/_developer GroupMembership <username></username>
  • VNC:

    • General / Sharing:
      • Turn on screen sharing.
      • Screen Sharing: set VNC password
      • Turn on remote login.
      • For both screen sharing and remote login, make sure the allowed users and groups are correct.
  • Lock Screen:

    • login options : change to name and password.
    • add message to indicate which mac.
    • turn off screen saver
    • turn off 'turn off display'
  • Sound:

    • turn off ui sounds
    • turn down alert sounds
  • General / About:

    • set host name
  • Networking:

    • set up DNS servers
      • 1.1.1.1
      • 8.8.8.8
      • 2606:4700:4700::1111
      • 2001:4860:4860::8888
  • Mouse:

    • will need to plug in a mouse and reboot to have this visible.
      might need to be on the console.
    • turn off so-called natural scrolling
  • Add terminal with full disk access:
    Not necessary w/sequoia.

    • Security & Privacy
      • Privacy
        • Full Disk Access : add terminal.
  • /etc/paths:

    • /opt/local/bin
  • /etc/postfix/main.cf:

    • default_transport = smtp:localhost:8025 (or 8031)
  • Set hostname:

    • scutil --set HostName bll-mac.ballroomdj.org
  • /etc/ssh:

    • Copy the *key* files from one of the other multi-boot instances
      that all of the ssh keys for one machine are the same.
To reset the keychain password

security set-keychain-password

Software

Run this first to get all the bdj4 requirements installed
$HOME/bdj4/install/macos-pre-install-macports.sh

sudo port install autossh di rlwrap -- for bll
sudo port install check gmake cmake pkgconfig sshpass -- for bdj4.
sudo port uninstall gtk3
sudo port install gtk3-devel

Boot options

To boot into safe mode:
Hold down the Shift key.
To select a partition to boot:
Hold down the Alt key.
To restart to access disk utility, etc:
Hold down Meta-R.
To clear PRAM/NVRAM:
Hold down Meta-Alt-P-R.
To restart to restore from the internet:
Alt-D

To check the command line tools version:
pkgutil --pkg-info=com.apple.pkg.CLTools_Executables

MacOS GUI (Cocoa AppKit)

Stopped.

Constraints (alignment, fill):

Constraints are difficult to use, as the constraints require the widgets to be packed, and require that the neighboring widgets exist. This is not a good design for dynamic layouts.

Since the constraints require the widgets to be packed, all of the size-group, margin, etc. changes must be moved after the pack statement. This is not a big issue. Many are done already.

One possiblity is to keep track of the previous widget packed into the stack-view (separate start and end), then constraints can be set up with the current and the previous widget. Not sure how to handle centered and fill objects though.

I am wondering how these contraints work when a button is hidden.

Notebook:

Having the notebook put the tabs on the left doesn't work well. MacOS configures the tabs with vertical text, rather than horizontal text.

Need to re-work this to use a nstabviewcontroller so that the tabs can be formatted better. Also need nstabviewcontroller to get the images into the tabs. Will need to set Tab-Style-Unspecified and create my own buttons.

I also have the weird placement of 'set queue for playback' button. With gtk this button is forced into the notebook view. If I write my own tab handler, I can place this without any issue. There are a couple of options here. (a) I can re-work the gui so that the button placement is different, though that gets back to the original problem of where to put it. (b) Since I'm going to have to write my own tab handling for macos, placement will be easy. But this doesn't solve the issue for other guis in the future.

Fonts:

There doesn't seem to be any easy way to change the font for all widgets. I think the system-font size can be set, so that's one option. May need to set the font individually for every widget.

Text Spinbox:

I think, again, I will need to write my own. This can be copied from the GTK style. The native GTK version can be replaced, as their callbacks are complicated.

Solved issues:

Size groups: Set the trailing-anchor constraint to match all other widgets in the size group. Widgets must be packed before setting the size group.

Pack End: This works by using add-view at-index within the trailing gravity group to match what gtk does.

Margins: Could not find a good way to do this. Ended up wrapping all widgets in an NSView, which is not the recommended way. The layout guides seemed to need constraints, and constraints are hard to use due to being relative to the neighbors and requiring all neighbors to be packed. This may be re-worked if tracking the previous item works.

Developer Notes
Wiki Home


(Updated 2025-06-30 12:20:27; BDJ4 version 4.15.3.1)


Related

Wiki: Development-Developer Notes
Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.