summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xUbuntu/install-eSim.sh119
-rw-r--r--Windows/README.md46
-rw-r--r--Windows/esim-setup-script.nsi122
-rwxr-xr-xWindows/makerchip.7zbin0 -> 6497053 bytes
4 files changed, 137 insertions, 150 deletions
diff --git a/Ubuntu/install-eSim.sh b/Ubuntu/install-eSim.sh
index a25418b2..3a6fa53f 100755
--- a/Ubuntu/install-eSim.sh
+++ b/Ubuntu/install-eSim.sh
@@ -15,7 +15,7 @@
# AUTHOR: Fahim Khan, Rahul Paknikar, Saurabh Bansode, Sumanto Kar
# ORGANIZATION: eSim Team, FOSSEE, IIT Bombay
# CREATED: Wednesday 15 July 2015 15:26
-# REVISION: Wednesday 05 January 2021 23:50
+# REVISION: Tuesday 01 February 2022 23:50
#===============================================================================
# All variables goes here
@@ -71,57 +71,14 @@ function installNghdl
trap error_exit ERR
ngspiceFlag=1
- cd ..
+ cd ../
}
-function verilator
-{
-
- echo "Installing Verilator Dependencies..........................."
- if [[ -n "$(which apt-get 2> /dev/null)" ]]
- then
- # Ubuntu
- sudo apt-get install make autoconf g++ flex bison
- else [[ -n "$(which yum 2> /dev/null)" ]]
- # Ubuntu
- sudo yum install make autoconf flex bison which -y
- sudo yum groupinstall 'Development Tools' -y
- fi
- echo "Installing Verilator..........................."
- sudo apt install -y curl
- curl https://www.veripool.org/ftp/verilator-4.210.tgz | tar -zx
- cd verilator-4.210
- ./configure
- make -j$(nproc)
- sudo make install
- echo "Removing the Unessential files in Verilator Folder..........................."
- rm -r docs
- rm -r examples
- rm -r include
- rm -r test_regress
- rm -r bin
- ls -1 | grep -E -v 'config.status|configure.ac|Makefile.in|verilator.1|configure|Makefile|src|verilator.pc' | xargs rm -f
- #sudo rm -v -r'!("config.status"|"configure.ac"|"Makefile.in"|"verilator.1"|"configure"|"Makefile"|"src"|"verilator.pc")'
-}
-function Ngveridependencies
+function installKicad
{
- echo "Installing Chrome.........................."
- sudo apt install -y chromium-browser
- echo "Installing python3 pip.........................."
- sudo apt install -y python3-pip
- echo "Installing watchdog..........................."
- pip3 install watchdog
- echo "Installing HDLParse..........................."
- pip3 install hdlparse
- echo "Installing Makerchip-App..........................."
- pip3 install makerchip-app
- echo "Installing Sandpiper-Saas..........................."
- pip3 install sandpiper-saas
-}
-function addKicadPPA
-{
+ echo "Installing KiCad..........................."
#sudo add-apt-repository ppa:js-reynaud/ppa-kicad
kicadppa="reynaud/kicad-4"
@@ -144,6 +101,11 @@ function addKicadPPA
echo "KiCad-4 is available in synaptic"
fi
+ sudo apt-get install -y --no-install-recommends kicad=4.0.7*
+ if [[ $(lsb_release -rs) == 20.* ]]; then
+ sudo add-apt-repository -ry "deb http://archive.ubuntu.com/ubuntu/ bionic main universe"
+ fi
+
}
@@ -163,7 +125,7 @@ function installDependency
echo "Installing Xterm..........................."
sudo apt-get install -y xterm
- echo "Installing PyQt5..........................."
+ echo "Installing Psutil.........................."
sudo apt-get install -y python3-psutil
echo "Installing PyQt5..........................."
@@ -172,16 +134,24 @@ function installDependency
echo "Installing Matplotlib......................"
sudo apt-get install -y python3-matplotlib
- if [[ $(lsb_release -rs) != 16.* ]]; then
- echo "Installing Distutils......................."
- sudo apt-get install -y python3-distutils
- fi
+ echo "Installing Distutils......................."
+ sudo apt-get install -y python3-distutils
- echo "Installing KiCad..........................."
- sudo apt-get install -y --no-install-recommends kicad=4.0.7*
- if [[ $(lsb_release -rs) == 20.* ]]; then
- sudo add-apt-repository -ry "deb http://archive.ubuntu.com/ubuntu/ bionic main universe"
- fi
+ # Install NgVeri Depedencies
+ echo "Installing Pip3............................"
+ sudo apt install -y python3-pip
+
+ echo "Installing Watchdog........................"
+ pip3 install watchdog
+
+ echo "Installing Hdlparse........................"
+ pip3 install hdlparse
+
+ echo "Installing Makerchip......................."
+ pip3 install makerchip-app
+
+ echo "Installing SandPiper Saas.................."
+ pip3 install sandpiper-saas
}
@@ -286,13 +256,10 @@ function createDesktopStartScript
set +e # Temporary disable exit on error
trap "" ERR # Do not trap on error of any command
- # Check if the target OS is Ubuntu 18 or not
- if [[ $(lsb_release -rs) == 18.* || $(lsb_release -rs) == 20.* ]]; then
- # Make esim.desktop file as trusted application
- gio set $HOME/Desktop/esim.desktop "metadata::trusted" true
- # Set Permission and Execution bit
- chmod a+x $HOME/Desktop/esim.desktop
- fi
+ # Make esim.desktop file as trusted application
+ gio set $HOME/Desktop/esim.desktop "metadata::trusted" true
+ # Set Permission and Execution bit
+ chmod a+x $HOME/Desktop/esim.desktop
# Remove local copy of esim.desktop file
rm esim.desktop
@@ -367,29 +334,25 @@ if [ $option == "--install" ];then
echo "Install with proxy"
# Calling functions
createConfigFile
- addKicadPPA
installDependency
+ installKicad
copyKicadLibrary
installNghdl
createDesktopStartScript
- verilator
- Ngveridependencies
elif [ $getProxy == "n" -o $getProxy == "N" ];then
echo "Install without proxy"
# Calling functions
createConfigFile
- addKicadPPA
installDependency
+ installKicad
copyKicadLibrary
installNghdl
createDesktopStartScript
- verilator
- Ngveridependencies
if [ $? -ne 0 ];then
- echo -e "\n\n\nFreeEDA ERROR: Unable to install required packages. Please check your internet connection.\n\n"
+ echo -e "\n\n\nERROR: Unable to install required packages. Please check your internet connection.\n\n"
exit 0
fi
@@ -404,7 +367,7 @@ if [ $option == "--install" ];then
elif [ $option == "--uninstall" ];then
- echo -n "Are you sure? It will remove eSim completely including KiCad, Ngspice and NGHDL along with their models and libraries (y/n):"
+ echo -n "Are you sure? It will remove eSim completely including KiCad, Makerchip and NGHDL along with their models and libraries (y/n):"
read getConfirmation
if [ $getConfirmation == "y" -o $getConfirmation == "Y" ];then
echo "Removing eSim............................"
@@ -418,12 +381,16 @@ elif [ $option == "--uninstall" ];then
if [[ $(lsb_release -rs) == 20.* ]]; then
sudo sed -i '/Package: kicad/{:label;N;/Pin-Priority: 501/!blabel};/Pin: version 4.0.7*/d' /etc/apt/preferences.d/preferences
fi
- echo "Removing Verilator..........................."
- cd verilator-4.210
- sudo make uninstall
+
+ echo "Removing Makerchip......................."
+ pip3 uninstall -y hdlparse
+ pip3 uninstall -y makerchip-app
+ pip3 uninstall -y sandpiper-saas
+
echo "Removing NGHDL..........................."
rm -rf library/modelParamXML/Nghdl/*
- cd ../nghdl/
+ rm -rf library/modelParamXML/Ngveri/*
+ cd nghdl/
if [ $? -eq 0 ];then
chmod +x install-nghdl.sh
./install-nghdl.sh --uninstall
diff --git a/Windows/README.md b/Windows/README.md
index 93d93c2d..b494e22b 100644
--- a/Windows/README.md
+++ b/Windows/README.md
@@ -29,36 +29,22 @@ It contains all the documentation for making eSim executable (using PyInstaller)
$ source eSim/Scripts/activate
-6. Install the Python dependencies `PyInstaller`, `Matplotlib`, `Tornado`, `SetupTools`, `PyQt5`, `Pypiwin32` through pip for eSim within the virtual environment:
-
- $ pip install pyinstaller
- $ pip install matplotlib==3.0.3
- $ pip install tornado
- $ pip install setuptools
- $ pip install PyQt5==5.9.2
- $ pip install pypiwin32
-
+6. Install the following Python dependencies through pip for eSim within the virtual environment:
+
+ $ pip install pyinstaller matplotlib==3.0.3 tornado setuptools
+ $ pip install PyQt5==5.9.2 pypiwin32 psutil
+ $ pip install watchdog hdlparse
+
7. Test whether only eSim dependencies are available or not:
$ pip freeze
-> Note: Following Python packages for eSim along with their dependencies should be available -
-> - PyQt5
-> - PyQt5-sip
-> - matplotlib
-> - numpy
-> - dateutil
-> - pyparsing
-> - six
-> - cycler.py
-> - pypiwin32
-
8. Create spec file as:
$ pyi-makespec --onefile -n eSim <path_to_eSim>/src/frontEnd/Application.py --icon=<path_to_eSim_logo>
9. Create onefile executable using pyinstaller as:
-
+
$ pyinstaller -F --clean eSim.spec
10. Verify whether all eSim `src` files (`*.py`) have been included in `Analysis-00.toc` file under the build folder generated by PyInstaller.
@@ -83,7 +69,12 @@ It contains all the documentation for making eSim executable (using PyInstaller)
- `library/browser/User-Manual/figures` folder
- library/browser/User-Manual/eSim.html
-3. Remove entire `library` folder and duplicate files from `template` and `modules` folders from `eSim\library\kicadLibrary` as same will be repeated in KiCad installer. Now, compress it in zip format, place it at `eSim\library` and delete that folder.
+3. Remove following from `eSim\library\kicadLibrary` folder as same will be repeated in KiCad installer:
+ - entire `library` folder
+ - everything from `modules` folder except `Connectors_Terminal_Blocks.pretty/TerminalBlock_Altech_AK300-2_P5.00mm.kicad_mod` and `TO_SOT_Packages_THT.pretty/TO-220-3_Vertical.kicad_mod`
+ - everything from `temmplate` folder except `kicad.pro` file
+
+ Now, compress it in zip format, place it at `eSim\library` and delete that folder.
4. Add eSim user manual `eSim_Manual_<version>.pdf` at location `library/browser/User-Manual`.
@@ -102,12 +93,13 @@ It contains all the documentation for making eSim executable (using PyInstaller)
> Note: Refer this [documentation](https://github.com/fossee/KiCad-eSim/blob/executables/README.md) on packaging KiCad for Windows OS
10. Add following files/folder to the installer folder:
- - License file (`rtf` format).
- - Logo (`ico` format).
- - `esim-setup-script` file.
- - `nghdl-setup-script` file.
+ - License file (`rtf` format)
+ - Logo (`ico` format)
+ - `esim-setup-script` file
+ - Makerchip executables (`makerchip.7z` file)
+ - `nghdl-setup-script` file fromt the `NGHDL` repository
11. Compile the NSI script (`esim-setup-script` file). Now only use the generated installer for distribution.
> Note: If there is any warning on `Eliminating "zeroing code out"`, then have a look at this reference -
-https://nsis-dev.github.io/NSIS-Forums/html/t-358040.html \ No newline at end of file
+https://nsis-dev.github.io/NSIS-Forums/html/t-358040.html
diff --git a/Windows/esim-setup-script.nsi b/Windows/esim-setup-script.nsi
index 856a2c39..130748e6 100644
--- a/Windows/esim-setup-script.nsi
+++ b/Windows/esim-setup-script.nsi
@@ -1,6 +1,6 @@
;NSIS Modern User Interface
;Start Menu Folder Selection Example Script
-;Modified by Fahim Khan, Saurabh Bansode, Rahul Paknikar - 01_03_2020
+;Modified by Fahim Khan, Saurabh Bansode, Rahul Paknikar - 14_02_2022
;Made by eSim Team, FOSSEE, IIT Bombay
;--------------------------------
@@ -18,8 +18,8 @@
; Otherwise it returns null("").
; Written by kenglish_hi
; Adapted from StrReplace written by dandaman32
-
-
+
+
Var STR_HAYSTACK
Var STR_NEEDLE
Var STR_CONTAINS_VAR_1
@@ -67,13 +67,13 @@ FunctionEnd
;General
!define PRODUCT_NAME "eSim"
-!define PRODUCT_VERSION "2.1"
-!define VERSION "2.1.0.0"
+!define PRODUCT_VERSION "2.2"
+!define VERSION "2.2.0.0"
!define PRODUCT_PUBLISHER "FOSSEE, IIT Bombay"
!define PRODUCT_WEB_SITE "https://esim.fossee.in/"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
-
+
VIAddVersionKey "ProductName" "eSim"
VIProductVersion "${VERSION}"
VIFileVersion "${VERSION}"
@@ -86,7 +86,7 @@ VIAddVersionKey "FileDescription" "Installer for eSim EDA Suite"
;Default installation folder
InstallDir "C:\FOSSEE"
-
+
;Request application privileges for Admin Rights
RequestExecutionLevel admin
@@ -140,20 +140,20 @@ FunctionEnd
;--------------------------------
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
-OutFile "eSim-2.1_installer.exe"
+OutFile "eSim-2.2_installer.exe"
Function .onVerifyInstDir
${StrContains} $0 "Program Files" $INSTDIR
StrCmp $0 "" notfound
MessageBox MB_ICONSTOP|MB_OK \
- "Installation in 'Program Files' is not allowed, choose another directory."
+ "Installation in 'Program Files' is not allowed, please choose another directory."
Abort
notfound:
${StrContains} $0 " " $INSTDIR
StrCmp $0 "" PathGood
MessageBox MB_ICONSTOP|MB_OK \
- "Installation path containing spaces is not allowed, choose another directory."
+ "Installation path containing spaces is not allowed, please choose another directory."
Abort
PathGood:
FunctionEnd
@@ -165,6 +165,7 @@ Section -NgspiceSim
;Current section needs an additional "size_kb" kilobytes of disk space
;AddSize 2726298
+ AddSize 859966
SetOutPath "$EXEDIR"
@@ -185,9 +186,9 @@ Section -NgspiceSim
WriteRegStr HKLM "Software\eSim" "" $INSTDIR
;Create eSim config directory
- CreateDirectory $PROFILE\.esim
- CopyFiles "$EXEDIR\logo.ico" "$PROFILE\.esim"
- FileOpen $0 "$PROFILE\.esim\config.ini" w
+ CreateDirectory $INSTDIR\eSim\library\config\.esim
+ CopyFiles "$EXEDIR\logo.ico" "$INSTDIR\eSim\library\config\.esim"
+ FileOpen $0 "$INSTDIR\eSim\library\config\.esim\config.ini" w
FileWrite $0 `[eSim]$\n`
FileWrite $0 `eSim_HOME = $INSTDIR\eSim$\n`
FileWrite $0 `LICENSE = %(eSim_HOME)s\LICENSE.rtf$\n`
@@ -197,25 +198,31 @@ Section -NgspiceSim
FileWrite $0 `MODELICA_MAP_JSON = %(eSim_HOME)s\library\ngspicetoModelica\Mapping.json$\n`
FileClose $0
+ ;Create eSim startup batch file
+ ;FileOpen $0 "$INSTDIR\eSim\eSim.bat" w
+ ;FileWrite $0 `@echo off$\n`
+ ;FileWrite $0 `set HOME=$PROFILE$\n`
+ ;FileWrite $0 `start eSim.exe$\n`
+ ;FileWrite $0 `cd /d %HOME%$\n`
+ ;FileClose $0
+
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
-
+
;Create shortcuts
;create desktop shortcut
- CreateShortCut "$PROFILE\..\Public\Desktop\eSim.lnk" "$INSTDIR\eSim\eSim" "" "$PROFILE\.esim\logo.ico" "" SW_SHOWMINIMIZED
+ CreateShortCut "$PROFILE\..\Public\Desktop\eSim.lnk" "$INSTDIR\eSim\eSim.exe" "" "$INSTDIR\eSim\library\config\.esim\logo.ico" "" SW_SHOWMINIMIZED
!insertmacro MUI_STARTMENU_WRITE_END
;Remove not required files
Delete "$EXEDIR\eSim.7z"
Delete "$EXEDIR\logo.ico"
-
-
SectionEnd
Section -InstallKiCad
-
+
SetOutPath "$EXEDIR"
File "kicad-4.0.7-i686.exe"
@@ -275,8 +282,25 @@ Section -AdditionalIcons
SectionEnd
+
!include "nghdl-setup-script.nsi"
+
+Section -InstallMakerchip
+
+ SetOutPath "$EXEDIR"
+ File "makerchip.7z"
+
+ SetOutPath $INSTDIR
+ Nsis7z::ExtractWithDetails "$EXEDIR\makerchip.7z" "Extracting Makerchip %s..."
+ CopyFiles "$INSTDIR\makerchip\*" "$INSTDIR\MSYS\mingw64\bin"
+
+ RMDir /r "$INSTDIR\makerchip"
+ Delete "$EXEDIR\makerchip.7z"
+
+SectionEnd
+
+
Section -Post
WriteUninstaller "$INSTDIR\eSim\uninst-eSim.exe"
@@ -288,6 +312,7 @@ Section -Post
SectionEnd
+
;Function un.onUninstSuccess
; HideWindow
; MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
@@ -298,9 +323,10 @@ Function un.onInit
Abort
FunctionEnd
+
Section Uninstall
- ; Set to HKLM
+ ; Set to HKLM
EnVar::SetHKLM
GetFullPathName $1 $INSTDIR\..\eSim\nghdl\src
@@ -308,72 +334,74 @@ Section Uninstall
Pop $0
DetailPrint "EnVar::AddValue returned=|$0|"
- GetFullPathName $1 $INSTDIR\..\mingw64\bin
- EnVar::DeleteValue "Path" $1
+ GetFullPathName $1 $INSTDIR\..\MSYS\mingw64\bin
+ EnVar::DeleteValue "Path" $1
Pop $0
DetailPrint "EnVar::AddValue returned=|$0|"
-
- GetFullPathName $1 $INSTDIR\..\mingw64\msys\bin
+
+ GetFullPathName $1 $INSTDIR\..\MSYS\usr\bin
EnVar::DeleteValue "Path" $1
Pop $0
DetailPrint "EnVar::AddValue returned=|$0|"
- GetFullPathName $1 $INSTDIR\..\mingw64\GHDL\bin
- EnVar::DeleteValue "Path" $1
- Pop $0
- DetailPrint "EnVar::AddValue returned=|$0|"
+ ;GetFullPathName $1 $INSTDIR\..\mingw64\GHDL\bin
+ ;EnVar::DeleteValue "Path" $1
+ ;Pop $0
+ ;DetailPrint "EnVar::AddValue returned=|$0|"
- GetFullPathName $1 $INSTDIR\..\ngspice-nghdl\bin
+ GetFullPathName $1 $INSTDIR\..\nghdl-simulator\bin
EnVar::DeleteValue "Path" $1
Pop $0
DetailPrint "EnVar::AddValue returned=|$0|"
- RMDir /r "$INSTDIR\..\mingw64"
- RMDir /r "$INSTDIR\..\ngspice-nghdl"
+ RMDir /r "$INSTDIR\..\MSYS"
+ RMDir /r "$INSTDIR\..\nghdl-simulator"
RMDir /r "$INSTDIR\..\eSim\nghdl"
;Note that in uninstaller code, $INSTDIR contains the directory where the uninstaller lies
- Delete "$INSTDIR\uninst-eSim.exe"
- Delete "$SMPROGRAMS\eSim\Uninstall.lnk"
+ Delete "$INSTDIR\uninst-eSim.exe"
+ Delete "$SMPROGRAMS\eSim\Uninstall.lnk"
- ;Removing Env Variable for KiCad
- GetFullPathName $1 $INSTDIR\..\KiCad\bin
- EnVar::DeleteValue "Path" $1
+ ;Removing Env Variable for KiCad
+ GetFullPathName $1 $INSTDIR\..\KiCad\bin
+ EnVar::DeleteValue "Path" $1
Pop $0
DetailPrint "EnVar::AddValue returned=|$0|"
- ;Remove KiCad config
- RMDir /r "$PROFILE\AppData\Roaming\kicad"
-
- ;Removing KiCad
- ExecWait '"$INSTDIR\..\KiCad\uninstaller.exe" /S'
+ ;Remove KiCad config
+ RMDir /r "$PROFILE\AppData\Roaming\kicad"
- Goto endActiveSync
+ ;Removing KiCad
+ ExecWait '"$INSTDIR\..\KiCad\uninstaller.exe" /S'
+
+ Goto endActiveSync
+
endActiveSync:
;Removing eSim
- RMDir /r "$PROFILE\.esim"
- RMDir /r "$PROFILE\.nghdl"
+ RMDir /r "$INSTDIR\eSim\library\config\.esim"
+ RMDir /r "$INSTDIR\eSim\library\config\.nghdl"
+ RMDir /r "$INSTDIR\eSim\library\config"
RMDir "$SMPROGRAMS\eSim"
RMDir /r "$INSTDIR\..\eSim"
RMDir /r "$INSTDIR\..\KiCad"
- Delete "$PROFILE\..\Public\Desktop\eSim.lnk"
+ Delete "$PROFILE\..\Public\Desktop\eSim.lnk"
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
;SetAutoClose true
SectionEnd
-
+
;Descriptions--------------------
;Language strings
- ;LangString DESC_NgspiceSim ${LANG_ENGLISH} "Ngspice is a mixed-level/mixed-signal circuit simulator. Its code is based on three open source software packages: Spice3f5, Cider1b1 and Xspice. Ngspice is part of gEDA project, a full GPL'd suite of Electronic Design Automation tools."
+ ;LangString DESC_NgspiceSim ${LANG_ENGLISH} "Ngspice is a mixed-level/mixed-signal circuit simulator. Its code is based on three open source software packages: Spice3f5, Cider1b1 and XSPICE. Ngspice is part of gEDA project, a full GPL'd suite of Electronic Design Automation tools."
;Assign language strings to sections
;!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
;!insertmacro MUI_DESCRIPTION_TEXT ${NgspiceSim} $(DESC_NgspiceSim)
;!insertmacro MUI_FUNCTION_DESCRIPTION_END
-
+
;--------------------------------
diff --git a/Windows/makerchip.7z b/Windows/makerchip.7z
new file mode 100755
index 00000000..1cf13cb1
--- /dev/null
+++ b/Windows/makerchip.7z
Binary files differ