mcskrzypczak Posted April 19, 2015 Share Posted April 19, 2015 (edited) Download get Install App workflow from Packal get Install App workflow direct download IntroductionThe Install App workflow speeds installation process (or rather copy) of applications downloaded outside of Mac App Store. The workflow is completely written using Bash Script.How it works?There are two ways to invoke that workflow: through keyword — install — which shows all eligible files/packages (.app package, .zip archive, .dmg image and .pkg installer) found in specified folder (default is ~/Downloads) and copy, run, mount or extract them dependably of what kind of file/package we choose; you can also use install name so Alfred will narrow results; through File Action Install App which behave in similar way as above.The Install App workflow behaves as follow: if you choose .app package it will be copied to /Applications folder; if you choose .pkg file it will be opened; if you choose .dmg file it will be mounted and searched for .app or .pkg to copy or run them; at the end the image will be unmounted; if you choose .zip file it will be unzipped into folder which will be searched for .app, .pkg or .dmg to copy, run or mount them; at the end the temp folder will be deleted; at the end of whole process you will be asked if you want to remove the source file. Tips to change folder to search for mentioned files you need to edit Script Filter element of workflow → uncomment SEARCHDIR variable and edit its valueRelease info 1.11: improve mounting dmg files – now works with images with EULA 1.10: displays app icon if user has that app already (eligible for app updates files) 1.9: bug fixes dramatically reduces workflow size (from ~700 KB to 150 KB) workflow now searches in subdirectories of main directory if workflow finds .app package it will display that app's real icon (not a placeholder) 1.8: bug fixes following last update the workflow will open installed application if it was opened 1.7: workflow checks now if app is already running and if so it asks to quit it1.6: fixed file matching fixed post-install notifications 1.5: unmount .dmg image after copying/installing app, remove temporary .zip folder after copying/installing app, ability to remove source files after copying/installing app (the dialog window will appear). 1.3 initial public release.ThanksI would like to thank Franz Greiling who inspired me to make this workflow with his own version. Edited May 18, 2015 by Maciej Skrzypczak 40-02 1 Link to comment
Florian Posted April 19, 2015 Share Posted April 19, 2015 There's a problem on Packal w/ the download... Sends you to a github 404 Link to comment
mcskrzypczak Posted April 20, 2015 Author Share Posted April 20, 2015 There's a problem on Packal w/ the download... Sends you to a github 404 Yeah, that was something at the Packal side. Should be fixed now. Enjoy Link to comment
Florian Posted April 20, 2015 Share Posted April 20, 2015 Great, it's working now :-) I have some feedback for you though: In the above picture, you can see your own workflow, and actual app (pacapong.app), a hidden R history file ".Rapp.history" (this is a software used in research for statistical analysis and the likes), and a folder "71135_katapult_zip" containing blender models, images and html files. I don't really think ".Rapp.history" and "71135_katapult_zip" have their place on this list. If you don't want to filter files by their extension, then at least you could try and explore them and see if they fit (the ".Rapp" file will not have the usual package content structure, the "katapult_zip" is actually a folder containing nothing that can be installed). My Download is not so very messy. It is, but I think it could be way worse, in which case I'd be lost in files suggested for install... Anyway, I like what you did ;-) mcskrzypczak 1 Link to comment
mcskrzypczak Posted April 20, 2015 Author Share Posted April 20, 2015 Great, it's working now :-) I have some feedback for you though: In the above picture, you can see your own workflow, and actual app (pacapong.app), a hidden R history file ".Rapp.history" (this is a software used in research for statistical analysis and the likes), and a folder "71135_katapult_zip" containing blender models, images and html files. I don't really think ".Rapp.history" and "71135_katapult_zip" have their place on this list. If you don't want to filter files by their extension, then at least you could try and explore them and see if they fit (the ".Rapp" file will not have the usual package content structure, the "katapult_zip" is actually a folder containing nothing that can be installed). My Download is not so very messy. It is, but I think it could be way worse, in which case I'd be lost in files suggested for install... Anyway, I like what you did ;-) Actually my workflow should filter files by their extension but in some circumstances it seems that it is not doing this properly. I will certainly look for solution for that issue. Thank you Florian for pointing that out! Link to comment
mcskrzypczak Posted April 20, 2015 Author Share Posted April 20, 2015 There is new update — 1.6 — with some bug fixes (thanks Florian): fixed file matching fixed post-install notifications I have updated my first post with download links: get Install App workflow from Packal get Install App workflow direct download Link to comment
mcskrzypczak Posted April 24, 2015 Author Share Posted April 24, 2015 And another update — 1.7: workflow checks now if app is already running and if so it asks to quit itI have updated my first post with download links: get Install App workflow from Packal get Install App workflow direct download Link to comment
Florian Posted April 24, 2015 Share Posted April 24, 2015 Hey just got an idea: you could also use the apps' icons, that'd look great Link to comment
mcskrzypczak Posted April 24, 2015 Author Share Posted April 24, 2015 Hey just got an idea: you could also use the apps' icons, that'd look great That's great idea! But how to make it? It would be easy for .app apps but what about other types – .zip, .dmg and .pkg? Link to comment
Florian Posted April 25, 2015 Share Posted April 25, 2015 That's great idea! But how to make it? It would be easy for .app apps but what about other types – .zip, .dmg and .pkg? No idea, sorry. Either these won't have a cool icon or maybe some already existing code out there can help you with this. But I have personally no idea. I was also thinking that you might want to do a deeper search, find apps in folders within the Download folder, that'd be cool too. Link to comment
mcskrzypczak Posted April 26, 2015 Author Share Posted April 26, 2015 1.8 update is here: bug fixes following last update the workflow will open installed application if it was opened I have updated my first post with download links: get Install App workflow from Packal get Install App workflow direct download Link to comment
mcskrzypczak Posted April 26, 2015 Author Share Posted April 26, 2015 No idea, sorry. Either these won't have a cool icon or maybe some already existing code out there can help you with this. But I have personally no idea. I was also thinking that you might want to do a deeper search, find apps in folders within the Download folder, that'd be cool too. I will look for a way to find the solution for app icons. Also thanks for idea to make deeper search. I'll definetely add this! Link to comment
Florian Posted April 26, 2015 Share Posted April 26, 2015 You seem to be developing this workflow pretty actively so I'll keep inputting: when dealing with .app files, why copy them and not move them? Then you wouldn't need to close the app first, and the user wouldn't have (albeit temporarily) twice the app on their computer... This happened to me this morning :-) Link to comment
mcskrzypczak Posted April 26, 2015 Author Share Posted April 26, 2015 1.9 update is here and contains: bug fixes dramatically reduces workflow size (from ~700 KB to 150 KB) workflow now searches in subdirectories of main directory if workflow finds .app package it will display that app's real icon (not a placeholder) I have updated my first post with download links: get Install App workflow from Packal get Install App workflow direct download Link to comment
mcskrzypczak Posted April 26, 2015 Author Share Posted April 26, 2015 (edited) No idea, sorry. Either these won't have a cool icon or maybe some already existing code out there can help you with this. But I have personally no idea. I was also thinking that you might want to do a deeper search, find apps in folders within the Download folder, that'd be cool too. You seem to be developing this workflow pretty actively so I'll keep inputting: when dealing with .app files, why copy them and not move them? Then you wouldn't need to close the app first, and the user wouldn't have (albeit temporarily) twice the app on their computer... This happened to me this morning :-) So I did successfully added ability to search subdirectories also. As well as „moving” .app packages which means it is still copied to /Applications folder but then the source file is deleted without prompt. The "cp" or "mv" commands are not so reliable as "rsync" command is (that I use) and that is why I decided to leave it as is only with mentioned addition – removing .app package. Now the app icons in resluts: I did get managed how to display app's icon if it is found in source directory (which also let's me to drastically reduce size of whole workflow), but I still did not solved how to add icons corresponding to apps inside of .zip, .dmg and .pkg files. But I will work on that. Edited April 26, 2015 by Maciej Skrzypczak Link to comment
mcskrzypczak Posted April 27, 2015 Author Share Posted April 27, 2015 Aaaand another update – 1.10: displays app icon if user has that app already (eligible for app updates files)I have updated my first post with download links: get Install App workflow from Packal get Install App workflow direct download Link to comment
Florian Posted April 27, 2015 Share Posted April 27, 2015 The "cp" or "mv" commands are not so reliable as "rsync" command is. Ok so then here's an idea: you `rsync` a temporary copy of the file, you `mv` the file, and then delete the temp copy. Then you don't need to close the app (except if the `mv` failed but then it'll only be rare cases). If the `mv` failed, you have the backup temp copy to start the process over. Link to comment
mcskrzypczak Posted April 30, 2015 Author Share Posted April 30, 2015 Ok so then here's an idea: you `rsync` a temporary copy of the file, you `mv` the file, and then delete the temp copy. Then you don't need to close the app (except if the `mv` failed but then it'll only be rare cases). If the `mv` failed, you have the backup temp copy to start the process over. Okay, to be clear, to know if I understand you. What you suggest is to copy app using `rsync` into temporary folder and then move it into /Applications folder in place of old app? If so, there are my thoughts: 1) you can not use `mv` command to replace existing folder. It works only if the folder exists but in other cases it will move new folder INTO old one. I could also mv just the contents of new folder into old one, so you will end up with old and new files and in some cases it can brake the app I think. 2) I do not think replacing app if it is already opened is safe and I would not want cause that someone would lose his files. Due to SSD popularity closing app, replacing it with `rsync` and open it up again takes just seconds but you will be sure that it all was made in safe way. If you think that I am exaggerating and there is no risk into replacing new app with old one I can search solutions using other languages (AppleScript, Python, etc.). Anyway thank you one more time for spending time on my workflow and made it better by providing such excellent feedback. Link to comment
Florian Posted April 30, 2015 Share Posted April 30, 2015 Not what I meant at all. Here it is: Create a BACKUP version of the app you want to install with the safe `rsync` method Try and `mv` the ORIGINAL app into /Applications Delete the BACKUP If `mv` worked, then you didn't need to close the app, this is ideal. If it didn't, then you had a backup copy to `rsync` into \Applications (in which case you will have to ask to close the app). But with this process, closing the app is only required rarely. Link to comment
mcskrzypczak Posted May 18, 2015 Author Share Posted May 18, 2015 Update 1.11: improve mounting dmg files – now works with images with EULAI have updated my first post with download links: get Install App workflow from Packal get Install App workflow direct download Link to comment
paulw Posted May 18, 2015 Share Posted May 18, 2015 Great! For those of us who like to keep our apps organized in folders, what about implementing a way to search for whether the app already exists in a subfolder in /Applications, and then moving the update to that same folder? Paul Link to comment
mcskrzypczak Posted May 18, 2015 Author Share Posted May 18, 2015 For those of us who like to keep our apps organized in folders, what about implementing a way to search for whether the app already exists in a subfolder in /Applications, and then moving the update to that same folder? Thank you Paul for feedback. I will try to implement that. Stay tuned. Link to comment
Florian Posted May 29, 2015 Share Posted May 29, 2015 Weird... Plus, I have nothing to install in my Download folder :-) Link to comment
Acidham Posted April 23, 2022 Share Posted April 23, 2022 @mcskrzypczak Is there a GIT repo to contribute? I implemented a few enhancements and improvements and would like to share. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now