/ OS X

关掉新版本 GPGMail 讨厌的订阅提示

GPGTools 是 Mac 上久负盛名的 GPG 套件,已经有十多年了。其中 GPGMail 作为 Apple Mail 的插件,是套件的一部分,用来加解密日常的邮件通信。

从今年六月份的更新开始,GPGMail 将会转为订阅制。这就意味着在试用期过后,必须要交订阅费才能接着使用 GPGMail。我个人对捐赠/买断没什么意见,但很不喜欢不提供在线服务的单机程序使用订阅制的收费方式。但是好在 GPGTools 本身是开源软件,因此可以自行编译一个 DRM Free 的版本。这不是盗版/破解

checkout 代码(假设你使用 Mojave)

git clone [email protected]:GPGTools/GPGMail.git
git checkout mojave

定位到 Source/GPGMailBundle.m 这个文件,找到 (BOOL)hasActiveContract 这个函数,让其直接返回 true。它现在应该长得像这个样子:

- (BOOL)hasActiveContract {
//    NSDictionary *contractInformation = [self contractInformation];
//    return [contractInformation[@"Active"] boolValue];
    return true;
}

导入依赖,然后就可以编译了

cd Dependencies
git clone https://github.com/GPGTools/Libmacgpg.git
cd ..
make

最后将 Dependencies/Libmacgpg/build/Release/Libmacgpg.framework 复制到 /Library/Frameworks (如果你之前没有安装过 GPGTools)。将 build/Releases/GPGMail.mailbundle 复制到 /Libray/Mail/Bundles。重启 Mail.app 并开启插件,搞定。

附:GPGMail 的开源许可证:

Copyright (c) 2000-2011, GPGMail project [email protected]
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
  notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
  notice, this list of conditions and the following disclaimer in the
  documentation and/or other materials provided with the distribution.
* No name of the GPGMail contributors may be used to endorse or promote
  products derived from this software without specific prior written
  permission.

THIS SOFTWARE IS PROVIDED BY THE GPGTools Project Team AND ITS CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY CONTRIBUTOR BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Note that some parts of the GPGMail distribution are under LGPL license: the
MacGPGME framework, the gpg-error and gpgme libraries. The present license does
not apply to these parts.

MacGPGME, copyright 2001-2008 MacGPG Project
gpg-error, copyright 2005-2008 g10 Code GmbH
gpgme, copyright 2001-2008 g10 Code GmbH

Many thanks to the original author Stéphane Corthsy .

For further information have a look at http://www.gpgtools.org.

关掉新版本 GPGMail 讨厌的订阅提示
Share this