Converting a shell script into a Mac OSX App

Converting a shell script into a Mac OSX App

SUBTITLE'S INFO:

Language: English

Type: Robot

Number of phrases: 217

Number of words: 1654

Number of symbols: 6613

DOWNLOAD SUBTITLES:

DOWNLOAD AUDIO AND VIDEO:

SUBTITLES:

Subtitles generated by robot
00:00
hello everyone welcome back in cool IT Help and now in this tutorial session I will convert a chalet script into a Mac OS X app yes you can see on my screen on the left hand side we have this notepad and on this notepad we have all these steps mentioned we will proceed with these steps one by one on the right hand side there's a folder this is my current working folder I will perform all these actions in this folder so guys let's get to started with the step one okay in the
00:31
first step we have to create a folder and we will put extension dot app so do the right-click select new folder and give a name of your choice my shell script dot app make sure you are giving this folder name with dot app extension once you do it click outside you get a pop-up box click on this ad now your folder will be converted to a app like we have done with the step one now we
01:04
will proceed for the step to do the right click on select so package contents now you are inside this folder create another folder with the name contents we have done the step two now we will proceed for the step three now we have to go inside this contents folder and again we have to create two more folders first one is Mac OS and the second one is resources so we have
01:36
created the first one I am creating the second one resources okay so far so good we have done three steps now we are going to perform the fourth step in the fourth step we have to create one file which is info dot plist file inside the contents folder all the contents for the
02:07
plist I have given in the description box so you guys can copy the contents and create a text document and paste it here for saving the time I have pasted all the contents right here in this agenda list file so I'm just copying from the left hand side and pasting here in the new text document okay let me show you something there are some important things like see of bundle get in full
02:40
strings so you can specify the company name and copyright information after that this is the key for the bundle identifier specification you can give the bundle identifier this is application name and the package type is bundle B and DL values and they we have a key and it's principle class because we're going to scrub run this script as executable that's why and another key C abundant executable that is specifying that we have a shell script as
03:11
executable so we have given the name main dot command so we will execute main dot command as executable after that we have this key CF bundle icon file which is specifying the name of the icon file and the last key is not necessary I am NOT describing you right here I will cover it up in next tutorial session okay guys we have completed these step 4
03:40
so I have pasted all the content often finished files now going to save this and give the name info dot palest click on the save so there's a text document just saved on the desktop now I'm going to copy and paste inside the contents folder so here is our info dot plist file and we have completed our
04:12
step for now going to proceed for this step 5 in this stuff 5 we have to go inside the Mac OS folder in this folder we have to create one file main dot command dot SH file make sure you are going to create they file with this name after that we will remove the dot H extension this is the important for this file this going to be a shell script file and we will put all the execution command or whatever the action you want to perform
04:43
you have to write a Shelly script code and you have to put inside this file for the execution and here on the left hand side this is the sample I have already written for saving the time you guys can this copy this content from the description as well so like this way from top line to the bottom line copy all the content open a new text document and paste it here as you can see this is the comment this is a standard comments
05:16
you can specify the file name created by copyright content and then you can get the local path for the application and finally here you have to give the Shelly script code that you want to execute so right here I have written a single line of shell script that will open a display box and hello cool IT Help will be displayed on that message box so we are
05:50
going to execute this line of code with the help of this Mac app okay now we going to save it so this is the important step please make sure have to save with main dot command dot SH file and now I'm going to click on the Save button and you can see file is saved now I will copy this from the desktop and I will put this file inside the Mac OS folder
06:23
now we are going back to our point three five and this is the important step we have to remove the extension dot as such from this file because this is going to be the executable so click on the rename and remove this SH extension from this place click outside and it will ask you for the action you have to select the second one use dot command ok it's done so this is the completely step
06:57
now in the fifth step we have to perform one more additional thing we have to grant some permission on this file because we are going to make it executable okay so we have to run this command so uhm OD u + X to do that I'm going to open the terminal so here's the terminal and we have to run that command and we have to grant some permission on this file so just drag and drop and you will get the path of this file so we
07:29
doing the CD and now we are inside the OS folder and just copy this command from the description box and execute this to grant some permission here we go permissions granted now we have completed the fifth step completely this is the major step don't forget to do that otherwise you will get some
07:59
permission warning and your app will not work ok guys I just closed down the terminal window and we have completed our fifth step now we are going to work on the step six at the sixth step we have to go inside the resources folder and we have to place one icns file so we are going to provide an icon to our app
08:30
to do this I have already created one icon with the extension a double P name is a double P dot icns and let me show you the information about this file and this series the dimension is only 32 by 32 and this is extension is icns you can download any icons from the net so you can just do some hands-on for the
09:05
with this app now we are inside I'm going to paste the icon app dot icns okay guys we have completed all the six-step now we are on the seventh step at this place we will verify our work and finally we will test it now we are inside the contents folder my quest folder resources folder and one plist file in the Mac OS we have the our
09:36
executable main dot command and inside the resources we have the icon file for our app let me show you one thing where we have configured our icns so you can see info dot plist content we have this key CF gondol icon file there we have specified the name of this file if you have got if you have any different name icns file so you can change the name at
10:07
this place so your icon will be accepted by this app so we have good to go we have done all these steps and we have verified our steps as well now the time for the testing okay so I'm going to create a new folder and we will perform the test as you can see we already placed the icon but it is not reflecting
10:38
so create a new folder test run outside and just copy this app from this working folder to the test run folder and paste it here and you will see your icon will be applied on this app this is our my shell script which is ready to run and now we will test it so guys just double-click on this and
11:12
see the action you can see I cannae set in the dock and the message box appeared hello cool IT help with ok and cancel return as we were expecting because we have placed single line of shell script code inside main dot command file if you have a multiple lines you also placed in the main dot command file ok I will run it again no worries it is working
11:43
perfectly fine I hope you guys found this video useful please like this tutorial and guys please subscribe my channel or you can press the bell icon so you will get the latest video updates on time and guys for now thanks for watching cool IT Help

DOWNLOAD SUBTITLES: