Update BUILD.md
Signed-off-by: Admin <administrator@noreply.localhost>
This commit is contained in:
		
							parent
							
								
									91d2e07ad9
								
							
						
					
					
						commit
						1db9ea8beb
					
				
							
								
								
									
										48
									
								
								BUILD.md
									
									
									
									
									
								
							
							
						
						
									
										48
									
								
								BUILD.md
									
									
									
									
									
								
							@ -1,30 +1,44 @@
 | 
				
			|||||||
# Welcome! This is a building guide for converse.rs
 | 
					## Welcome! This is a building guide for RS Desktop
 | 
				
			||||||
 | 
					
 | 
				
			||||||
TODO: can anyone make this fancier pls
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
### prerequisites:
 | 
					### Prerequisites:
 | 
				
			||||||
vscode or something similar, get it from here https://github.com/e3kskoy7wqk/Electron-for-windows-7
 | 
					- [VSCode](https://github.com/e3kskoy7wqk/vscode-for-windows-7) or anything similar (optional but recommended)
 | 
				
			||||||
 | 
					- [NodeJS 16](https://nodejs.org/dist/v16.20.2/node-v16.20.2-x64.msi) - Yes, it's outdated, we just didn't have the time to update the project to a more recent version.
 | 
				
			||||||
 | 
					- [The special Electron](https://github.com/e3kskoy7wqk/Electron-for-windows-7)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
nodejs 16, one day this will work with more modern nodejs, its just that theres no point in updating it now.
 | 
					### Building
 | 
				
			||||||
 | 
					 | 
				
			||||||
### how2build
 | 
					 | 
				
			||||||
1. clone or download this repository
 | 
					1. clone or download this repository
 | 
				
			||||||
2. you open a terminal in vscode, and type the following commands
 | 
					
 | 
				
			||||||
 | 
					```https://git.randomserver.top/legacytard-association/converse.rs.git```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					2. Open a terminal in VSCode, and type the following commands
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```npm i```
 | 
					```npm i```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```$(npm bin)/electron-rebuild```
 | 
					```$(npm bin)/electron-rebuild```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(Windows 10+ users) To run, use the following command
 | 
					3. To build this into an asar, you run this command
 | 
				
			||||||
 | 
					 | 
				
			||||||
```npm start```
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
If you are wondering why you can only test this on windows 10 without packaging, it is because [electron added ESM support in electron 28](https://www.electronjs.org/blog/electron-28-0#highlights), not 22.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
If you happen to be a windows 8.1 and under user, you can still test this, but you have to package the build using electron-builder, just run the following:
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
```npx electron-builder```
 | 
					```npx electron-builder```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
get yourself a copy of [the special electron](https://github.com/e3kskoy7wqk/Electron-for-windows-7) , after that go into the dist > win-unpackaged > resources, grab the asar file, and put it in [your special electron](https://github.com/e3kskoy7wqk/Electron-for-windows-7) (same thing, except it's in that one's resources folder)
 | 
					After that,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Go to dist > win-unpackaged > resources in your app's build.
 | 
				
			||||||
 | 
					- Copy the .asar file you find there.
 | 
				
			||||||
 | 
					- Paste it into the resources folder of the special Electron (replacing its existing .asar if needed).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					4. Testing a build without packaging into an asar (Windows 10+ only)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```npm start```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					If you are wondering why you can only test this on windows 10 without packaging, it is because [electron added ESM support in electron 28](https://www.electronjs.org/blog/electron-28-0#highlights), not 22. RS Desktop uses ESM, not CommonJS.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					If you happen to be a windows 8.1 and under user, you can still test this, but you have to package it into an asar everytime, as seen in step 3.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Good luck building RS Desktop, fellow developers =)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Sadly, you do have to package the asar everytime, but oh well, it's whatever at the very least you can build on your OS
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user