Skip to content

Commit

Permalink
Allow macOS 10.11 for now
Browse files Browse the repository at this point in the history
IB-6801

Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma committed Dec 14, 2020
1 parent a4867c5 commit e2794f7
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 8 deletions.
35 changes: 28 additions & 7 deletions distribution.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/I
<![CDATA[
"SU_TITLE" = "eID Software";
"SU_ERROR" = "Error";
"SU_1013" = "macOS must be 10.13 or newer.";
"SU_1011" = "macOS must be 10.11 or newer.";
"SU_BASE" = "Base components";
"SU_SAFARI" = "Safari browser signing support";
"SU_FIREFOX" = "Firefox browser signing and authentication support";
Expand All @@ -50,7 +50,7 @@ https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/I
<![CDATA[
"SU_TITLE" = "eID tarkvara";
"SU_ERROR" = "Viga";
"SU_1013" = "macOS peab olema 10.13 või uuem.";
"SU_1011" = "macOS peab olema 10.11 või uuem.";
"SU_BASE" = "Baas komponendid";
"SU_SAFARI" = "Safari allkirjastamise tugi";
"SU_FIREFOX" = "Firefoxi allkirjastamise ja autentimise tugi";
Expand All @@ -63,7 +63,7 @@ https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/I
<![CDATA[
"SU_TITLE" = "eID Software";
"SU_ERROR" = "Error";
"SU_1013" = "macOS must be 10.13 or newer.";
"SU_1011" = "macOS must be 10.11 or newer.";
"SU_BASE" = "Base components";
"SU_SAFARI" = "Поддержка подпис. в Safari";
"SU_FIREFOX" = "Поддержка подпис. и аутентиф. в Firefox";
Expand All @@ -77,9 +77,9 @@ https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/I
<script>
<![CDATA[
function pm_install_check() {
if(system.compareVersions(system.version.ProductVersion, '10.13.0') < 0) {
if(system.compareVersions(system.version.ProductVersion, '10.11.0') < 0) {
my.result.title = system.localizedString('SU_ERROR');
my.result.message = system.localizedString('SU_1013');
my.result.message = system.localizedString('SU_1011');
my.result.type = 'Fatal';
return false;
}
Expand All @@ -92,6 +92,14 @@ function pm_safari_selected() {
my.target.receiptForIdentifier("ee.ria.firefox-token-signing") != null);
}
function pm_safari_old_enabled() {
return system.compareVersions(system.version.ProductVersion, '10.14') < 0;
}
function pm_safari_new_enabled() {
return system.compareVersions(system.version.ProductVersion, '10.12') >= 0;
}
function pm_firefox_selected() {
return my.target.receiptForIdentifier("ee.ria.open-eid") == null ||
my.target.receiptForIdentifier("ee.ria.firefox-pkcs11-loader") != null;
Expand Down Expand Up @@ -120,6 +128,14 @@ function pm_drivers_selected() {
(my.target.receiptForIdentifier("ee.ria.esteid-ctk-tokend") != null ||
my.target.receiptForIdentifier("org.opensc-project.mac") != null);
}
function pm_drivers_old_enabled() {
return system.compareVersions(system.version.ProductVersion, '10.12') < 0;
}
function pm_drivers_new_enabled() {
return system.compareVersions(system.version.ProductVersion, '10.12') >= 0;
}
]]>
</script>
<choices-outline>
Expand All @@ -135,7 +151,8 @@ function pm_drivers_selected() {
<pkg-ref id="ee.ria.open-eid">Open-EID.pkg</pkg-ref>
</choice>
<choice id="safari" title="SU_SAFARI" description="SU_SAFARI" start_selected="pm_safari_selected()">
<pkg-ref id="ee.ria.safari-token-signing">safari-token-signing.pkg</pkg-ref>
<pkg-ref id="ee.ria.safari-token-signing" active="pm_safari_new_enabled()">safari-token-signing.pkg</pkg-ref>
<pkg-ref id="ee.ria.firefox-token-signing" active="pm_safari_old_enabled()">firefox-token-signing.pkg</pkg-ref>
</choice>
<choice id="firefox" title="SU_FIREFOX" description="SU_FIREFOX" start_selected="pm_firefox_selected()">
<pkg-ref id="ee.ria.token-signing-firefox">token-signing-firefox.pkg</pkg-ref>
Expand All @@ -154,6 +171,10 @@ function pm_drivers_selected() {
</choice>
<choice id="drivers" title="SU_DRIVERS" description="SU_DRIVERS" start_selected="pm_drivers_selected()">
<pkg-ref id="org.opensc-project.mac">opensc.pkg</pkg-ref>
<pkg-ref id="ee.ria.esteid-ctk-tokend">esteid-ctk-tokend.pkg</pkg-ref>
<pkg-ref id="ee.ria.esteid-ctk-tokend" active="pm_drivers_new_enabled()">esteid-ctk-tokend.pkg</pkg-ref>
<pkg-ref id="com.idemia.awp.runtime" active="pm_drivers_old_enabled()">runtime.pkg</pkg-ref>
<pkg-ref id="com.idemia.awp.tokend" active="pm_drivers_old_enabled()">tokend.pkg</pkg-ref>
<pkg-ref id="com.idemia.awp.pkcs11" active="pm_drivers_old_enabled()">pkcs11.pkg</pkg-ref>
<pkg-ref id="com.idemia.awp.neutralgui" active="pm_drivers_old_enabled()">neutralgui.pkg</pkg-ref>
</choice>
</installer-gui-script>
5 changes: 4 additions & 1 deletion uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function remove_all {
sudo rm -rf /Library/PreferencePanes/id-updater.prefPane

echo 'Removing browser plug-ins and extensions'
sudo rm -rf \
sudo rm -rf /Library/Internet\ Plug-Ins/esteidfirefoxplugin.bundle \
/Library/Google/Chrome/NativeMessagingHosts/chrome-token-signing.app \
/Library/Google/Chrome/NativeMessagingHosts/ee.ria.esteid.json \
/Library/Application\ Support/Google/Chrome/External\ Extensions/ckjefchnfjhjfedoccjbhjpbncimppeg.json \
Expand All @@ -31,8 +31,10 @@ function remove_all {

echo 'Removing Drivers'
sudo /usr/local/bin/opensc-uninstall
echo y | sudo /Library/AWP/awp_uninstall.sh
sudo rm -rf /Library/Security/tokend/EstEID.tokend
sudo rm -rf /Applications/Utilities/EstEIDTokenApp.app
sudo killall -9 OTCryptokiGuiSvr

echo 'Cleaning up'
sudo pkgutil --forget ee.ria.open-eid
Expand All @@ -43,6 +45,7 @@ function remove_all {
sudo pkgutil --forget ee.ria.token-signing-chrome-policy
sudo pkgutil --forget ee.ria.chrome-token-signing-policy
sudo pkgutil --forget ee.ria.safari-token-signing
sudo pkgutil --forget ee.ria.firefox-token-signing
sudo pkgutil --forget ee.ria.firefox-pkcs11-loader
sudo pkgutil --forget ee.ria.esteid-tokend
sudo pkgutil --forget ee.ria.esteid-ctk-tokend
Expand Down

0 comments on commit e2794f7

Please sign in to comment.