blob: 1de65b1173f82b3bde636f32b09d23f1a6f0a6af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
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.
|