diff options
author | Rahul P | 2019-11-27 11:30:56 +0530 |
---|---|---|
committer | GitHub | 2019-11-27 11:30:56 +0530 |
commit | b62a760722cbccfa86374e17f1c4115658cee7bf (patch) | |
tree | f5b7265c37d54d0cef76648a1b6ec67e3bef279a | |
parent | 9b03e1583d7606377e70115b5fb615def4f9f55a (diff) | |
parent | a8a9475bf48390119f605fef4c468c07c2d32301 (diff) | |
download | eSim-b62a760722cbccfa86374e17f1c4115658cee7bf.tar.gz eSim-b62a760722cbccfa86374e17f1c4115658cee7bf.tar.bz2 eSim-b62a760722cbccfa86374e17f1c4115658cee7bf.zip |
Merge pull request #118 from rahulp13/master
update installer
-rwxr-xr-x | esim-start.sh | 3 | ||||
-rwxr-xr-x | esim.desktop | 15 | ||||
-rwxr-xr-x | install-eSim.sh | 96 | ||||
-rw-r--r-- | src/modelParamXML/Nghdl/.gitignore | 4 | ||||
-rw-r--r-- | src/modelParamXML/Nghdl/full_adder_sl.xml | 1 | ||||
-rw-r--r-- | src/modelParamXML/Nghdl/inverter.xml | 1 |
6 files changed, 42 insertions, 78 deletions
diff --git a/esim-start.sh b/esim-start.sh deleted file mode 100755 index 1b83b81d..00000000 --- a/esim-start.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -cd /home/rahul/Downloads/eSim-1.1.2/src/frontEnd -python2 Application.py diff --git a/esim.desktop b/esim.desktop deleted file mode 100755 index dacaac74..00000000 --- a/esim.desktop +++ /dev/null @@ -1,15 +0,0 @@ -[Desktop Entry] -Version=1.0.2 -Name=eSim -Comment=EDA Tools -GenericName=eSim -Keywords=eda-tools -Exec=esim %u -Terminal=false -X-MultipleArgs=false -Type=Application -Icon=/home/fossee/.esim/logo.png -Categories=Development; -MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall; -StartupNotify=true -Actions=NewWindow;NewPrivateWindow; diff --git a/install-eSim.sh b/install-eSim.sh index 46f60561..2e6e8299 100755 --- a/install-eSim.sh +++ b/install-eSim.sh @@ -15,7 +15,7 @@ # NOTES: --- # AUTHOR: Fahim Khan, Rahul Paknikar, Saurabh Bansode # ORGANIZATION: FOSSEE at IIT Bombay. -# CREATED: Wednesday 23 October 2019 16:14 +# CREATED: Wednesday 26 November 2019 16:14 # REVISION: --- #=============================================================================== @@ -27,7 +27,6 @@ ngspiceFlag=0 ##All Functions goes here - function createConfigFile { #Creating config.ini file and adding configuration information @@ -49,40 +48,28 @@ function createConfigFile function installNghdl { - echo -n "Do you want to install nghdl? (y/n): " - read getNghdl - - if [ $getNghdl == "y" -o $getNghdl == "Y" ];then - echo "Downloading nghdl" - wget https://github.com/FOSSEE/nghdl/archive/master.zip - unzip nghdl-master.zip - mv nghdl-master nghdl - rm nghdl-master.zip - echo "Installing nghdl" - cd nghdl/ - ./install-nghdl.sh --install + echo "Installing nghdl............" + unzip nghdl-master.zip + mv nghdl-master nghdl + cd nghdl/ + ./install-nghdl.sh --install - if [ $? -ne 0 ];then - echo -e "\n\n\nNghdl ERROR: Error while installing nghdl\n\n" - exit 0 - else - ngspiceFlag=1 - cd .. - fi - #Creating empty eSim_Nghdl.lib in home directory - if [ -f /usr/share/kicad/library/eSim_Nghdl.lib ];then - echo "eSim_Nghdl.lib is already available" - else - touch /usr/share/kicad/library/eSim_Nghdl.lib - fi - - elif [ $getNghdl == "n" -o $getNghdl == "N" ];then - echo "Proceeding without installing nghdl" - else - echo "Please select the right option" + if [ $? -ne 0 ];then + echo -e "\n\n\nNghdl ERROR: Error while installing nghdl\n\n" exit 0 + else + ngspiceFlag=1 + cd .. + fi + + #Creating empty eSim_Nghdl.lib in home directory + if [ -f /usr/share/kicad/library/eSim_Nghdl.lib ];then + echo "eSim_Nghdl.lib is already available" + else + touch /usr/share/kicad/library/eSim_Nghdl.lib fi + } function addKicadPPA @@ -106,12 +93,6 @@ function installDependency echo "Installing Kicad............" sudo apt-get install -y kicad - if [ $ngspiceFlag -ne 1 ];then - echo "Installing ngspice.........." - sudo apt-get install -y ngspice - else - echo "ngspice already installed......" - fi echo "Installing PyQt4............" sudo apt-get install -y python-qt4 echo "Installing Matplotlib......." @@ -140,9 +121,7 @@ function copyKicadLibrary #Change ownership from Root to the User sudo chown -R $USER:$USER /usr/share/kicad/library/ - - - # Full path of 'kicad.pro file'[Verified for Ubuntu 12.04] + # Full path of 'kicad.pro file' KICAD_PRO="/usr/share/kicad/template/kicad.pro" KICAD_ORIGINAL="/usr/share/kicad/template/kicad.pro.original" @@ -194,10 +173,9 @@ function createDesktopStartScript sudo chmod 755 esim.desktop #Copy desktop icon file to Desktop cp -vp esim.desktop $HOME/Desktop/ - - #Copying logo.png to .esim directory to access as icon cp -vp images/logo.png $config_dir + } #################################################################### @@ -210,12 +188,12 @@ if [ "$#" -eq 1 ];then option=$1 else echo "USAGE : " - echo "./install.sh --install" + echo "./install-eSim.sh --install" + echo "./install-eSim.sh --uninstall" exit 1; fi ##Checking flags - if [ $option == "--install" ];then echo "Enter proxy details if you are connected to internet thorugh proxy" @@ -251,49 +229,53 @@ if [ $option == "--install" ];then echo "Install with proxy" #Calling functions + installNghdl createConfigFile addKicadPPA installDependency copyKicadLibrary createDesktopStartScript - installNghdl elif [ $getProxy == "n" -o $getProxy == "N" ];then echo "Install without proxy" #Calling functions + installNghdl createConfigFile addKicadPPA installDependency copyKicadLibrary createDesktopStartScript - installNghdl if [ $? -ne 0 ];then echo -e "\n\n\nFreeEDA ERROR: Unable to install required packages. Please check your internet connection.\n\n" exit 0 fi + + echo "-----------------eSim installed Successfully-----------------" + echo "Type \"esim\" in Terminal to launch it" + echo "or double click on \"eSim\" icon placed on Desktop" else - echo "Please select the right option" - exit 0 + echo "Please select the right option" + exit 0 fi elif [ $option == "--uninstall" ];then - echo -n "Are you sure ? As it will remove complete eSim including KiCad, Ngspice, NGHDL, your subcircuit and model library packages(y/n):" + echo -n "Are you sure? It will remove complete eSim including KiCad, Ngspice, NGHDL, your subcircuit and model library packages(y/n):" read getConfirmation if [ $getConfirmation == "y" -o $getConfirmation == "Y" ];then - echo "Deleting Files............" + echo "Deleting Files................" sudo rm -rf $HOME/.esim $HOME/.config/kicad $HOME/Desktop/esim.desktop esim-start.sh esim.desktop /usr/bin/esim - echo "Removing Kicad............" + echo "Removing Kicad................" sudo apt-get remove -y kicad - echo "Removing Ngspice............" - sudo apt-get remove -y ngspice - echo "Removing NGHDL............" + echo "Removing NGHDL................" + rm -rf src/modelParamXML/Nghdl/* cd nghdl/ ./install-nghdl.sh --uninstall - + cd ../ + rm -rf nghdl if [ $? -eq 0 ];then echo "Uninstalled successfully" @@ -307,10 +289,8 @@ elif [ $option == "--uninstall" ];then exit 0 fi - else echo "Please select the proper operation." echo "--install" echo "--uninstall" - fi
\ No newline at end of file diff --git a/src/modelParamXML/Nghdl/.gitignore b/src/modelParamXML/Nghdl/.gitignore new file mode 100644 index 00000000..86d0cb27 --- /dev/null +++ b/src/modelParamXML/Nghdl/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore
\ No newline at end of file diff --git a/src/modelParamXML/Nghdl/full_adder_sl.xml b/src/modelParamXML/Nghdl/full_adder_sl.xml deleted file mode 100644 index 3758039f..00000000 --- a/src/modelParamXML/Nghdl/full_adder_sl.xml +++ /dev/null @@ -1 +0,0 @@ -<model><name>full_adder_sl</name><type>Nghdl</type><node_number>5</node_number><title>Add parameters for full_adder_sl</title><split>1-V:1-V:1-V:1-V:1-V</split><param><rise_delay default="1.0e-9">Enter Rise Delay (default=1.0e-9)</rise_delay><fall_delay default="1.0e-9">Enter Fall Delay (default=1.0e-9)</fall_delay><input_load default="1.0e-12">Enter Input Load (default=1.0e-12)</input_load><instance_id default="1">Enter Instance ID (Between 0-99)</instance_id><stop_time default="90e-9">Enter the stop time to end the simulation (default=90e-9)</stop_time></param></model>
\ No newline at end of file diff --git a/src/modelParamXML/Nghdl/inverter.xml b/src/modelParamXML/Nghdl/inverter.xml deleted file mode 100644 index df705ccc..00000000 --- a/src/modelParamXML/Nghdl/inverter.xml +++ /dev/null @@ -1 +0,0 @@ -<model><name>inverter</name><type>Nghdl</type><node_number>2</node_number><title>Add parameters for inverter</title><split>1-V:1-V</split><param><rise_delay default="1.0e-9">Enter Rise Delay (default=1.0e-9)</rise_delay><fall_delay default="1.0e-9">Enter Fall Delay (default=1.0e-9)</fall_delay><input_load default="1.0e-12">Enter Input Load (default=1.0e-12)</input_load><instance_id default="1">Enter Instance ID (Between 0-99)</instance_id><stop_time default="90e-9">Enter the stop time to end the simulation (default=90e-9)</stop_time></param></model>
\ No newline at end of file |