-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support osx idle on screensaver, screenlock
Add fah-screen-agent Support idle/not idle notifications Add tools.scons
- Loading branch information
1 parent
62e7b9f
commit 40209e2
Showing
11 changed files
with
589 additions
and
10 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 |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
*.app | ||
|
||
# Build byproducts | ||
/bin | ||
/build | ||
/package.txt | ||
/package-description.txt | ||
|
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 |
---|---|---|
|
@@ -67,12 +67,15 @@ if env['PLATFORM'] == 'win32' or int(env.get('cross_mingw', 0)): | |
duplicate = 0) | ||
Default(hide_console) | ||
|
||
tools = SConscript('src/tools.scons', variant_dir = 'build', duplicate = 0) | ||
Default(tools) | ||
Depends(tools, client) | ||
# Clean | ||
Clean(client, ['build', 'config.log']) | ||
Clean(client, ['bin', 'build', 'config.log']) | ||
|
||
# Dist | ||
docs = ['README.md', 'CHANGELOG.md', 'LICENSE'] | ||
distfiles = docs + [client, 'images/fahlogo.png'] | ||
distfiles = docs + client + tools + ['images/fahlogo.png'] | ||
if env['PLATFORM'] == 'posix': | ||
distfiles.append('install/lin/fah-client.service') | ||
if hide_console is not None: distfiles.append(hide_console) | ||
|
@@ -116,27 +119,33 @@ if 'package' in COMMAND_LINE_TARGETS: | |
home = '.', # abs path or relative to PWD | ||
pkg_scripts = 'build/install/osx/scripts', # relative to home | ||
root = './build/pkg/root', # abs path or relative to PWD | ||
sign_tools = ['usr/local/bin/fah-client'], # relative to root | ||
sign_tools = ['usr/local/bin/fah-*'], # relative to root | ||
must_close_apps = [ | ||
'org.foldingathome.fahviewer', | ||
'org.foldingathome.fahcontrol', | ||
'edu.stanford.folding.fahviewer', | ||
'edu.stanford.folding.fahcontrol', | ||
], | ||
pkg_files = [ | ||
[str(client[0]), 'usr/local/bin/', 0o755], | ||
['scripts/fahctl', 'usr/local/bin/', 0o755], | ||
['build/install/osx/fahclient.url', | ||
'Applications/Folding@home/[email protected]', 0o644], | ||
['build/install/osx/uninstall.url', | ||
'Applications/Folding@home/uninstall.url', 0o644], | ||
['build/install/osx/fah-screen-agent.plist', | ||
'Library/LaunchAgents/' + | ||
'org.foldingathome.fah-screen-agent.plist', 0o644], | ||
['build/install/osx/launchd.plist', | ||
'Library/LaunchDaemons/' + | ||
'org.foldingathome.fahclient.plist', 0o644] | ||
], | ||
pre_sign_callback = seticon, | ||
)] | ||
|
||
pkg_files = pkg_components[0]['pkg_files'] | ||
for tool in client + tools: | ||
pkg_files += [[str(tool), 'usr/local/bin/', 0o755]] | ||
|
||
# min pkg target macos 10.13 | ||
pkg_target = env.get('osx_min_ver', '10.13') | ||
ver = tuple([int(x) for x in pkg_target.split('.')]) | ||
|
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 @@ | ||
<?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>KeepAlive</key> | ||
<dict> | ||
<key>SuccessfulExit</key> | ||
<false/> | ||
</dict> | ||
<key>Label</key> | ||
<string>org.foldingathome.fah-screen-agent</string> | ||
<key>LimitLoadToSessionType</key> | ||
<string>Aqua</string> | ||
<key>LowPriorityIO</key> | ||
<true/> | ||
<key>Program</key> | ||
<string>/usr/local/bin/fah-screen-agent</string> | ||
<key>RunAtLoad</key> | ||
<true/> | ||
<key>StandardOutPath</key> | ||
<string>/dev/null</string> | ||
<key>Umask</key> | ||
<integer>18</integer> | ||
</dict> | ||
</plist> |
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
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
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,39 @@ | ||
/******************************************************************************\ | ||
This file is part of the Folding@home Client. | ||
The fah-client runs Folding@home protein folding simulations. | ||
Copyright (c) 2001-2023, foldingathome.org | ||
All rights reserved. | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License along | ||
with this program; if not, write to the Free Software Foundation, Inc., | ||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
For information regarding this software email: | ||
Joseph Coffland | ||
[email protected] | ||
\******************************************************************************/ | ||
|
||
#pragma once | ||
|
||
// Defines shared with fah-client | ||
|
||
#define SCREEN_IDLE_NOTIFICATION "org.foldingathome.screen.idle" | ||
#define SCREEN_NOT_IDLE_NOTIFICATION "org.foldingathome.screen.notidle" | ||
|
||
#define SCREEN_NOTIFICATION_INTERVAL 60 | ||
#define SCREEN_NOTIFICATION_LEEWAY 2 | ||
#define SCREEN_NOTIFICATION_EXPIRES (\ | ||
SCREEN_NOTIFICATION_INTERVAL + 2 * SCREEN_NOTIFICATION_LEEWAY + 1) |
Oops, something went wrong.