Skip to content

wdouglascampbell/build-openconnect-gui-macos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Instructions for Building OpenConnect-GUI for macOS

Introduction

The OpenConnect-GUI client provides a graphical interface to the OpenConnect VPN client for both macOS and Windows.

Currently, a package for the latest release of macOS is not provided. Since I wanted to use the same package on both macOS and Windows and have the latest release I decided to build the macOS package myself. Unfortunately there aren't any instructions provided and searching the web did not surface instructions by others attempting build the macOS package from source so I had to come up with something that worked for me by reading what I could find and a lot of trail and error.

The following instructions are my solution for building a universal package for OpenConnect-GUI that runs on macOS 12 and newer. Some of the complexity in getting everything to build properly was due to my desire to have the package work on macOS 12. Yes, it is EOL now but just recently so and it indicates that it supports macOS 12 so it seemed like it would be good come up with a complmentary solution. I believe if instead the package was only built to support macOS 13 and newer that a standard brew install of qt6 would suffice instead of building it from source to have a target of macOS 12.

Environment

The build process can be done on any current macOS but I didn't want to polute my machines working environment with unnecessary complexity so I elected to use a virtual machine for my environment running using UTM.

Install UTM and Create Virtual Machine

Download and Install UTM

Navigate to https://mac.getutm.app to download UTM and install.

Download IPSW File for latest macOS

Navigate to https://ipsw.me and download the latest ipsw file for macOS.

Create VM

Create a new VM using the ipsw file that you downloaded. Use a 100 GB size for the disk and 2 CPU cores.

Initial VM Configuration

Once the installation of the VM is complete you will want to perform a few additional configuration steps to prepare for the build process.

Turn Off Screen Locks and Power Saving Features

In order to reduce things that might slow down the VM it is helpful to disable screensavers, screen locking and power saving features.

Open Settings and do the following:

  1. Click Energy on the sidebar.
  2. Turn On "Prevent automatic sleeping when the display is off".
  3. Click Done.
  4. Click Screen Saver on the sidebar.
  5. Click Lock Screen Settings....
  6. Set "Start Screen Saver when inactive" to Never.
  7. Set "Turn display off when inactive" to Never.
  8. Set "Require password after screen saver begins or display is turned off" to Never.
  9. Enter password when prompted and click Modify Settings.
  10. Click Turn Off Screen Lock.

Give Terminal Permission to Update and Delete Other Applications

Open Settings and do the following:

  1. Click on Privacy & Security on the sidebar.
  2. Click on App Management.
  3. Click +.
  4. Enter password when prompted and click Modify Settings.
  5. Navigate to Applications then Utilities and select Terminal.
  6. Click Open.

Download and Install The Latest Xcode.

Note: There is a known issue that has existed for the past few years that prevents signing into the App Store from a macOS VM. Therefore, it is necessary to download Xcode directly. See:

  1. Navigate to https://xcodereleases.com.
  2. Click the Releases radio button.
  3. Click the Download link for the latest release. If prompted, log in using your Apple ID.
  4. Extract downloaded .xip file by double-clicking it in Finder.
  5. Move the extracted Xcode package to the Applications folder.
  6. Run Xcode and proceed through default setup process. (Note: There is no need to install the “Predictive Code Completion Model” if the option is checked so you can uncheck it.)

Download and Install macOS 13.3 SDK

  1. Download Xcode 14.2 (https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_14.2/Xcode_14.2.xip)
  2. Extract it by double-clicking Xcode_14.2.xip in the Downloads folder.
  3. Copy SDK 13.1 SDK to Xcode SDKs directory by copying and pasting the following command into Terminal:
sudo cp -RP ~/Downloads/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk
Delete Xcode.app from the Downloads folder to save space.

Note:  If you are presented with the following:
              "Terminal" would like to access files in your Downloads folder.
          Click Allow.

Copy and paste the following command into Termina:

rm -rf ~/Downloads/Xcode.app

Install Rosetta 2

Copy and paste the following command into Terminal:

softwareupdate --install-rosetta

Build Package

Keep in mind the whole process will likely take more than a day because of the amount of time it takes to build qt6 from source and the fact it needs to be done twice.

Download and run the following scripts in Terminal:

./build-x86_64.sh
./build-aarch64.sh
./build-universal.sh

About

Provides instruction for building OpenConnect-GUI for macOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages