diff options
-rwxr-xr-x | Debian/readme.md | 146 | ||||
-rw-r--r-- | README.md | 17 | ||||
-rwxr-xr-x | Ubuntu/README.md | 32 | ||||
-rw-r--r-- | Ubuntu/eSim.spec (renamed from Debian/eSim.spec) | 0 | ||||
-rw-r--r-- | Ubuntu/executable.md | 101 | ||||
-rwxr-xr-x | Ubuntu/install-eSim.sh (renamed from Debian/install-eSim.sh) | 0 | ||||
-rw-r--r-- | Version_Change.md | 35 | ||||
-rw-r--r-- | Windows/README.md (renamed from Windows/readme.md) | 25 | ||||
-rw-r--r-- | eSimVersionChange.md | 39 |
9 files changed, 195 insertions, 200 deletions
diff --git a/Debian/readme.md b/Debian/readme.md deleted file mode 100755 index 8b635e4a..00000000 --- a/Debian/readme.md +++ /dev/null @@ -1,146 +0,0 @@ -eSim Installer (Ubuntu OS) -==== - - -It contains all the documenation for making eSim executable (using PyInstaller), eSim Installation Script and packaging eSim with and without eSim executable (through source) on Ubuntu 16.04 and above. - - -## eSim Executable: - -> Note: pip tool corresponds to Python-3.5.2 on Ubuntu 16.04 and Python-3.6.9 on Ubuntu 18.04 - -1. Download `virtualenv` package and create virtual environment as: - - $ pip install virtualenv - $ virtualenv -p /usr/bin/python3 eSim - - OR - - $ sudo apt install -y python3-venv - $ python3 -m venv eSim - -2. Activate the virtual environment as: - - $ source eSim/bin/activate - -3. Install all Python dependencies for eSim within the virtual environment as: - - $ pip install wheel - $ pip install pyinstaller - $ pip install --upgrade 'matplotlib==3.0.3' - $ pip install tornado - $ pip install --upgrade 'setuptools<45.0.0' - $ sudo apt install build-essential python3-dev libqt4-dev qt4-dev-tools - $ mkdir eSim/build - $ cd eSim/build/ - $ wget http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.12.3/PyQt4_gpl_x11-4.12.3.tar.gz - $ wget https://www.riverbankcomputing.com/static/Downloads/sip/4.19.21/sip-4.19.21.tar.gz - $ tar -xzvf sip-4.19.21.tar.gz - $ tar -xvzf PyQt4_gpl_x11-4.12.3.tar.gz - $ cd sip-4.19.21/ - $ python configure.py --sip-module PyQt4.sip - $ make - $ make install - $ cd ../PyQt4_gpl_x11-4.12.3/ - $ python configure.py - $ make - $ make install - -4. Test whether only eSim dependencies are available or not: - - $ pip freeze - -> Note : Following dependencies should be available - -> - PyQt4 -> - matplotlib -> - numpy -> - dateutil -> - pyparsing -> - six -> - cycler.py - -5. Download eSim Manual from eSim website, add it to `library/browser/User-Manual/` and update the file name of Manual in `src/browser/UserManual.py` accordingly. - -6. Create spec file as: - - $ pyi-makespec --onefile -n eSim <path_to_eSim>/src/frontEnd/Application.py - -7. Add `PyQt4.sip` as hiddenimports in the generated spec file. - -8. Create onefile executable using pyinstaller as: - - $ pyinstaller -F --clean eSim.spec - -9. Verify whether all eSim `src` files (`*.py`) have been included in `Analysis-00.toc` file under the build folder generated by PyInstaller. - - -## Fully-Static Bundling of eSim Executable: - -1. To create a [fully-static bundled version](https://github.com/pyinstaller/pyinstaller/wiki/FAQ#GNULinux) of eSim (through PyInstaller), use a tool like [StaticX](https://github.com/JonathonReinhart/staticx/). - -2. To create fully-static eSim : - - - Activate the virtual environment as: - - $ source eSim/bin/activate - - - Install StaticX as: - - $ pip install staticx - $ pip install patchelf-wrapper - - - Create static eSim as: - - $ staticx /path/to/executable/eSim /path/to/output/executable/eSim - -3. To verify if all dynamic libraries are removed : - - - Type following command in a terminal : - - $ ldd path/to/output/executable/eSim - - - Output of above command should be similar to ` not a dynamic executable` - - -## Without eSim Executable (through source): - -Update following files by changing the relative paths before packaging the `src` folder with the release. - - - `browser\UserManual.py` --> path to manual - - `browser\Welcome.py` --> path to library - - `configuration\Appconfig.py` --> path to library - - `frontEnd\Application.py` --> path to library, pathmagic and images - - `frontEnd\ProjectExplorer.py` --> path to images - - `frontEnd\Workspace.py` --> path to images - - `kicadtoNgspice\DeviceModel.py` --> path to library - - `kicadtoNgspice\Processing.py` --> path to library - - `kicadtoNgspice\SubcircuitTab.py` --> path to library - - `modelEditor\ModelEditor.py` --> path to library - - `subcircuit\newSub.py` --> path to library - - `subcircuit\openSub.py` --> path to library - - `subcircuit\uploadSub.py` --> path to library - - -## How to package eSim? - -1. Update `VERSION` file to this release number. - -2. Add the installer file in `eSim-<version>` folder. - -3. Add the eSim executable file in `eSim-<version>` folder (only if it is made available). Also, remove following files from the folder: - - `.git` folder - - `code` folder - - `src` folder (Applicable only if eSim executable is made) - - conf.py - - setup.py - - index.rst - - requirement.txt - - .gitignore - - .travis.yml - -4. Add the zip file of `NGHDL` (`nghdl-master.zip`) in the eSim folder. - -5. Compress `kicadLibrary` folder to a `tar.xz` format. - -6. Compress `eSim-<version>` to a zip format for distribution. - diff --git a/README.md b/README.md new file mode 100644 index 00000000..8d49b116 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +eSim Packaging +==== + +It contains all the documentation for packaging eSim for distribution. + + +# Packaging eSim for Distribution: + +1. eSim is currently packaged and distributed for Ubuntu OS (Linux) and MS Windows OS. + +2. Refer the [documentation](Version_Change.md) for the changes to be done when a new release is to be made. + +> Note: These changes have to be made `first` before proceeding with the packaging on either platform. + +3. Refer the [documentation](Ubuntu/README.md) to package eSim for Ubuntu OS. + +4. Refer the [documentation](Windows/README.md) to package eSim for Windows OS. diff --git a/Ubuntu/README.md b/Ubuntu/README.md new file mode 100755 index 00000000..b4a6cb8b --- /dev/null +++ b/Ubuntu/README.md @@ -0,0 +1,32 @@ +eSim Installer (Ubuntu OS) +==== + +It contains the documentation to packaging eSim and making binaries for distribution. + +> Note: If planning to freeze the eSim source code for a target platform (Ubuntu OS), then refer this [documentation](executable.md). + + +## How to package eSim for Ubuntu OS? + +1. Take the `master` branch containing the source code. Rename the folder to `eSim-<version>`. + +2. Add the installer script `install-eSim.sh` in `eSim-<version>` folder. + +3. Add the eSim executable (if available) in `eSim-<version>` folder. Also, remove following files from the folder: + - `.git` folder + - `code` folder + - `src` folder (Applicable only if eSim executable is used) + - conf.py + - setup.py + - index.rst + - requirement.txt + - .gitignore + - .travis.yml + +4. Add the zip file of `NGHDL` (`nghdl.zip`) in the eSim folder. + +> Note: Refer this [documentation](https://github.com/fossee/nghdl/tree/installers/Ubuntu/README.md) on packaging of NGHDL for Ubuntu OS. + +5. Compress `kicadLibrary` folder to a `tar.xz` format. + +6. Compress `eSim-<version>` to a zip format for distribution. diff --git a/Debian/eSim.spec b/Ubuntu/eSim.spec index 15061f6b..15061f6b 100644 --- a/Debian/eSim.spec +++ b/Ubuntu/eSim.spec diff --git a/Ubuntu/executable.md b/Ubuntu/executable.md new file mode 100644 index 00000000..435ed88a --- /dev/null +++ b/Ubuntu/executable.md @@ -0,0 +1,101 @@ +eSim Executable (Ubuntu OS) +==== + +> Note: It is not updated for the recently ported GUI to PyQt5 and Ubuntu 20.04 LTS. Currently, packaging for Ubuntu OS is done directly with the source code and not the executable. + +It contains the documentation for making eSim executable using PyInstaller on Ubuntu 16.04 and above. + + +## Freeze eSim source code: + +> Note: pip tool corresponds to Python-3.5.2 on Ubuntu 16.04 and Python-3.6.9 on Ubuntu 18.04 + +1. Download `virtualenv` package and create virtual environment as: + + $ pip install virtualenv + $ virtualenv -p /usr/bin/python3 eSim + + OR + + $ sudo apt install -y python3-venv + $ python3 -m venv eSim + +2. Activate the virtual environment as: + + $ source eSim/bin/activate + +3. Install all Python dependencies for eSim within the virtual environment as: + + $ pip install wheel + $ pip install pyinstaller + $ pip install --upgrade 'matplotlib==3.0.3' + $ pip install tornado + $ pip install --upgrade 'setuptools<45.0.0' + $ sudo apt install build-essential python3-dev libqt4-dev qt4-dev-tools + $ mkdir eSim/build + $ cd eSim/build/ + $ wget http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.12.3/PyQt4_gpl_x11-4.12.3.tar.gz + $ wget https://www.riverbankcomputing.com/static/Downloads/sip/4.19.21/sip-4.19.21.tar.gz + $ tar -xzvf sip-4.19.21.tar.gz + $ tar -xvzf PyQt4_gpl_x11-4.12.3.tar.gz + $ cd sip-4.19.21/ + $ python configure.py --sip-module PyQt4.sip + $ make + $ make install + $ cd ../PyQt4_gpl_x11-4.12.3/ + $ python configure.py + $ make + $ make install + +4. Test whether only eSim dependencies are available or not: + + $ pip freeze + +> Note : Following dependencies should be available - +> - PyQt4 +> - matplotlib +> - numpy +> - dateutil +> - pyparsing +> - six +> - cycler.py + +5. Create spec file as: + + $ pyi-makespec --onefile -n eSim <path_to_eSim>/src/frontEnd/Application.py + +6. Add `PyQt4.sip` as hiddenimports in the generated spec file. + +7. Create onefile executable using pyinstaller as: + + $ pyinstaller -F --clean eSim.spec + +8. Verify whether all eSim `src` files (`*.py`) have been included in `Analysis-00.toc` file under the build folder generated by PyInstaller. + + +## Fully-Static Bundling of eSim Executable: + +1. To create a [fully-static bundled version](https://github.com/pyinstaller/pyinstaller/wiki/FAQ#GNULinux) of eSim (through PyInstaller), use a tool like [StaticX](https://github.com/JonathonReinhart/staticx/). + +2. To create fully-static eSim : + + - Activate the virtual environment as: + + $ source eSim/bin/activate + + - Install StaticX as: + + $ pip install staticx + $ pip install patchelf-wrapper + + - Create static eSim as: + + $ staticx /path/to/executable/eSim /path/to/output/executable/eSim + +3. To verify if all dynamic libraries are removed : + + - Type following command in a terminal : + + $ ldd path/to/output/executable/eSim + + - Output of above command should be similar to ` not a dynamic executable` diff --git a/Debian/install-eSim.sh b/Ubuntu/install-eSim.sh index 74d59992..74d59992 100755 --- a/Debian/install-eSim.sh +++ b/Ubuntu/install-eSim.sh diff --git a/Version_Change.md b/Version_Change.md new file mode 100644 index 00000000..7469ce84 --- /dev/null +++ b/Version_Change.md @@ -0,0 +1,35 @@ +eSim Version Change +==== + +It contains the documentation for the changes to be done when a new release is to be made. + + +# Changes for eSim version Update: + +1. `master/VERSION` - Change the version number + +2. `master/conf.py` - Update `release` variable + +3. `master/setup.py` - Update `version` field in `setup` function + +4. User Manual + - Download eSim Manual from eSim website and add it to `library/browser/User-Manual/`. + - Update user manual filename as `eSim_Manual_y.x.pdf` where y.x is the updated version. + - Update path in the following line at `master/src/browser/UserManual.py` with the updated manual name: + ```python + file = os.path.realpath('library/browser/User-Manual/eSim_Manual_2.0.pdf') + ``` + +5. `master/src/configuration/Appconfig.py` - In function `def __init__ (self)` , update the variable `self._VERSION` + +6. `master/INSTALL` - Update the installer file names according to the latest version. + +7. `installers/Windows/esim-setup-script.nsi` - Update the following lines in this script: + ```nsi + !define PRODUCT_VERSION "y.x" + !define VERSION "a.b.c.d" + + OutFile "eSim-y.x_install.exe" + ``` + +8. `master/README.md` - Update new features, OS support and other changes that were made in the new version. diff --git a/Windows/readme.md b/Windows/README.md index cd8ff979..8dae6dc1 100644 --- a/Windows/readme.md +++ b/Windows/README.md @@ -7,6 +7,7 @@ It contains all the documenation for making eSim executable (using PyInstaller) > Note : Do not develop eSim on Windows OS. Work only with `installers` branch on Windows OS and do development on Linux OS. > Reference : https://stackoverflow.com/questions/37672886/cannot-get-rid-of-unstaged-files-in-git-on-my-local + ## eSim Executable: 1. Download and install "Python-3.5.2", "Git For Windows". Use "Git Bash" for all following shell commands. @@ -88,27 +89,24 @@ It contains all the documenation for making eSim executable (using PyInstaller) > - six > - cycler.py -8. Download eSim Manual from eSim website, add it to `library/browser/User-Manual/` and update the file name of Manual in `src/browser/UserManual.py` accordingly. - -9. Create spec file as: +8. Create spec file as: $ pyi-makespec --onefile -n eSim <path_to_eSim>/src/frontEnd/Application.py --icon=<path_to_eSim_logo> -10. Create onefile executable using pyinstaller as: +9. Create onefile executable using pyinstaller as: $ pyinstaller -F --clean eSim.spec -11. Verify whether all eSim `src` files (`*.py`) have been included in `Analysis-00.toc` file under the build folder generated by PyInstaller. - +10. Verify whether all eSim `src` files (`*.py`) have been included in `Analysis-00.toc` file under the build folder generated by PyInstaller. ## How to package eSim? -1. Update `VERSION` file to this release number. Also, update version number in NSI script and `Installation.txt` file. +1. Take the `master` branch of eSim. Rename the folder to `eSim`. 2. Compress `spice` folder in zip format (Make sure that there is folder named `spice` inside this compressed file). -3. Add eSim executable file to the eSim source folder. Also, remove following files from the eSim source folder: +3. Add eSim executable to the `eSim` folder. Also, remove following files from that folder: - `.git` folder - `code` folder - `src` folder @@ -118,15 +116,12 @@ It contains all the documenation for making eSim executable (using PyInstaller) - requirement.txt - .gitignore - .travis.yml - - `Examples\NGHDL_Examples\` folder - -4. Remove `eSim_Nghdl.lib` file from `eSim\library\kicadLibrary\kicad_eSim-Library\`. Also, remove `library` folder, duplicate files from `template` and `modules` folders under `eSim\library\kicadLibary\`. -5. Now, compress `eSim\library\kicadLibrary` in zip format, place it at `eSim\library` and delete that folder. +4. Now, compress `eSim\library\kicadLibrary` in zip format, place it at `eSim\library` and delete that folder. -6. Compress `eSim` folder in zip format (Make sure that there is folder named `eSim` inside this compressed file). +5. Compress `eSim` folder in zip format (Make sure that there is folder named `eSim` inside this compressed file). -7. Add following files/folder to the installer folder: +6. Add following files/folder to the installer folder: - KiCad installer. - License file (`rtf` format). - Logo (`ico` format). @@ -134,4 +129,4 @@ It contains all the documenation for making eSim executable (using PyInstaller) - eSim (compressed file in `zip` format) containing eSim folder. - `esim-setup-script` file. -8. Compile the NSI script (`esim-setup-script` file). Now only use the generated installer for distribution. +7. Compile the NSI script (`esim-setup-script` file). Now only use the generated installer for distribution. diff --git a/eSimVersionChange.md b/eSimVersionChange.md deleted file mode 100644 index 3c119663..00000000 --- a/eSimVersionChange.md +++ /dev/null @@ -1,39 +0,0 @@ -# Changes to be made when eSim version is updated - -1. master/VERSION\ -- Change the version number - -2. master/conf.py\ -- Update `release` variable - -3. master/setup.py\ -- Update `version` field in `setup` function - -4. User manual -- Update user manual filename as `eSim_Manual_y.x.pdf` where y.x is the updated version. -- Update path in the following line at `master/src/browser/UserManual.py` with the updated manual name -```python - file = os.path.realpath('library/browser/User-Manual/eSim_Manual_2.0.pdf') -``` - -5. master/src/configuration/Appconfig.py\ -- In function `def __init__ (self)` , update the variable `sel._VERSION` - -6. master/INSTALL\ -- Update the installer file names according to the latest version - -7. installers/Windows/esim-setup-script.nsi\ -- Update the following lines in the script -```nsi -- !define PRODUCT_VERSION "y.x" -- !define VERSION "a.b.c.d" - -- OutFile "eSim-y.x_install.exe" -``` - -8. master/README.md -- Update new features, OS support and other changes that were made in the new version. - - - - |