diff options
Diffstat (limited to 'Windows')
-rw-r--r-- | Windows/Makerchip-Build.md | 93 | ||||
-rw-r--r-- | Windows/README.md | 4 | ||||
-rwxr-xr-x | Windows/makerchip.spec | 40 | ||||
-rwxr-xr-x | Windows/sandpiper-saas.spec | 40 |
4 files changed, 177 insertions, 0 deletions
diff --git a/Windows/Makerchip-Build.md b/Windows/Makerchip-Build.md new file mode 100644 index 00000000..1de65b11 --- /dev/null +++ b/Windows/Makerchip-Build.md @@ -0,0 +1,93 @@ +Instructions for Standalone Executables +=== + +It contains all the documentation for making Makerchip-App and Sandpiper SaaS standalone executables (using PyInstaller), and packaging it for eSim. + +Following instructions are common to both Makerchip-App and Sandpiper SaaS: + +1. Download and install "Python-3.6.8", "Git For Windows". Use "Git Bash" for all following shell commands. + + Reference - https://gitforwindows.org/ + +2. Add alias to python.exe in Git shell: + + $ alias python='winpty python.exe' #Need to be done for each new shell created + +3. Download `virtualenv` package as: + + $ pip install virtualenv + + +## Makerchip-App Executable: + +4. Clone the Makerchip repository from: https://gitlab.com/rweda/makerchip-app + +5. Create a virtual environment as: + + $ virtualenv makerchip-venv + +6. Activate the virtual environment as: + + $ source makerchip-venv/Scripts/activate + +7. Install the following Python dependencies through pip within the virtual environment: + + $ pip install pyinstaller click requests sseclient-py + +8. Test whether only Makerchip-App dependencies are available or not: + + $ pip freeze + +9. Navigate to the top level directory of the cloned repository and create the spec file as: + + $ pyi-makespec.exe --onefile -w -n makerchip --add-data='makerchip/asset;asset' --add-data='makerchip/_vendor/native_web_app-1.0.2.dist-info/LICENSE;native_web_app-1.0.2.dist-info' --add-data='LICENSE.md;.' makerchip/__main__.py + +10. Create onefile executable using PyInstaller as: + + $ pyinstaller.exe -F --clean makerchip.spec + +11. Verify whether all the Makerchip-App source files (`*.py`) and the additional data files have been included in `Analysis-00.toc` file under the build folder generated by PyInstaller. + + + +## Sandpiper SaaS Executable: + +4. Clone the Sandpiper SaaS repository from: https://gitlab.com/rweda/sandpiper-saas/ + +5. Create a virtual environment as: + + $ virtualenv sandpiper-saas-venv + +6. Activate the virtual environment as: + + $ source sandpiper-saas-venv/Scripts/activate + +7. Install the following Python dependencies through pip within the virtual environment: + + $ pip install pyinstaller click requests + +8. Test whether only Sandpiper SaaS dependencies are available or not: + + $ pip freeze + +9. Navigate to the top level directory of the cloned repository and create the spec file as: + + $ pyi-makespec.exe --onefile -w -n sandpiper-saas --add-data='LICENSE.md;.' sandpiper/__main__.py + +10. Create onefile executable using PyInstaller as: + + $ pyinstaller.exe -F --clean sandpiper-saas.spec + +11. Verify whether all the Sandpiper SaaS source files (`*.py`) and the additional data files have been included in `Analysis-00.toc` file under the build folder generated by PyInstaller. + + + +## Packaging Makerchip for eSim + +1. Create a directory named `makerchip`. + +2. Place both the above generated executables in the `makerchip` directory. + +3. Compress `makerchip` directory in 7z format and place it in eSim's installer folder. + +4. Follow rest of the [instructions](https://github.com/FOSSEE/eSim/tree/installers/Windows/README.md) for packaging eSim. diff --git a/Windows/README.md b/Windows/README.md index 1e484d19..e9cd8673 100644 --- a/Windows/README.md +++ b/Windows/README.md @@ -102,6 +102,10 @@ It contains all the documentation for making eSim executable (using PyInstaller) - License file (`rtf` format) - Logo (`ico` format) - `esim-setup-script` file + - Makerchip executables (`makerchip.7z` file) + + > Note: Refer this [documentation](https://github.com/fossee/tree/installers/Windows/Makerchip-Build.md) on packaging Makerchip-App and Sandpiper SaaS for Windows OS + - `nghdl-setup-script` file from the `NGHDL` repository 12. Compile the NSI script (`esim-setup-script` file). Now only use the generated installer for distribution. diff --git a/Windows/makerchip.spec b/Windows/makerchip.spec new file mode 100755 index 00000000..0f4ee8e0 --- /dev/null +++ b/Windows/makerchip.spec @@ -0,0 +1,40 @@ +# -*- mode: python ; coding: utf-8 -*- + + +block_cipher = None + + +a = Analysis(['makerchip\\__main__.py'], + pathex=[], + binaries=[], + datas=[('makerchip/asset', 'asset'), ('makerchip/_vendor/native_web_app-1.0.2.dist-info/LICENSE', 'native_web_app-1.0.2.dist-info'), ('LICENSE.md', '.')], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) + +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='makerchip', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=False, + disable_windowed_traceback=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None ) diff --git a/Windows/sandpiper-saas.spec b/Windows/sandpiper-saas.spec new file mode 100755 index 00000000..a84da033 --- /dev/null +++ b/Windows/sandpiper-saas.spec @@ -0,0 +1,40 @@ +# -*- mode: python ; coding: utf-8 -*- + + +block_cipher = None + + +a = Analysis(['sandpiper\\__main__.py'], + pathex=[], + binaries=[], + datas=[('LICENSE.md', '.')], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) + +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='sandpiper-saas', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=False, + disable_windowed_traceback=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None ) |