<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Hi Community/Devs, Lets Help Each-Others, To Run OsxPortableApps in 64bit/Catalina macOSX</title>
		<link>http://freesmug.wikidot.com/forum/t-13404441/hi-community-devs-lets-help-each-others-to-run-osxportableap</link>
		<description>Posts in the discussion thread &quot;Hi Community/Devs, Lets Help Each-Others, To Run OsxPortableApps in 64bit/Catalina macOSX&quot; - To Run PortableFirefox In 64bit macOSX(Catalina/...) Let Us Help+Work To Update the Old Platypus into New, &amp; Change CocoaDialog InTo Pashua Dialog, etc, etc</description>
				<copyright></copyright>
		<lastBuildDate>Sun, 07 Jun 2026 20:07:21 +0000</lastBuildDate>
		
					<item>
				<guid>http://freesmug.wikidot.com/forum/t-13404441#post-4678700</guid>
				<title>Re: Hi Community/Devs, Lets Help Each-Others, To Run OsxPortableApps in 64bit/Catalina macOSX</title>
				<link>http://freesmug.wikidot.com/forum/t-13404441/hi-community-devs-lets-help-each-others-to-run-osxportableap#post-4678700</link>
				<description></description>
				<pubDate>Sat, 06 Jun 2020 12:43:41 +0000</pubDate>
				<wikidot:authorName>aterik</wikidot:authorName>				<wikidot:authorUserId>3080642</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>reserving this 3rd post to add more-info when it will be needed</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://freesmug.wikidot.com/forum/t-13404441#post-4676959</guid>
				<title>Re: Hi Community/Devs, Lets Help Each-Others, To Run OsxPortableApps in 64bit/Catalina macOSX</title>
				<link>http://freesmug.wikidot.com/forum/t-13404441/hi-community-devs-lets-help-each-others-to-run-osxportableap#post-4676959</link>
				<description></description>
				<pubDate>Fri, 05 Jun 2020 05:12:39 +0000</pubDate>
				<wikidot:authorName>aterik</wikidot:authorName>				<wikidot:authorUserId>3080642</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>now all usage of CocoaDialog, from above &quot;SCRIPT&quot; are changed, to use Pashua based dialog.</p> <p>i have temporarily renamed main &quot;SCRIPT&quot; from &quot;script&quot; into &quot;script.sh&quot; to test syntaxes in it:<br /> <span style="white-space: pre-wrap;">&#32;&#32;┌────────────────────────────────────────────</span><br /> <span style="white-space: pre-wrap;">&#32;&#32;│MacName:~&#32;MyUserName$&#32;</span><span style="color: green">sh -n /System/Volumes/Data/MyProjects/PortableFirefox/script.sh</span><br /> <span style="white-space: pre-wrap;">&#32;&#32;│MacName:~&#32;MyUserName$&#32;</span><span style="color: green">echo $?</span><br /> <span style="white-space: pre-wrap;">&#32;&#32;│MacName:~&#32;MyUserName$&#32;</span>0<br /> <span style="white-space: pre-wrap;">&#32;&#32;└────────────────────────────────────────────</span></p> <p>then tried to create a new Platypus based &quot;Portable Firefox OSX&quot; in macOSX 10.15.5 (Catalina),<br /> but getting errors,<br /> platypus can show which line of &quot;SCRIPT&quot; has error in some cases,<br /> fixing those.</p> <p>and my question related to <strong>PLATYPUS</strong> for previous DEV(s) &amp; to community, is:</p> <p>i have added these below 4-files + 2-folders + 2-app-bundles in platypus,<br /> are these suffice ? am i suppose to add anything else <strong>? ?</strong></p> <p>dir : English.lproj<br /> dir : profile<br /> bundle : Firefox.app<br /> bundle : Pashua.app<br /> icon-file : P_Firefox_Caution.icns<br /> icon-file : appIcon.icns<br /> sh-script-file : pashua.sh<br /> sh-script-file : script<br /> &#8230;all above files+directories+bundles are placed here:<br /> <span style="white-space: pre-wrap;">&#32;</span>/System/Volumes/Data/MyProjects/PortableFirefox/</p> <p>then, i have these settings in Platypus interface:<br /> Script Type : Shell : /bin/sh<br /> Script Path : /System/Volumes/Data/MyProjects/PortableFirefox/script<br /> Interface : Text Window<br /> Unselected options : Run with root privileges , Run in background , Accept dropped items<br /> Selected options : Remain running after execution</p> <p>after the platypus &quot;Create App&quot; button , &amp; it's build stages<br /> i click on new &quot;Portable Firefox OSX.app&quot; &#8230;<br /> icon on dock-bar keeps on bouncing, then finally it shows below various/ERRORs/prompts:</p> <p><span style="color: red">​Could not find disk: /Contents/Resources<br /> Could not find disk: /Contents/Resources<br /> mkdir: /Contents/Resources/profile: Read-only file system<br /> /System/Volumes/Data/MyProjects/PortableFirefox/Portable Firefox OSX.app/Contents/Resources/script: line 1213: /Contents/Resources/Firefox.app/Contents/MacOS/firefox-bin: No such file or directory<br /> 2020-06-05&#160;10:08:15.184 Pashua[10759:293245] CGImageDestinationFinalize failed for output type 'public.tiff'<br /> 2020-06-05&#160;10:08:15.184 Pashua[10760:293246] CGImageDestinationFinalize failed for output type 'public.tiff'</span></p> <ul> <li>So to check, i right-click on &quot;/System/Volumes/Data/MyProjects/PortableFirefox&quot; folder,<br /> &amp; select &quot;Get Info&quot; option, it shows:<br /> <span style="white-space: pre-wrap;">&#32;&#32;┌──────────────────</span><br /> <span style="white-space: pre-wrap;">&#32;&#32;│</span>Sharing &amp; Permissions:<br /> <span style="white-space: pre-wrap;">&#32;&#32;├──────────────────</span><br /> <span style="white-space: pre-wrap;">&#32;&#32;│&#32;</span>You have custom access<br /> <span style="white-space: pre-wrap;">&#32;&#32;├──────────────────</span><br /> <span style="white-space: pre-wrap;">&#32;&#32;│&#32;</span>MyUserName (Me) | Read &amp; Write<br /> <span style="white-space: pre-wrap;">&#32;&#32;│&#32;</span>wheel | Read only<br /> <span style="white-space: pre-wrap;">&#32;&#32;│&#32;</span>everyone | Read only<br /> <span style="white-space: pre-wrap;">&#32;&#32;└──────────────────</span></li> <li>and the &quot;profile&quot; folder's &quot;Get Info&quot; is:<br /> <span style="white-space: pre-wrap;">&#32;&#32;┌──────────────────</span><br /> <span style="white-space: pre-wrap;">&#32;&#32;│</span>Sharing &amp; Permissions:<br /> <span style="white-space: pre-wrap;">&#32;&#32;├──────────────────</span><br /> <span style="white-space: pre-wrap;">&#32;&#32;│&#32;</span>You can read &amp; write<br /> <span style="white-space: pre-wrap;">&#32;&#32;├──────────────────</span><br /> <span style="white-space: pre-wrap;">&#32;&#32;│&#32;</span>MyUserName (Me) | Read &amp; Write<br /> <span style="white-space: pre-wrap;">&#32;&#32;│&#32;</span>everyone | No Access<br /> <span style="white-space: pre-wrap;">&#32;&#32;└──────────────────</span></li> </ul> <p>&#8230; so to me it appears, that file/folder(s) permission(s) are fine, so it should get full Read+Write access, right ? or not ?</p> <p>in Pashu dialog's image item/object/type, i have used icon files, is that why Pashua showing those 2-errors ?</p> <p>Platypus generated .app is not showing Firefox fox/earth icon on its icon in Finder,<br /> ( i selected the &quot;appIcon.icns&quot; icon file )</p> <p>HELP PLEASE.</p> <p>EXTRA-NOTEs:</p> <ul> <li>to create &quot;MyProjects&quot; folder in my mac hard drive, i had to do these: Edit:<br /> <span style="white-space: pre-wrap;">&#32;&#32;┌───────────────────────</span><br /> <span style="white-space: pre-wrap;">&#32;&#32;│</span><span style="color: green">sudo nano /etc/synthetic.conf</span><br /> <span style="white-space: pre-wrap;">&#32;&#32;└───────────────────────</span><br /> and then add below 2-lines of settings:<br /> <span style="white-space: pre-wrap;">&#32;&#32;┌───────────────────────</span><br /> <span style="white-space: pre-wrap;">&#32;&#32;│</span>MyProjects<span style="white-space: pre-wrap;">&#32;&#32;&#32;&#32;</span>System/Volumes/Data/MyProjects<br /> <span style="white-space: pre-wrap;">&#32;&#32;│</span>Development<span style="white-space: pre-wrap;">&#32;&#32;&#32;&#32;</span>System/Volumes/Data/Development<br /> <span style="white-space: pre-wrap;">&#32;&#32;└───────────────────────</span><br /> <span style="white-space: pre-wrap;">&#32;&#32;&#32;</span>then Press Ctrl+X , Enter . Note: press &quot;tab&quot;-button after typing &quot;MyProjects&quot;/&quot;Development&quot;<br /> and Execute below Terminal/shell command(s) to create those 2-folders:<br /> <span style="white-space: pre-wrap;">&#32;&#32;┌───────────────────────</span><br /> <span style="white-space: pre-wrap;">&#32;&#32;│</span><span style="color: green">sudo mkdir -p /System/Volumes/Data/MyProjects</span><br /> <span style="white-space: pre-wrap;">&#32;&#32;│</span><span style="color: green">sudo mkdir -p /System/Volumes/Data/Development</span><br /> <span style="white-space: pre-wrap;">&#32;&#32;└───────────────────────</span><br /> and then you must Reboot.</li> <li>To see all files in Finder (inlcuding Hidden/System), i executed below 2-commands:<br /> <span style="white-space: pre-wrap;">&#32;&#32;┌───────────────────────</span><br /> <span style="white-space: pre-wrap;">&#32;&#32;│</span><span style="color: green">defaults write com.apple.finder AppleShowAllFiles TRUE</span><br /> <span style="white-space: pre-wrap;">&#32;&#32;│</span><span style="color: green">killall Finder</span><br /> <span style="white-space: pre-wrap;">&#32;&#32;└───────────────────────</span><br /> or, in &quot;Finder&quot;, press these 3-buttons together at-same-time: [⇧Shift] + [⌘Command] + [<sup>&gt;</sup><sub>.</sub>]</li> <li>in WikiDot based this (FreeSmug) forum, to indent a textLine : wrap 'space' char with @@ , like this @@ @@</li> </ul> <p>EDIT: utc Jun 06, 2020, 07:40am: added error related more info. added Extra-Note section.<br /> EDIT: utc Jun 05, 2020, 05:10pm: added errors here, shown by FF OSX app build with Platypus.<br /> EDIT: utc Jun 05, 2020, 03:45pm: added QUESTION on Platypus.<br /> EDIT: utc Jun 05, 2020, 03:42pm: added development status/build/output status of previous post/SCRIPT.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://freesmug.wikidot.com/forum/t-13404441#post-4675925</guid>
				<title>Hi Community/Devs, Lets Help Each-Others, To Run OsxPortableApps in 64bit/Catalina</title>
				<link>http://freesmug.wikidot.com/forum/t-13404441/hi-community-devs-lets-help-each-others-to-run-osxportableap#post-4675925</link>
				<description></description>
				<pubDate>Thu, 04 Jun 2020 09:07:14 +0000</pubDate>
				<wikidot:authorName>aterik</wikidot:authorName>				<wikidot:authorUserId>3080642</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi Community &amp; Developer(s),<br /> Let us please help each-others to Update the Platypus wrapper to a newer version &amp;<br /> change the CocoaDialog into Pashua dialog, to run older FreeSMUG/OsxPortableApps apps<br /> in 64-bit/Catalina macOSX.</p> <p>FF = Firefox . a web-browser from Mozilla Foundation.<br /> ESR = Extended Support Release.</p> <p>i use the PortableFirefoxOSX,<br /> &amp; have updated the FF inside this OsxPortableApp bundle:<br /> in one instance/folder i upd into FF v56.0.2 (the last security-updated gecko-based non-ESR Firefox),<br /> &amp; in another instance/folder updated FF to v52.9.0 (the last security-updated gecko-based Firefox-ESR),<br /> etc.</p> <p>my each gecko-based FF has lots of ADDONS/EXTENSIONS,etc which i (must) need for my research to investigate,<br /> those Addons are not yet available in servo/quantum based new Firefox, &amp; will not be anytime soon :(</p> <p>FF v56.0.2 dmg file's sha1: 79a0013664134ced2307c8e1ffa5d36f6256e8f,<br /> <span style="white-space: pre-wrap;">&#32;</span>md5: a5608df45832df3ff302a7ccbe7ec3f6, 54.5 MBytes,<br /> <span style="white-space: pre-wrap;">&#32;</span><a href="https://ftp.mozilla.org/pub/firefox/releases/56.0.2/">https://ftp.mozilla.org/pub/firefox/releases/56.0.2/</a></p> <p>FF v52.9.0 esr dmg file's sha1: d879f5423d79393f2384e0f97a5581f9d89d7977,<br /> <span style="white-space: pre-wrap;">&#32;</span>md5: 34e8280bb9b33ca202ba22cf9daf25e4, 82.8 MBytes,<br /> <span style="white-space: pre-wrap;">&#32;</span><a href="https://ftp.mozilla.org/pub/firefox/releases/52.9.0esr/">https://ftp.mozilla.org/pub/firefox/releases/52.9.0esr/</a></p> <p>( btw, any latest FF.app can also be placed+replaced inside the &quot;Portable Firefox.app&quot;<br /> &amp; still can be run fine in macOSX Sierra/10.12.x, .., (Mojave/10.14.x, ..,)<br /> but not in Catalina/10.15.x )</p> <p>i need-to/must run those (old) OsxPortableApps<br /> inside macOSX Sierra (10.12.x), Mojave (10.14.x) &amp; Catalina (10.15.x).</p> <p>Please HELP me &amp; let us help each-others to modify+update the codes,<br /> so that i &amp; other users who need-to , can continue to use them in mentioned+other macOSes,<br /> &amp; this effort will HELP+allow other/many users as well,<br /> to run PortableFirefox ( &amp; OTHER OSX PortableApps )<br /> not-only-in 64-bit-only macOSX (Catalina, &#8230;) , but also run in 64+32-bit supported macOSes<br /> (which were released before-Catalina) : in Mojave, &#8230;, Sierra, &#8230;, etc</p> <p>From release apps &amp; dates shown in this site &amp; in twitter, it appears that<br /> this/related site(s) only sharing/have PortableChromium OSX, which is based on &quot;Google&quot;-Chromium.</p> <p>Last &quot;Portable Firefox OSX&quot; : &quot;PortableFirefox_4.0.1_en-US-OSX_r4.1.dmg&quot;<br /> <span style="white-space: pre-wrap;">&#32;</span>( sha1: 50ff626452dfadb9cbb6a2a5e2ddf60848adf256,<br /> <span style="white-space: pre-wrap;">&#32;</span>md5: fa6691336e22a2d83e5629533b830300, 28.2 MBytes,<br /> <span style="white-space: pre-wrap;">&#32;</span><a href="https://sourceforge.net/projects/osxportableapps/files/Portable%20Firefox%20OS%20X/4.0.1%20r4.1/">https://sourceforge.net/projects/osxportableapps/files/Portable%20Firefox%20OS%20X/4.0.1%20r4.1/</a> )</p> <p>We/i will work on this &quot;SCRIPT&quot; FILE : <a href="http://www.freesmug.org/portableapps:code:firefox">http://www.freesmug.org/portableapps:code:firefox</a></p> <p>above SCRIPT file is located/found at below location inside .app bundle:<br /> <span style="font-size:smaller;"><tt>&quot;/MyPortableDrive/PortableApps/FF_for_Test/Portable Firefox OS X/Portable Firefox.app/Contents/Resources/script&quot;</tt></span></p> <p>i have updated this/above &quot;Shell script&quot; (&quot;SCRIPT&quot;) to use &quot;Pashua&quot; dialog instead of CocoaDialog,<br /> ( as there is no 64-bit CocoaDialog for Catalina/64bit macOSX yet afaik ) ,<br /> &amp; i added a version-number 4.1.3 myself, for now, for easier handling.</p> <p>is there a github/sourceforge page where i can submit this below updated 'script' codes<br /> for your/DEV's review &amp; modification &amp; addition ?</p> <p>i'm hoping community &amp; others devs will review &amp; help me &amp; help themselves &amp; others,<br /> to fix the shortcomings in my submitted new SCRIPT code:</p> <p>i have placed &quot;Pashua.app&quot;, &quot;Pashua.sh&quot;<br /> ( obtained from/via <a href="https://www.bluem.net/en/projects/pashua/">https://www.bluem.net/en/projects/pashua/</a> )<br /> into below Folder/Dir:<br /> <span style="font-size:smaller;"><tt>&quot;/MyPortableDrive/PortableApps/FF_for_Test/Portable Firefox OS X/Portable Firefox.app/Contents/Resources/&quot;</tt></span></p> <p>i have obtained NEW Platypus v5.3 portable app WRAPPER ( it seems 64-bit supported &amp; compatible with Catalina/64bit macOSX )<br /> from here: <a href="https://sveinbjorn.org/platypus">https://sveinbjorn.org/platypus</a><br /> ( and Platypus v4.9, which is for running 32-bit apps in Mojave/Sierra/etc ).</p> <p>HOW DO WE/I CREATE A NEW &quot;Portable Firefox&quot; binary-file ( based on NEW PLATYPUS v5.3 ) HERE ?<br /> <span style="font-size:smaller;"><tt>&quot;/MyPortableDrive/PortableApps/FF_for_Test/Portable Firefox OS X/Portable Firefox.app/Contents/MacOS/Portable Firefox&quot;</tt></span><br /> We/community/users/devs/i need to work to achieve above.</p> <p>and, in below here is i'm sharing my updated SCRIPT REVISION v4.1.3<br /> To View Updated Code &amp; To Collaborate/Contribute Codes, Please Go here in <a href="https://github.com/atErik/Portable-Apps-OS-X-64/blob/master/F/PortableFirefoxOSX64/script">GitHub</a></p> <div class="code"> <pre><code>#!/bin/sh -x ########################################################################## # # Portable Firefox OS X # $Revision: 4.1 # # The Contents of this file are made available subject to the terms # of the following license # # - GNU General Public License Version 3 # # Carlo Gandolfi, Paolo Portaluri January 2010 # # GNU General Public License Version 3 # ============================================= # Copyright 2006-2011 by: # Carlo Gandolfi - http://www.freesmug.org # Paolo Portaluri - http://plus2.it/~paolo/ # # 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 # 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, see &lt;http://www.gnu.org/licenses/&gt;. # ########################################################################## # Portable Firefox OS X # Revision: 4.1.3 # Modified by Erik T Ashfolk &lt;atErik at Out Look dot com&gt; # ______ &lt;______ at ________ dot ___&gt; # to use Pashua dialog (instead of CocoaDialog) &amp; new Platypus, etc # for 64bit macOSX (Catalina,...) compatibility. # # The Contents of this file are made available subject to the terms # of the following license+restrictions+permissions: # - GNU General Public License Version 3 (GPL v3) # - Do not use my/our contributions to kill/harm(or steal-from) any Human/Community,Earth,etc # Copyright (c) 2020 by Erik T Ashfolk - &lt;atErik at Out Look dot com&gt; # ... # # GPL v3 # 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 # 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, see &lt;http://www.gnu.org/license/&gt;. # ################################################################################# # Reset PATH PATH=/bin:/sbin:/usr/bin:/usr/sbin export PATH appID=Firefox appBin=firefox-bin # Modified by atErik : Changed below from &quot;userprefbase&quot; into &quot;userPref&quot; userPref=&quot;Library/Application Support&quot; # Modified by atErik : Changed below from &quot;userpref&quot; into &quot;userPrefBase&quot; userPrefBase=&quot;$HOME/$userPref/$appID/Profiles&quot; # export userPrefBase userCacheBase=&quot;$HOME/Library/Caches&quot; userCache=&quot;$userCacheBase/$appID&quot; PA_userBase=&quot;$1/Contents/Resources&quot; # export PA_userBase PA_userPref=&quot;$PA_userBase/profile&quot; copy_pref=&quot;$PA_userBase/CopyPref_Done&quot; CD=&quot;$PA_userBase/CocoaDialog.app/Contents/MacOS/CocoaDialog&quot; # export CD # Added/Modified by atErik, to use Pashua (instead of CocoaDialog) PD=&quot;$PA_userBase/Pashua.app/Contents/MacOS/Pashua&quot;; # export PD appICON=&quot;$PA_userBase/appIcon.icns&quot; # export appICON cautionICON=&quot;$PA_userBase/P_${appID}_Caution.icns&quot; # export cautionICON # Below line added by atErik, to use bash-functions inside &quot;pashua.sh&quot; file: # source &quot;$PA_userBase/pashua.sh&quot; # when above line is enabled, then below 2-functions are not necessary to enable here. # Temporarily including below 2-functions from &quot;pashua.sh&quot;: # ======================================================== # This section/function copied from Pashua example.sh file # Pashua’s source code is released under the Open Source Software (3-clause BSD license) # # Tries to find the Pashua executable in one of a few default search locations or in # a custom path passed as optional argument. When it can be found, the filesystem # path will be in $pashuapath, otherwise $pashuapath will be empty. The return value # is 0 if it can be found, 1 otherwise. # # Argument 1: Path to a folder containing Pashua.app (optional) # ======================================================== locate_pashua() { local bundlepath=&quot;Pashua.app/Contents/MacOS/Pashua&quot; local mypath=`dirname &quot;$0&quot;` pashuapath=&quot;&quot; if [ ! &quot;$1&quot; = &quot;&quot; ] then searchpaths[0]=&quot;$1/$bundlepath&quot; fi searchpaths[1]=&quot;$mypath/Pashua&quot; searchpaths[2]=&quot;$mypath/$bundlepath&quot; searchpaths[3]=&quot;./$bundlepath&quot; searchpaths[4]=&quot;/Applications/$bundlepath&quot; searchpaths[5]=&quot;$HOME/Applications/$bundlepath&quot; for searchpath in &quot;${searchpaths[@]}&quot; do if [ -f &quot;$searchpath&quot; -a -x &quot;$searchpath&quot; ] then pashuapath=$searchpath return 0 fi done return 1 } # ======================================================== # This section/function copied from Pashua example.sh file # Pashua’s source code is released under the Open Source Software (3-clause BSD license) # # Function for communicating with Pashua # # Argument 1: Configuration string # Argument 2: Path to a folder containing Pashua.app (optional) # ======================================================== pashua_run() { # Write config file local pashua_configfile=`/usr/bin/mktemp /tmp/pashua_XXXXXXXXX` echo &quot;$1&quot; &gt; &quot;$pashua_configfile&quot; locate_pashua &quot;$2&quot; if [ &quot;&quot; = &quot;$pashuapath&quot; ] then &gt;&amp;2 echo &quot;Error: Pashua could not be found&quot; exit 1 fi # Get result local result=$(&quot;$pashuapath&quot; &quot;$pashua_configfile&quot;) # Remove config file rm &quot;$pashua_configfile&quot; oldIFS=&quot;$IFS&quot; IFS=$'\n' # Parse result for line in $result do local name=$(echo $line | sed 's/^\([^=]*\)=.*$/\1/') local value=$(echo $line | sed 's/^[^=]*=\(.*\)$/\1/') eval $name='$value' done IFS=&quot;$oldIFS&quot; } # ======================================================== # CDokMsg # Modified by atErik : local, &quot;--yes-cancel&quot;/$3, $4/tooltip/tV # CocoaDialog Ok/Cancel message box # $1 &quot;text&quot; # $2 &quot;informative text&quot; # $3 optional &quot;--no-cancel&quot; = don't show a cancel button, &amp; &quot;--yes-cancel&quot; to show a Cancel button # $4 optional &quot;tooltip_img|tooltip_text|tooltip_okButton|tooltip_cancelButton&quot;, or specify &quot;-&quot; to show no-tooltip # ======================================================== function CDokMsg { # Modified by atErik : local, &quot;--yes-cancel&quot;/$3, tV/$4/tooltip local tV=&quot;&quot; local conf=&quot; # Set window title *.title = $1 # show an image imgOk.type = image imgOk.x = 50 imgOk.y = 50 imgOk.maxwidth = 64 imgOk.path = $appICON # Introductory text txtOk.type = text txtOk.default = $2 txtOk.height = 180 txtOk.width = 310 txtOk.x = 50 txtOk.y = 120 # Show an “Ok” general-button at default position okB.type = button okB.label = Ok &quot; # we will not specify okB.x or okB.y in above, # so that macOSX can place this general-button at-default position, left-bottom corner if [ ! -z $3 ] ; then if [ &quot;$3&quot; == &quot;--yes-cancel&quot; ] ; then conf=&quot;$conf # Add a “Cancel” button with default-label &amp; show in default-positon okCB.type = cancelbutton &quot; fi; fi; if [ ! -z $4 ] ; then if [ &quot;$4 &quot; != &quot; &quot; ] ; then if [ &quot;${4%%|*}&quot; != &quot;-&quot; ] ; then # tooltip msg for image conf=&quot;$conf imgOk.tooltip = ${4%%|*} &quot; fi; tV=${4#*|} if [ &quot;${tV%%|*}&quot; != &quot;-&quot; ] ; then # tooltip msg for text conf=&quot;$conf txtOk.tooltip = ${tV%%|*} &quot; fi; tV=${tV#*|} if [ &quot;${tV%%|*}&quot; != &quot;-&quot; ] ; then # tooltip msg for a button showing “Ok” conf=&quot;$conf okB.tooltip = ${tV%%|*} &quot; fi; if [ ! -z $3 ] ; then if [ &quot;$3&quot; == &quot;--yes-cancel&quot; ] ; then tV=${tV#*|} if [ &quot;${tV%%|*}&quot; != &quot;-&quot; ] ; then # tooltip msg for a button showing “Cancel”/etc conf=&quot;$conf okCB.tooltip = ${tV%%|*} &quot; fi; fi; fi; fi; fi; beep pashua_run &quot;$conf&quot; &quot;$PA_userBase&quot; # beep # &quot;$CD&quot; ok-msgbox --icon-file &quot;$appICON&quot; \ # --text &quot;$1&quot; --informative-text &quot;$2&quot; &quot;$3&quot; } function CDokMsgC { # Modified by atErik : local, &quot;--yes-cancel&quot;/$3, tV/$4/tooltip local tV=&quot;&quot; local conf=&quot; # Set window title *.title = $1 # show an image imgOkC.type = image imgOkC.x = 50 imgOkC.y = 50 imgOkC.maxwidth = 64 imgOkC.path = $cautionICON # Introductory text txtOkC.type = text txtOkC.default = $2 txtOkC.height = 180 txtOkC.width = 310 txtOkC.x = 50 txtOkC.y = 120 # Show an “Ok” general-button at default position bOkC.type = button bOkC.label = Ok &quot; # we will not specify okb.x or okb.y in above, # so that macOSX can place this general-button at-default position, left-bottom corner if [ ! -z $3 ] ; then if [ &quot;$3&quot; == &quot;--yes-cancel&quot; ] ; then conf=&quot;$conf # Add a “Cancel” button with default-label &amp; show in default-positon cbOkC.type = cancelbutton &quot; fi; fi; if [ ! -z $4 ] ; then if [ &quot;$4 &quot; != &quot; &quot; ] ; then if [ &quot;${4%%|*}&quot; != &quot;-&quot; ] ; then # tooltip msg for image conf=&quot;$conf imgOkC.tooltip = ${4%%|*} &quot; fi; tV=${4#*|} if [ &quot;${tV%%|*}&quot; != &quot;-&quot; ] ; then # tooltip msg for text conf=&quot;$conf txtOkC.tooltip = ${tV%%|*} &quot; fi; tV=${tV#*|} if [ &quot;${tV%%|*}&quot; != &quot;-&quot; ] ; then # tooltip msg for a button showing “Ok” conf=&quot;$conf bOkC.tooltip = ${tV%%|*} &quot; fi; if [ ! -z $3 ] ; then if [ &quot;$3&quot; == &quot;--yes-cancel&quot; ] ; then tV=${tV#*|} if [ &quot;${tV%%|*}&quot; != &quot;-&quot; ] ; then # tooltip msg for a button showing “Cancel”/etc conf=&quot;$conf cbOkC.tooltip = ${tV%%|*} &quot; fi; fi; fi; fi; fi; beep pashua_run &quot;$conf&quot; &quot;$PA_userBase&quot; # beep # &quot;$CD&quot; ok-msgbox --icon-file &quot;$cautionICON&quot; \ # --text &quot;$1&quot; --informative-text &quot;$2&quot; &quot;$3&quot; } function beep { /usr/bin/osascript &lt;&lt; EOT tell application &quot;Finder&quot; beep end tell EOT } # ======================================================== # PDbubble # Written by atErik, to use Pashua (instead of CocoaDialog) # $1 &quot;title text&quot; # $2 &quot;message or informative text&quot; # $3 &quot;icon/image path&quot; # $4 &quot;autoCloseTime&quot; is interger-numbers as seconds, or &quot;-&quot; for no-autoCloseTime # when &quot;-&quot; is specified as $4 then &quot;Ok&quot;-button will be shown # $5 &quot;tooltip_image&quot; msg : shows this msg when UI-pointer hovers/moves over the image shown in bubble-msg box, # or specify &quot;tooltip_image|tooltip_text|tooltip_okButton&quot;, or specify &quot;-&quot; or &quot;-|-|-&quot; to show no-tooltip # $6 &quot;bm1&quot;/&quot;bm2&quot;/... indicating dialog/bubble-message box at different positions, # (and textbox inside &quot;bmN&quot; msgbox can have different size &amp; position) # Use differnet numbered &quot;bmN&quot; bubble/dialog msg box, so that msgbox is shown without overlapping, # or specify &quot;bm1|bm1_x_position|bm1_y_position|text_height|text_width||text_x_position|text_y_position&quot; # ======================================================== function PDbubble { # Written by atErik, to use Pashua (instead of CocoaDialog) # NOTES: The GUI elements are displayed in the order in which they appear in the config string. # The only exception to this rule are buttons: the default button is always in the lower right # corner of the window, the cancel button (if defined) is located left to the default button # and any other buttons will appear in the lower left corner, from left to right, in the order # they were defined. local tV=&quot;&quot; local conf=&quot; # Set window title *.title = $1 # show an image imgBbl.type = image imgBbl.x = 50 imgBbl.y = 50 imgBbl.maxwidth = 64 imgBbl.path = $3 # Introductory text txtBbl.type = text txtBbl.default = $2 &quot; if [ ! -z $4 ] ; then # $4 is either &quot;-&quot; or &quot;integer-NUMBER&quot; if [ &quot;$4&quot; != &quot;-&quot; ] ; then conf=&quot;$conf # add a auto close timeout in seconds, for this shown dialog/bubble/msg box *.autoclosetime = $4 &quot; else if [ &quot;$4&quot; == &quot;-&quot; ] ; then conf=&quot;$conf # Show an “Ok” general-button at default-position BokBbl.type = button BokBbl.label = Ok &quot; # we will not specify okb.x or okb.y in above, # so that macOSX can place this general-button at-default position, left-bottom corner fi; fi; fi; if [ ! -z $5 ] ; then if [ &quot;$5 &quot; != &quot; &quot; ] ; then # &quot;tooltip_image|tooltip_text|tooltip_okButton&quot; or &quot;-&quot; or &quot;-|-|-&quot; if [ &quot;$5&quot; != &quot;-&quot; ] &amp;&amp; [ &quot;$5&quot; != &quot;-|-|-&quot; ] ; then if [ &quot;${5%%|*}&quot; != &quot;-&quot; ] ; then # tooltip msg for image conf=&quot;$conf imgBbl.tooltip = ${5%%|*} &quot; fi; tV=${5#*|} if [ &quot;${tV%%|*}&quot; != &quot;-&quot; ] ; then # tooltip msg for text conf=&quot;$conf txtBbl.tooltip = ${tV%%|*} &quot; fi; if [ &quot;$4&quot; == &quot;-&quot; ] ; then tV=${tV#*|} if [ &quot;${tV%%|*}&quot; != &quot;-&quot; ] ; then # tooltip msg for a button showing “Ok” conf=&quot;$conf BokBbl.tooltip = ${tV%%|*} &quot; fi; fi; fi; fi; fi; tV=&quot;&quot; if [ ! -z $6 ] ; then # &quot;bm1|bm1_x_position|bm1_y_position|text_height|text_width||text_x_position|text_y_position&quot; if [ &quot;${6:3:1}&quot; == &quot;|&quot; ] ; then tV=&quot;${6:4}&quot; conf=&quot;$conf # bmN dialog msg box's vertical x position *.x = ${tV%%|*} &quot; tV=${tV#*|} conf=&quot;$conf # bmN dialog msg box's horizontal y position *.y = ${tV%%|*} &quot; tV=${tV#*|} conf=&quot;$conf # height of text box/area inside bmN msgbox txtBbl.height = ${tV%%|*} &quot; tV=${tV#*|} conf=&quot;$conf # width of text box/area inside bmN msgbox txtBbl.width = ${tV%%|*} &quot; tV=${tV#*|} conf=&quot;$conf # vertical x position of text box/area inside bmN msgbox txtBbl.x = ${tV%%|*} &quot; tV=${tV#*|} conf=&quot;$conf # horizontal y position of text box/area inside bmN msgbox txtBbl.y = ${tV%%|*} &quot; else conf=&quot;$conf # vertical &amp; horizontal position of text box inside bubble/dialog msg box txtBbl.x = 50 txtBbl.y = 120 # height &amp; width of text box inside bubble/dialog msg box txtBbl.height = 100 txtBbl.width = 310 &quot; case &quot;${6:0:3}&quot; in ('bm1') # adding a fixed/specific vertical &amp; horizontal position, to show the “bm1” bubble/dialog msg box conf=&quot;$conf # vertical &amp; horizontal position of “bm1” bubble/dialog msg box *.x = 50 *.y = 400 &quot; ;; ('bm2') # adding a fixed/specific vertical &amp; horizontal position, to show the “bm2” bubble/dialog msg box conf=&quot;$conf # vertical &amp; horizontal position of “bm2” bubble/dialog msg box *.x = 200 *.y = 400 &quot; ;; ('bm3') # adding a fixed/specific vertical &amp; horizontal position, to show the “bm3” bubble/dialog msg box conf=&quot;$conf # vertical &amp; horizontal position of “bm3” bubble/dialog msg box *.x = 350 *.y = 400 &quot; ;; ('bm4') # adding a fixed/specific vertical &amp; horizontal position, to show the “bm4” bubble/dialog msg box conf=&quot;$conf # vertical &amp; horizontal position of “bm4” bubble/dialog msg box *.x = 500 *.y = 400 &quot; ;; esac; fi; else conf=&quot;$conf # vertical &amp; horizontal position of text box inside bubble/dialog msg box txtBbl.x = 50 txtBbl.y = 120 # height &amp; width of text box inside bubble/dialog msg box txtBbl.height = 100 txtBbl.width = 310 &quot; # We are not adding *.x &amp; *.y in above, # so that MacOS can show this bubble/dialog msg box in its default position fi; beep pashua_run &quot;$conf&quot; &quot;$PA_userBase&quot; } # ======================================================== # PDfileOrDirSelect # Written by atErik, to use Pashua (instead of CocoaDialog) # $1 &quot;title text&quot; # $2 &quot;label or informative text&quot; # $3 &quot;dirOrFileLocation&quot; = path/directoryOrFile location # $4 &quot;fileTypeExtension or directory&quot; = if its &quot;directory&quot; then only &quot;directory&quot; selection is allowed, # if its filetypes (i.e: &quot;jpg gif&quot;) then that/those fileType(s) selection is/are allowed # $5 optional &quot;tooltip_img|tooltip_txt|tooltip_fileBrowser|tooltip_okButton|tooltip_cancelButton&quot; # or specify &quot;-&quot; to show no-tooltip # ======================================================== function PDfileOrDirSelect { # Written by atErik, to use Pashua (instead of CocoaDialog) local tV=&quot;&quot; local conf=&quot; # Set window title *.title = $1 # show an image imgSlct.type = image imgSlct.x = 50 imgSlct.y = 50 imgSlct.maxwidth = 64 imgSlct.path = $appICON # Introductory text txtSlct.type = text txtSlct.default = $2 txtSlct.height = 100 txtSlct.width = 310 txtSlct.x = 50 txtSlct.y = 120 # Add a filesystem browser (openFileOrDirBrowser) SlctFB.type = openbrowser SlctFB.label = $2 # SlctFB.label = Example filesystem browser (textfield + open panel) SlctFB.width=380 SlctFB.height=350 SlctFB.default = $3 SlctFB.x = 180 SlctFB.y = 50 # Add a “Cancel” button with default-label &amp; show at default-positon SlctCB.type = cancelbutton # Show an “Ok” general-button at default-position SlctOkB.type = button SlctOkB.label = Ok &quot; # we will not specify SlctOkB.x or SlctOkB.y in above, # so that macOSX can place this general-button at-default position, left-bottom corner if [ ! -z $4 ] ; then # setting by-default mode to select &quot;directory&quot;: if [ &quot;$4&quot; != &quot;directory&quot; ] ; then conf=&quot;$conf # user-specified fileTypes selection is allowed SlctFB.filetype = $4 &quot; else conf=&quot;$conf # only-directory selection is allowed SlctFB.filetype = directory &quot; fi; else fi; if [ ! -z $5 ] ; then if [ &quot;$5 &quot; != &quot; &quot; ] ; then if [ &quot;${5%%|*}&quot; != &quot;-&quot; ] ; then # tooltip msg for img conf=&quot;$conf imgSlct.tooltip = ${5%%|*} &quot; fi; tV=${5#*|} if [ &quot;${tV%%|*}&quot; != &quot;-&quot; ] ; then # tooltip msg for text conf=&quot;$conf txtSlct.tooltip = ${tV%%|*} &quot; fi; tV=${tV#*|} if [ &quot;${tV%%|*}&quot; != &quot;-&quot; ] ; then # tooltip msg for openFileOrDirBrowser conf=&quot;$conf SlctFB.tooltip = ${tV%%|*} &quot; fi; tV=${tV#*|} if [ &quot;${tV%%|*}&quot; != &quot;-&quot; ] ; then # tooltip msg for a button showing “Ok” conf=&quot;$conf SlctOkB.tooltip = ${tV%%|*} &quot; fi; tV=${tV#*|} if [ &quot;${tV%%|*}&quot; != &quot;-&quot; ] ; then # tooltip msg for a button showing “Cancel”/etc conf=&quot;$conf SlctCB.tooltip = ${tV%%|*} &quot; fi; fi; fi; beep pashua_run &quot;$conf&quot; &quot;$PA_userBase&quot; } # ======================================================== # PDmultiButtons # Written by atErik, to use Pashua (instead of CocoaDialog) # $1 &quot;title text&quot; # $2 &quot;label or informative text&quot; # $3 &quot;app icon/image path&quot; = path/directory location # $4 &quot;buttonN_Show_Text&quot; : when 4th &amp; next items begin with &quot;button1_&quot;, &quot;button2_&quot;, etc, THEN # : text-specified after the 1st &quot;_&quot; will be displayed in the shown-button # : other-than 1st &quot;_&quot;, all other &quot;_&quot; will be converted into &quot;space&quot; symbol # ======================================================== function PDmultiButtons { # Written by atErik, to use Pashua (instead of CocoaDialog) local tV=&quot;&quot; local conf=&quot; # Set window title *.title = $1 # show an image imgMB.type = image imgMB.x = 50 imgMB.y = 50 imgMB.maxwidth = 64 imgMB.tooltip = This is an element of type “image” imgMB.path = $appICON # Introductory text txtMB.type = text txtMB.default = $2 txtMB.height = 180 txtMB.width = 310 txtMB.x = 50 txtMB.y = 120 txtMB.tooltip = This is an element of type “text” &quot; if [ ! -z $4 ] ; then if [ &quot;${4:0:8}&quot; == &quot;button1_&quot; ] ; then tV=&quot;${4:8}&quot;; # get all text after the 1st-underscore symbol tV=${tV//_/ }; # change all &quot;underscore&quot; into &quot;space&quot; character/symbol conf=&quot;$conf # add a button with user-specified text gb1MB.type = button gb1MB.label = $tV gb1MB.x = 260 gb1MB.y = 50 &quot; fi fi; if [ ! -z $5 ] ; then if [ &quot;${5:0:8}&quot; == &quot;button2_&quot; ] ; then tV=&quot;${5:8}&quot; tV=${tV//_/ } conf=&quot;$conf # add another button with user-specified text gb2MB.type = button gb2MB.label = $tV gb2MB.x = 260 gb2MB.y = 140 &quot; fi fi; if [ ! -z $6 ] ; then if [ &quot;${6:0:8}&quot; == &quot;button3_&quot; ] ; then tV=&quot;${6:8}&quot; tV=${tV//_/ } # &quot;Configuration error: Element “gb3” lacks a type attribute. In other words: you have to add a line like the following one: gb3.type = textfield&quot; conf=&quot;$conf # add another button with user-specified text gb3MB.type = button gb3MB.label = $tV gb3MB.x = 260 gb3MB.y = 240 &quot; fi fi; if [ ! -z $7 ] ; then if [ &quot;${7:0:8}&quot; == &quot;button4_&quot; ] ; then tV=&quot;${7:8}&quot; tV=${tV//_/ } conf=&quot;$conf # add another button with user-specified text, in another row, under the previous 3-buttons gb4MB.type = button gb4MB.label = $tV gb4MB.x = 300 gb4MB.y = 50 &quot; fi fi; beep pashua_run &quot;$conf&quot; &quot;$PA_userBase&quot; } # ======================================================== # PDprogressBarDirsFilesCpOrMv # Written by atErik, to use Pashua (instead of CocoaDialog) # $1 &quot;Operation | title text&quot; : Operation can be &quot;Copy&quot; or &quot;Move&quot; : either Copy or Move operation # &quot;title text&quot; part is for displaying given text on title of the shown dialog box # $2 &quot;Source Folder/File&quot; # $3 &quot;Destination Folder/File&quot; # $4 &quot;Elapsed_Time | Refresh_Time&quot; : Files+Dirs ReCounting Event Occurred How Many Seconds After Beginning # &quot;RefreshTime&quot; is indicating the time after which current dialog box is removed, &amp; new updated is shown # $5 &quot;extra info 1&quot; : Multi Lines are separated by &quot;|&quot; symbol , use &quot;-&quot; to keep it empty # $6 &quot;extra info 2&quot; : use &quot;-&quot; to keep it empty # $7...$9 : format: &quot;ProgressBAR/PERCENT_NUMBER|nominatorNumber|denominatorNumber&quot; # $7 is for Files, $8 is for Directories, $9 is for Size # ======================================================== function PDprogressBarDirsFilesCpOrMv { local tV=&quot;&quot; Src=&quot;&quot; Dest=&quot;&quot; oped=&quot;copied&quot; tymP=&quot;&quot; local cp=1 tymPsd=0 p1=0 p1n=0 p1d=0 p2=0 p2n=0 p2d=0 p3=0 p3n=0 p3d=0 local L1=&quot;&quot; L2=&quot;&quot; L3=&quot;&quot; L4=&quot;&quot; L5=&quot;&quot; L6=&quot;&quot; L7=&quot;&quot; L8=&quot;&quot; L9=&quot;&quot; local conf=&quot;&quot; # local CpOrMv=&quot;&quot; if [ ! -z $1 ] ; then tV=${1%%|*} if [ &quot;$tV&quot; == &quot;Move&quot; ]; then # CpOrMv=&quot;mv&quot; cp=0 #elif [ &quot;$tV&quot; == &quot;Copy&quot; ]; then # CpOrMv=&quot;cp -R&quot; fi conf=&quot; # Set window title *.title = ${1#*|} &quot; fi if [ ! -z $2 ] ; then Src=$2 fi if [ ! -z $3 ] ; then Dest=$3 fi if [ ! -z $4 ] ; then # Getting Elapsed Time: tymPsd=${4%%|*} # Getting Refresh Time: # adding Auto-Closing TIMEOUT in seconds for this dialog/progress/bar/info msg box conf=&quot;$conf # auto close this dialog box after this second(s) *.autoclosetime = ${4#*|} &quot; fi if [ ! -z $7 ] ; then # 1ST &quot;ProgressBarNUMBER|nominator|denominator&quot; for FILES # &quot;progressBarNUMBER|CopiedNumberOrAmount|TotalNumberOrAmount&quot; tV=&quot;${7#*|}&quot; p1n=${tV%%|*} tV=${tV#*|} p1d=${tV%%|*} # Calculating the PERCENT-NUMBER for What % amount of FILES are so far Copied: # p1=$((200*$p1n/$p1d % 2 + 100*$p1n/$p1d)) p1=$(( ($p1n*1000/$p1d+5)/10 )) fi; if [ ! -z $8 ] ; then # 2ND &quot;ProgressBarNUMBER|nominator|denominator&quot; for DIRECTORIES # &quot;progressBarNUMBER|CopiedNumberOrAmount|TotalNumberOrAmount&quot; tV=&quot;${8#*|}&quot; p2n=${tV%%|*} tV=${tV#*|} p2d=${tV%%|*} # Calculating the PERCENT-NUMBER for What % amount of DIRECTORIES/FOLDERS are so far Copied: # p2=$((200*$p2n/$p2d % 2 + 100*$p2n/$p2d)) p2=$(( ($p2n*1000/$p2d+5)/10 )) fi; if [ ! -z $9 ] ; then # 3RD &quot;ProgressBarNUMBER|nominator|denominator&quot; for SIZE # &quot;progressBarNUMBER|CopiedNumberOrAmount|TotalNumberOrAmount&quot; tV=&quot;${9#*|}&quot; p3n=${tV%%|*} tV=${tV#*|} p3d=${tV%%|*} # Calculating the PERCENT-NUMBER for What % amount of DATA-SIZE/MegaBYTES are so far Copied: # p3=$((200*$p3n/$p3d % 2 + 100*$p3n/$p3d)) # p3=$(( ($p3n*1000/$p3d+5)/10 )) # We will add PERCENTAGE for FILES &amp; DIRS SIZE, later # p3=0 fi; # PERCENT-AMOUNT CAN BE CONVERTED INTO A TEXT-BASED PROGRESS BAR SHOWN ON GUI DIALOG BOX EASILY, # we will improve it later, now lets focus on core/important functions, stability, security of other codes if [ &quot;$cp&quot; -eq 0 ] ; then oped=&quot;moved&quot; fi; if [ &quot;$tymPsd&quot; -gt 60 ] ; then tymP=&quot;$(( $tymPsd / 60 )) minute(s) &amp; $(( $tymPsd % 60 )) second(s)&quot; else tymP=&quot;$tymPsd second(s)&quot; fi; # Later, PERCENT % will be shown as a [****** ] based ProgressBar on this Pashua GUI dialog box L1=&quot;${1}ing...[return]&quot; L2=&quot;From: \&quot;$Src\&quot;[return]&quot; L3=&quot;To: \&quot;$Dest\&quot;[return]&quot; L4=&quot;Total $p1d files &amp; $p2d directories ( $pfCTS )[return]&quot; L5=&quot;So far $oped: ${p1}% : $p1n file(s)[return]&quot; L6=&quot;So far $oped: ${p2}% : $p2n directory(s)[return]&quot; L7=&quot;So far $oped: Total Size calculation for Files &amp; Dirs is now off[return]&quot; L8=&quot;Time Elapsed/Passed since $1 started: $tymP[return]&quot; L9=&quot;Info will be updated after ${4#*|}-seconds, so PLEASE WAIT...&quot; # Adding text box(es) to show all info: conf=&quot; # Introductory text txt1Prgrs.type = text txt1Prgrs.height = 180 txt1Prgrs.width = 500 txt1Prgrs.x = 35 txt1Prgrs.y = 200 txt1Prgrs.default = ${L1}${L2}${L3}${L4}${L5}${L6}${L7}${L8}${L9} &quot; # txt2Prgrs.type = text # txt3Prgrs.type = text # txt4Prgrs.type = text pashua_run &quot;$conf&quot; &quot;$PA_userBase&quot; } # ======================================================== # bsd_command_check # Check that the required BSD command are installed # ======================================================== function command_check_msg { # Modified by atErik : adding 'local' local message1=&quot;One or more *BSD commands* to run Portable $appID were not found on \ this machine. You must install the BSD Subsystem package that is in the \ following folder on disk 1 of your Mac OS X installation DVD:\n/Welcome to Mac \ OS X/Optional Installs.\n\nNow quit.&quot; local button=` /usr/bin/osascript &lt;&lt; EOT tell application &quot;Finder&quot; beep display dialog &quot;$message1&quot; buttons {&quot;Quit&quot;} \ with icon caution default button &quot;Quit&quot; set result to button returned of result end tell EOT` if test &quot;$button&quot; == &quot;Quit&quot;; then # Quit application exit 112 fi } function bsd_command_check { # written by Patrick Luby # Modified by atErik : adding 'local', wait df du cut tail find wc local commands=&quot;awk cp defaults diskutil echo grep ln mkfifo mkdir mv plutil ps rm sed sleep touch wait df du cut tail find wc&quot; for i in $commands ; do if [ ! -x &quot;/usr/bin/$i&quot; -a ! -x &quot;/bin/$i&quot; -a ! -x &quot;/usr/sbin/$i&quot; -a ! -x &quot;/sbin/$i&quot; ] ; then # Return 96 + 16 if a command is not found command_check_msg; exit 112; fi done } # ======================================================== # osx_version_check # Check that the user is running Mac OS X 10.4 or higher # ======================================================== function version_check_msg { # Modified by atErik : adding 'local' local message1=&quot;You are running OS X version $version.\n\ Portable $appID can only be opened on Mac OS X 10.4 or higher.&quot; local button=`/usr/bin/osascript &lt;&lt; EOT tell application &quot;Finder&quot; beep display dialog &quot;$message1&quot; buttons {&quot;Quit&quot;} \ with icon caution default button &quot;Quit&quot; set result to button returned of result end tell EOT` if test &quot;$button&quot; == &quot;Quit&quot;; then # Quit application exit 113 fi } function osx_version_check { # written by Patrick Luby # Modified by atErik : adding 'local' local version=&quot;&quot;; if [ -x &quot;/usr/bin/sw_vers&quot; ] ; then # Return 96 + 17 if it is a bad version version=`/usr/bin/sw_vers | grep '^ProductVersion:' | awk '{ print $2 }'` case &quot;$version&quot; in 10.[0123]) version_check_msg ; exit 113;; 10.[0123].*) version_check_msg ; exit 113;; esac fi } # ======================================================== # quitApp # Check if local app is open and quit # ======================================================== function quitApp { # Modified by atErik : adding 'local' local rv=0; if ps cx | grep '[0-9] '&quot;$appBin&quot;'$' &gt; /dev/null; then rv=` CDokMsg &quot;$appID is already running on this system&quot; \ &quot;Only one copy can be run at a time. \ Quit runnig $appID and reopen Portable $appID.&quot; &quot;--no-cancel&quot; ` if [ &quot;$rv&quot; == &quot;1&quot; ] ; then # Quit application exit 0 fi fi } # ======================================================== # check_p_asf # Check and create Portable Application Support folders # ======================================================== function check_p_asf { # Modified by atErik : adding 'local' # &quot;Read Only&quot; string in till OsX 10.5 local readonly5=`diskutil info &quot;$PA_userBase&quot; | grep &quot;Read Only&quot; | awk '{ print $3 }'` # &quot;Read-Only Volume:&quot; string on OsX 10.6 local readonly6=`diskutil info &quot;$PA_userBase&quot; | grep &quot;Read-Only Volume&quot; | awk '{ print $3 }'` if [ &quot;$readonly5&quot; = Yes ] || [ &quot;$readonly6&quot; = Yes ]; then CDokMsgC &quot;Portable $appID is on a locked volume&quot; &quot;Portable $appID can't \ be opened on a locked volume. Now quit.&quot; &quot;--no-cancel&quot; &gt; /dev/null exit 0 else if [ ! -d &quot;$PA_userPref&quot; ] ; then mkdir -p &quot;$PA_userPref&quot; fi fi } # ======================================================== # copy_local_pref # Copy local preferences to Portable Application # ======================================================== function select_profile { # Modified by atErik : adding 'local', &quot;chosen&quot;, PDfileOrDirSelect local rv=0; rvpf=` PDfileOrDirSelect &quot;Select local $appID Profile folder&quot; \ &quot;Look for a folder named \&quot;********.default\&quot; or similar.&quot; \ &quot;$userPrefBase&quot; &quot;directory&quot; ` # rvpf=` &quot;$CD&quot; fileselect --title &quot;Select local $appID Profile folder&quot; \ # --text &quot;Look for a folder named \&quot;********.default\&quot; or similar.&quot; \ # --select-only-directories --with-directory &quot;$userPrefBase&quot; ` if [ -f &quot;$rvpf/prefs.js&quot; ] ; then profilepath=&quot;$rvpf&quot; export profilepath else rv=` CDokMsgC &quot;$appID Profile folder not selected&quot; \ &quot;Sorry you have not chosen/selected $appID Profile folder. You have selected: \&quot;$rvpf\&quot;. Try again?&quot; ` if [ &quot;$rv&quot; == &quot;1&quot; ] ; then select_profile elif [ &quot;$rv&quot; == &quot;2&quot; ] ; then rv=` CDokMsg &quot;Portable $appID now quit&quot; \ &quot;You have not chosen/selected $appID Profile folder, now Portable $appID quit.&quot; \ &quot;--no-cancel&quot; ` if [ &quot;$rv&quot; == &quot;1&quot; ] ; then # Quit application exit 0 fi fi fi } function runCopyPref { # written by Kevin Hendricks # Modified by atErik : converting codes for Pashua-dialog based PDprogressBar local pfTD=0 ; # Portable Firefox Total Dirs (Number of total Directories) local pfTF=0 ; # Total Files (Number of total Files) local pfTS=0 ; # &quot;Dir+File Size Not-Counted&quot; ; # Total Size of all Dirs &amp; Files local pfCTD=0 ; # Total Number of Copied Dirs local pfCTF=0 ; # Ttl_Num of Copied Files local pfCTS=$pfTS ; # Total SIZE(MegaBytes/...) Copied Dirs &amp; Files local pfCTP=0 ; # Number of seconds/Time Passed # local pfCTDp=0 ; # Percent % of Copied Dirs # local pfCTFp=0 ; # % of Copied Files # local pfCTSp=0 ; # % of Copied Dirs+Files SIZE local UniqNumbr=5 ; # an Unique Number (interger number), except &quot;1&quot; &amp; except What Other OsxPortableFirefox Using local FIFO_pOsxFt=&quot;/tmp/pOsxFt${UniqNumbr}&quot; ; # temp purpose fifo file-name . It needs to have an UNIQUE-NUMBER in filename local FIFO_pOsxFps=&quot;/tmp/pOsxFps${UniqNumbr}&quot; ; # contains fifo file-name for Source-profile folder-name local FIFO_pOsxFpd=&quot;/tmp/pOsxFpd${UniqNumbr}&quot; ; # ... Destination-profile folder-name local i=0 s=0 rm -f &quot;/tmp/pOsxFt1&quot; ; # a temp fifo to pass the UniqNumber number to sub-process mkfifo &quot;/tmp/pOsxFt1&quot; rm -f &quot;$FIFO_pOsxFt&quot; ; # remove previous fifo file (if it wasn't removed earlier) mkfifo &quot;$FIFO_pOsxFt&quot; ; # create a (temp) fifo file, as its persistent/accessible across different processes rm -f &quot;$FIFO_pOsxFps&quot; mkfifo &quot;$FIFO_pOsxFps&quot; rm -f &quot;$FIFO_pOsxFpd&quot; mkfifo &quot;$FIFO_pOsxFpd&quot; # Getting directory-location of profile from &quot;profilepath&quot; ENV Variable: rvpf=&quot;$profilepath&quot; # Getting TOTAL-NUMBER of files &amp; sub-dirs count, in SOURCE-PROFILE folder/directory, before copy-process: pfTD=`find &quot;$rvpf/&quot; -type d -print | wc -c` pfTF=`find &quot;$rvpf/&quot; -type f -print | wc -c` # For now, avoiding finding total size of all files+dirs, as it takes longer time: # pfTS=0 PDprogressBarDirsFilesCpOrMv &quot;Copy|Copying $appID Profile&quot; &quot;$rvpf&quot; &quot;$PA_userPref&quot; \ &quot;${pfCTP}|$s&quot; &quot;-&quot; &quot;-&quot; &quot;p1|$pfCTF|$pfTF&quot; &quot;p2|$pfCTD|$pfTD&quot; # &quot;$CD&quot; progressbar --indeterminate --title &quot;Copying $appID Profile&quot; \ # --text &quot;Copying \&quot;$rvpf\&quot;. Please wait...&quot; &lt; /tmp/hpipe &amp; # FD = File Descriptor # exec 3&lt;&gt; /tmp/hpipe exec 3&lt;&gt; &quot;$FIFO_pOsxFt&quot; exec 4&lt;&gt; &quot;$FIFO_pOsxFps&quot; exec 5&lt;&gt; &quot;$FIFO_pOsxFpd&quot; exec 6&lt;&gt; &quot;/tmp/pOsxFt1&quot; # echo -n . &gt;&amp;3 echo -n &quot;$rvpf&quot; &gt;&amp;4 echo -n &quot;$PA_userPref&quot; &gt;&amp;5 echo -n &quot;$UniqNumbr&quot; &gt;&amp;6 # SECONDS=0 ; sleep 5 ; echo $SECONDS ; # output will be &quot;5&quot; after 5-seconds-of-sleep SECONDS=0 # Below section inside { ... } will be run under a different sub-process in background (to copy files) # below section can be another script-file too, &amp; then it can be run/initiated/started by this function { # This is a sub-process section code, (it is to be run/executed in the background) # Obtaining data from fifo pipe(s): exec 6&lt;&gt; &quot;/tmp/pOsxFt1&quot; UniqN=&quot;$(&lt; &quot;/tmp/pOsxFt1&quot;)&quot; wait # exec 6&gt;&amp;- # wait exec &gt;&quot;/tmp/pOsxFt1&quot; # Deleting the fifo pipe(s): rm -f &quot;/tmp/pOsxFt1&quot; exec 4&lt;&gt; &quot;/tmp/pOsxFps${UniqN}&quot; srcProfile=&quot;$(&lt; &quot;/tmp/pOsxFps${UniqN}&quot;)&quot; wait # exec 4&gt;&amp;- # wait exec &gt;&quot;/tmp/pOsxFps${UniqN}&quot; rm -f &quot;/tmp/pOsxFps${UniqN}&quot; exec 5&lt;&gt; &quot;/tmp/pOsxFpd${UniqN}&quot; destProfile=&quot;$(&lt; &quot;/tmp/pOsxFpd${UniqN}&quot;)&quot; wait # exec 5&gt;&amp;- # wait exec &gt;&quot;/tmp/pOsxFpd${UniqN}&quot; rm -f &quot;/tmp/pOsxFpd${UniqN}&quot; # Below fifo/pipe we will use to transfer data back to the function which created this sub-process: exec 3&lt;&gt; &quot;/tmp/pOsxFt${UniqN}&quot; # Add your commands/work below, for which a progressive bar/info-msg box will be shown+updated: # At-end of your commands/work, write &quot;pfC_done&quot; or &quot;pfC_fail&quot; word/data into fifo/pipe # BEGIN all of your commands/work here: # cp -R &quot;$rvpf/&quot; &quot;$PA_userPref&quot; # cp -R &quot;$srcProfile/&quot; &quot;$destProfile&quot; &amp;&amp; { echo -n &quot;pfC_done&quot; &gt;&amp;3 ; } || { echo -n &quot;pfC_fail&quot; &gt;&amp;3 ; }; cp -R &quot;$srcProfile/&quot; &quot;$destProfile&quot; &amp;&amp; { echo -n &quot;pfC_done&quot; &gt; &quot;/tmp/pOsxFt${UniqN}&quot; ; } || { echo -n &quot;pfC_fail&quot; &gt; &quot;/tmp/pOsxFt${UniqN}&quot; ; }; # END of your commands. # deleting the fifo, which we were using to send &quot;done&quot;/&quot;fail&quot; msg wait exec &gt;&quot;/tmp/pOsxFt${UniqN}&quot; rm -f &quot;/tmp/pOsxFt${UniqN}&quot; } &amp; # ... Back to the Function which initiated/ran the above sub-process (in background) to Copy files. # when fifo/pipe still exists then delete each, except one fifo that we will monitor: sleep 1 if [ -p &quot;/tmp/pOsxFt1&quot; ] ; then exec 6&gt;&amp;- wait # sleep 1 exec &gt;&quot;/tmp/pOsxFt1&quot; rm -f &quot;/tmp/pOsxFt1&quot; fi; if [ -p &quot;$FIFO_pOsxFps&quot; ] ; then exec 4&gt;&amp;- wait # sleep 1 exec &gt;&quot;$FIFO_pOsxFps&quot; rm -f &quot;$FIFO_pOsxFps&quot; fi; if [ -p &quot;$FIFO_pOsxFpd&quot; ] ; then exec 5&gt;&amp;- wait # sleep 1 exec &gt;&quot;$FIFO_pOsxFpd&quot; rm -f &quot;$FIFO_pOsxFpd&quot; fi; # Repeatedly check if background operation completed or not: while [ &quot;$(&lt; &quot;$FIFO_pOsxFt&quot;)&quot; != &quot;pfC_done&quot; ] || [ &quot;$(&lt; &quot;$FIFO_pOsxFt&quot;)&quot; != &quot;pfC_fail&quot; ] ; do i=$(( $i+1 )) # setting different update times for the PDprogressBar dialog case &quot;$i&quot; in (1) s=2; ;; (2|3|4) s=3; ;; (5) s=4; ;; (*) s=5; ;; esac sleep $s # Finding-out the number of files &amp; dirs so-far copied into DESTINATION profile folder/directory: pfCTD=`find &quot;$PA_userPref/&quot; -type d -print | wc -c` pfCTF=`find &quot;$PA_userPref/&quot; -type f -print | wc -c` # pfCTS=&quot;Dir+File Size Not-Counted&quot; pfCTP=$SECONDS # Finding PERCENT of files &amp; dirs which are copied # pfCTFp=$((200*$pfCTF/$pfTF % 2 + 100*$pfCTF/$pfTF)) # pfCTFp=$(( ($pfCTF*1000/$pfTF+5)/10 )) # pfCTDp=$((200*$pfCTD/$pfTD % 2 + 100*$pfCTD/$pfTD)) # pfCTFp=$(( ($pfCTD*1000/$pfTD+5)/10 )) # pfCTSp=0 # Show updated info on PDprogressBar dialog box: PDprogressBarDirsFilesCpOrMv &quot;Copy|Copying $appID Profile&quot; &quot;$rvpf&quot; &quot;$PA_userPref&quot; \ &quot;${pfCTP}|$s&quot; &quot;-&quot; &quot;-&quot; &quot;p1|$pfCTF|$pfTF&quot; &quot;p2|$pfCTD|$pfTD&quot; if [ ! -p &quot;$FIFO_pOsxFt&quot; ] ; then break fi; # done &lt; &quot;$FIFO_pOsxFt&quot; done # We will erase the last fifo with Unique number, which we were using to receive &quot;done&quot;/&quot;fail&quot; msg: if [ -p &quot;$FIFO_pOsxFt&quot; ] ; then exec 3&gt;&amp;- # wait rm -f &quot;$FIFO_pOsxFt&quot; fi } function check_asf { if [ -d &quot;$PA_userPref&quot; ] ; then # delete PA_userPref if it still exist rm -Rf &quot;$PA_userPref&quot; else mkdir -p &quot;$PA_userPref&quot; fi } # copy Preferences Folder function copy_pf { # Modified by atErik : adding 'local', PDbubble local userPrefSize=`du -hc &quot;$userPrefBase&quot; | cut -f1 | tail -1` local freeSize=`df -H &quot;$PA_userBase&quot; | tail -1 | awk '{print $4}'` local bUserPrefSize=`du -c &quot;$userPrefBase&quot; | cut -f1 | tail -1` local bFreeSize=`df &quot;$PA_userBase&quot; | tail -1 | awk '{print $4}'` local rv=0; if [ $bUserPrefSize -lt $bFreeSize ] ; then # Getting directory-location of profile from &quot;profilepath&quot; ENV Variable: rvpf=&quot;$profilepath&quot; rv=` CDokMsg &quot;Copy $appID Profile&quot; \ &quot;Your $appID Profile folder \&quot;$rvpf\&quot; is $userPrefSize. \ You have $freeSize available. Copy to Portable $appID?&quot; ` if [ &quot;$rv&quot; == &quot;1&quot; ] ; then if check_asf ; runCopyPref ; then touch -f &quot;$copy_pref&quot; PDbubble &quot;$appID Profile copied&quot; \ &quot;Local $appID Profile copied to Portable $appID with success.&quot; \ &quot;$appICON&quot; &quot;20&quot; # &quot;$CD&quot; bubble --title &quot;$appID Profile copied&quot; --text &quot;Local \ # $appID Profile copied to Portable $appID with success.&quot; \ # --icon-file &quot;$appICON&quot; else PDbubble &quot;$appID Profile copy error&quot; \ &quot;An error occurred copying $appID Profile to Portable $appID.&quot; \ &quot;$cautionICON&quot; &quot;-&quot; # &quot;$CD&quot; bubble --title &quot;$appID Profile copy error&quot; \ # --text &quot;An error occurred copying $appID Profile to Portable $appID.&quot; \ # --icon-file &quot;$cautionICON&quot; --no-timeout fi fi else CDokMsgC &quot;No space to copy $appID Profile&quot; \ &quot;Your $appID Profile folder is $userPrefSize. \ You have $freeSize available. There is not enough space. Portable $appID will \ open without copy existing $appID Profile.&quot; &quot;--no-cancel&quot; &gt; /dev/null fi } function copy_local_pref { # Modified by atErik : adding 'local' local text=&quot;&quot; local informativeText=&quot;&quot; local rv=0 if [ ! -f &quot;$copy_pref&quot; ] &amp;&amp; [ -d &quot;$userPrefBase&quot; ] ; then beep text=&quot;Copy local Profile&quot; informativeText=&quot;Copy the existing $appID Profile \ on this system to Portable $appID?&quot; rv=` PDmultiButtons &quot;$text&quot; &quot;$informativeText&quot; &quot;$appICON&quot; \ &quot;button1_Copy&quot; &quot;button2_Don't_Copy&quot; &quot;button3_Never&quot; ` # rv=` &quot;$CD&quot; msgbox --no-newline --icon-file &quot;$appICON&quot; \ # --text &quot;$text&quot; --informative-text &quot;$informativeText&quot; \ # --button1 &quot;Copy&quot; --button2 &quot;Don't Copy&quot; --button3 &quot;Never&quot; ` if [ &quot;$rv&quot; == &quot;1&quot; ] ; then select_profile copy_pf elif [ &quot;$rv&quot; == &quot;3&quot; ] ; then touch -f &quot;$copy_pref&quot; fi fi } # ======================================================== # bkup/recover cache bu=bkup=backup # BackUp existing cache # ======================================================== function bkup_cache { if [ -d &quot;$userCache&quot; ] ; then mv &quot;$userCache&quot; &quot;$userCache.pabu&quot; fi } function recover_cache { if [ -d &quot;$userCache.pabu&quot; ] ; then mv &quot;$userCache.pabu&quot; &quot;$userCache&quot; fi } function remove_p_cache { if [ -d &quot;$userCache&quot; ] ; then rm -rf &quot;$userCache&quot; fi } # ======================================================== # run # Open Portable Application # ======================================================== function run_app { &quot;$PA_userBase/$appID.app/Contents/MacOS/$appBin&quot; -profile &quot;$PA_userPref&quot; } # ======================================================== # open_p_app # Run Portable Application script # ======================================================== function set_p_app { bkup_cache # Backup exixting Cache folder } function close_p_app { remove_p_cache # Remove portable cache recover_cache # Restore existing cache } function open_p_app { # Modified by atErik : PDbubble if set_p_app ; then PDbubble &quot;Portable $appID setup ok&quot; \ &quot;Portable $appID open with success.&quot; &quot;$appICON&quot; &quot;-&quot; &amp; # &quot;$CD&quot; bubble --title &quot;Portable $appID setup ok&quot; \ # --text &quot;Portable $appID open with success.&quot; --icon-file &quot;$appICON&quot; &amp; else CDokMsgC &quot;Portable $appID setup error&quot; \ &quot;An error occour while opening portable preferences. Now quit.&quot; &quot;--no-cancel&quot; &gt; /dev/null close_p_app exit 0 fi run_app # Run application from external drive if close_p_app ; then PDbubble &quot;Portable $appID quit&quot; \ &quot;Portable $appID quit with success.&quot; &quot;$appICON&quot; &amp; # &quot;$CD&quot; bubble --title &quot;Portable $appID quit&quot; \ # --text &quot;Portable $appID quit with success.&quot; --icon-file &quot;$appICON&quot; &amp; else CDokMsgC &quot;Portable $appID quit error&quot; \ &quot;Portable $appID can't restore local cache.&quot; &quot;--no-cancel&quot; &gt; /dev/null fi } bsd_command_check osx_version_check check_p_asf quitApp copy_local_pref open_p_app exit 0</code></pre></div> <p>i will keep updating above codes in SCRIPT, (whenever possible).</p> <p>and add more info on how to change the old Platypus into new one, in the next post, for this topic/thread.</p> <p>Please HELP to solve this (updating the old Platypus &amp; changing/switching<br /> the CocoaDialog into Pashua dialog),<br /> so that We/users can (continue to) use PortableFirefox/etc on 64bit/Catalina/&#8230; macOSX.</p> <p>Please SHARE+add your HELPFUL suggestions/codes/improvements, THANKS in advance.</p> <p>WHAT I'M WORKING-ON, trying to solve/figure-out (now or when i checked this last time) :</p> <ul> <li>in v4.1 script, inside some function, why &quot;$rvpf&quot; variable was used in such way that it holds a/some path,<br /> but this variable isn't defined in main script, ( so i changed code so it gets a path value from &quot;$profilepath&quot; env var,<br /> the &quot;$profilepath&quot; was exported as env var in function select_profile ,<br /> when multiple PortableFirefox (from different parent dirs) will be run then using same &quot;profilepath&quot; env var will conflict or not ?</li> <li>solved (partially, for now) : Pashua doesn't support ProgressBar type of dialog<br /> so i could not change that part of the old-codes.<br /> but it must be changed into something, (as CocoaDialog does not work in Catalina).<br /> So i have planned to show a text-based BAR/line on a GUI dialog, &amp; update it after (few/one)-second(s),<br /> dialog will be shown in same x/y co-ordinate, &amp; auto-closed after 1 second,<br /> &amp; then updated text-based BAR/line will be shown at same co-ordinate,<br /> until 100% is reached, or job is done.</li> </ul> <p>EDIT: utc: Jun6, 2020, 05:08am: updated codes (to v4.1.3), changed codes related to fifo, &quot;gbN&quot; button type, etc<br /> EDIT: utc: Jun5, 2020, 03:12pm: updated codes (to v4.1.2) with a (Pashua based) ProgressBar function to show what % of (profile-storage) files+dirs are copied.<br /> EDIT: utc: Jun4, 2020, 01:10pm: added a separate copyright notice.<br /> EDIT: utc: Jun4, 2020, 10:50am: a note on Pashua dialog's lack of ProgressBar.<br /> EDIT: utc: Jun4, 2020, 10:30am: added updated codes v4.1.1 here for the PA Firefox OSX &quot;script&quot; v4.1, &amp; added hash/checksum of few files.<br /> EDIT: utc: Jun4, 2020, 09:00am: Thanks to Dev Carlo Gandolfi for this forum, &amp; for allowing to comment on script page.</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>