|
| 1 | +# ImSwitch Installer |
| 2 | + |
| 3 | +     |
| 4 | + |
| 5 | +## Introduction |
| 6 | + |
| 7 | +The ImSwitch Installer is an Electron-based application designed to streamline the installation process of the ImSwitch environment. It automates the download and setup of a Mamba environment along with all necessary dependencies from GitHub via pip. This tool simplifies the installation process, reducing it to a few clicks and eliminating the need for executing multiple complex commands. |
| 8 | + |
| 9 | +**NEW:** ImSwitch now runs as a web-based application embedded within the installer window. No external browser required. |
| 10 | + |
| 11 | +--- |
| 12 | + |
| 13 | +## 📦 Installation Process |
| 14 | + |
| 15 | +### 1. Download the Installer |
| 16 | + |
| 17 | +Go to the [ImSwitch Installer releases](https://github.com/openUC2/ImSwitchInstaller/releases/) page and download the appropriate version for your system (Windows, macOS ARM64/Intel, or Linux). |
| 18 | + |
| 19 | + |
| 20 | +*Navigate to the GitHub release page and download the correct installer for your operating system.* |
| 21 | + |
| 22 | +### 2. Run the Installer |
| 23 | + |
| 24 | +**Windows:** |
| 25 | + |
| 26 | + |
| 27 | +*When launching on Windows, you may encounter a security warning. Accept it to continue.* |
| 28 | + |
| 29 | +**macOS:** Follow [Apple's instructions](https://support.apple.com/en-us/HT202491) to run unsigned apps. |
| 30 | + |
| 31 | +### 3. Installation Begins |
| 32 | + |
| 33 | + |
| 34 | +*The Electron app will start unpacking. Please wait until it's ready.* |
| 35 | + |
| 36 | + |
| 37 | +*You’ll see the menu interface and a protocol logger for real-time feedback.* |
| 38 | + |
| 39 | +### 4. Click Install |
| 40 | + |
| 41 | + |
| 42 | +*Click the “Install ImSwitch” button to begin the environment setup.* |
| 43 | + |
| 44 | + |
| 45 | +*You’ll be prompted again to confirm. Click the install button once more to proceed.* |
| 46 | + |
| 47 | +### 5. Wait for Installation to Complete |
| 48 | + |
| 49 | + |
| 50 | +*In case of failure, retry. All files are installed in `USER/.imswitch`, including a standalone Miniconda environment.* |
| 51 | + |
| 52 | + |
| 53 | +*Don’t close the extra terminal window. If anything fails or looks suspicious, restart the installer.* |
| 54 | + |
| 55 | + |
| 56 | +*Python and pip packages will now be installed. Make sure camera drivers are also installed from the menu.* |
| 57 | + |
| 58 | +### 6. Start ImSwitch |
| 59 | + |
| 60 | + |
| 61 | +*After installation, click the "Start ImSwitch Web Server" button.* |
| 62 | + |
| 63 | + |
| 64 | +*Click again even if the loading spinner is active.* |
| 65 | + |
| 66 | + |
| 67 | +*ImSwitch will start and load within the app. You can also access it via [http://localhost:8001/](http://localhost:8001/) in your browser.* |
| 68 | + |
| 69 | + |
| 70 | +*Accept any firewall requests to allow local connections.* |
| 71 | + |
| 72 | + |
| 73 | +*The application is fully accessible via [http://localhost:8001/](http://localhost:8001/).* |
| 74 | + |
| 75 | + |
| 76 | +*If you are connecting to a secure version of ImSwitch, change the protocol from https to http in the left menu’s connection settings.* |
| 77 | + |
| 78 | + |
| 79 | +*Activate the light source and live stream, then adjust intensity to view the simulated microscope image.* |
| 80 | + |
| 81 | + |
| 82 | +*Explore the API documentation at [http://localhost:8001/docs](http://localhost:8001/docs) via Swagger UI.* |
| 83 | + |
| 84 | +Watch the full installation process here: |
| 85 | +[](https://www.youtube.com/watch?v=N4P1sH2E9RU?si=jyhAzLshAbg26YHu) |
| 86 | + |
| 87 | +--- |
| 88 | + |
| 89 | +## 🔧 Features |
| 90 | + |
| 91 | +* **One-Click Installation** with auto dependency resolution |
| 92 | +* **Cross-platform:** macOS, Windows, Linux |
| 93 | +* **Embedded Web UI:** No need for an external browser |
| 94 | +* **Camera Driver Installation** via GUI |
| 95 | +* **Configurable Git/PIP Update System** |
| 96 | +* **Easy Uninstallation:** Just delete the ImSwitch folder |
| 97 | + |
| 98 | +--- |
| 99 | + |
| 100 | +## 🔄 Updating ImSwitch |
| 101 | + |
| 102 | +* Update source code via Git (ImSwitch, UC2-REST) |
| 103 | +* Update Python packages via pip (from GitHub archives or local path) |
| 104 | +* `psygnal` is installed with `--no-binary` for compatibility |
| 105 | + |
| 106 | +Just click **Update** in the installer to trigger this. |
| 107 | + |
| 108 | +--- |
| 109 | + |
| 110 | +## 📸 Driver Installation |
| 111 | + |
| 112 | +Use the "Driver Installation" button in the menu to install: |
| 113 | + |
| 114 | +* Daheng camera drivers |
| 115 | +* HIK Vision camera drivers |
| 116 | + |
| 117 | +Make sure drivers are installed **before** starting ImSwitch. |
| 118 | + |
| 119 | +--- |
| 120 | + |
| 121 | +## 💡 Upcoming Features |
| 122 | + |
| 123 | +* Flash UC2 firmware directly from the installer |
| 124 | +* Drag-and-drop GUI builder for hardware configurations |
| 125 | + |
| 126 | +--- |
| 127 | + |
| 128 | +## 🛠️ Install from Source |
| 129 | + |
| 130 | +```bash |
| 131 | +# Clone repository |
| 132 | +git clone https://github.com/openUC2/imswitchinstaller.git |
| 133 | +cd imswitchinstaller |
| 134 | + |
| 135 | +# Install dependencies |
| 136 | +npm install |
| 137 | + |
| 138 | +# Run app |
| 139 | +npm start |
| 140 | + |
| 141 | +# Build installers |
| 142 | +npm run dist |
| 143 | +``` |
| 144 | + |
| 145 | +--- |
| 146 | + |
| 147 | +## 🤖 Automated Builds |
| 148 | + |
| 149 | +GitHub Actions build the app for all platforms: |
| 150 | + |
| 151 | +* **Windows:** `.exe` installer via NSIS |
| 152 | +* **macOS:** `.dmg` for Intel and Apple Silicon |
| 153 | +* **Linux:** `.AppImage` and `.deb` |
| 154 | + |
| 155 | +Releases are created automatically for new commits on `main`. Pre-releases are available for testing pull requests. |
| 156 | + |
| 157 | +--- |
| 158 | + |
| 159 | +## 🐍 Debugging |
| 160 | + |
| 161 | +### Python Environment Paths |
| 162 | + |
| 163 | +* **Windows:** `C:\\Users\\YOURNAME\\ImSwitch\\miniforge\\python.exe` |
| 164 | +* **macOS/Linux:** `/Users/YOURNAME/ImSwitch/miniforge/bin/python` |
| 165 | +* **Package folder:** `.../site-packages/imswitch` |
| 166 | +* **Conda usage:** `mamba install devbio-napari -c conda-forge` |
| 167 | + |
| 168 | +--- |
| 169 | + |
| 170 | +## 📜 License and Attribution |
| 171 | + |
| 172 | +This installer builds on [BellJar](https://github.com/danmarshall/belljar). Big thanks to the original authors for their open-source contribution! |
| 173 | + |
| 174 | +--- |
| 175 | + |
| 176 | +## 💬 Feedback & Support |
| 177 | + |
| 178 | +* Post issues on [GitHub](https://github.com/openUC2/ImSwitchInstaller/issues) |
| 179 | +* Join the discussion at [openuc2.discourse.group](https://openuc2.discourse.group) |
| 180 | +* Check the main website: [openUC2.com](https://openUC2.com) |
| 181 | + |
| 182 | +--- |
| 183 | + |
| 184 | +Continue with [Configuration](../03_Configuration/README.md) to set up your specific hardware. |
0 commit comments