This repository has been archived by the owner on May 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(macOS) Possibility to build without WiFi functionality
The output binary will not have additional dependencies from wifi-related libraries
- Loading branch information
Showing
4 changed files
with
47 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
"args": ["-logging"], | ||
//"buildFlags": "-tags debug" | ||
"buildFlags": "" | ||
//"buildFlags": "-tags nowifi" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// +build darwin | ||
// +build darwin,!nowifi | ||
|
||
package wifiNotifier | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// +build darwin,nowifi | ||
|
||
package wifiNotifier | ||
|
||
import "github.com/ivpn/desktop-app-daemon/logger" | ||
|
||
// GetAvailableSSIDs returns the list of the names of available Wi-Fi networks | ||
func GetAvailableSSIDs() []string { | ||
return nil | ||
} | ||
|
||
// GetCurrentSSID returns current WiFi SSID | ||
func GetCurrentSSID() string { | ||
return "" | ||
} | ||
|
||
// GetCurrentNetworkSecurity returns current security mode | ||
func GetCurrentNetworkSecurity() WiFiSecurity { | ||
return WiFiSecurityUnknown | ||
} | ||
|
||
// SetWifiNotifier initializes a handler method 'OnWifiChanged' | ||
func SetWifiNotifier(cb func(string)) { | ||
logger.Debug("WiFi functionality disabled in this build") | ||
} |