| 
									
										
										
										
											2018-12-02 00:26:45 +01:00
										 |  |  | #!/usr/bin/env bash
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-11 21:22:59 +02:00
										 |  |  | SRC_DIR=./dist/trilium-linux-x64-src | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if [ "$1" != "DONTCOPY" ] | 
					
						
							|  |  |  | then | 
					
						
							|  |  |  |     ./bin/copy-trilium.sh $SRC_DIR | 
					
						
							|  |  |  | fi | 
					
						
							| 
									
										
										
										
											2018-12-02 00:26:45 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-15 21:49:36 +02:00
										 |  |  | rm -r $SRC_DIR/src/public/app-dist/*.mobile.* | 
					
						
							| 
									
										
										
										
											2020-04-12 14:22:51 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-22 23:07:31 +02:00
										 |  |  | echo "Copying required linux-x64 binaries" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-26 23:51:30 +02:00
										 |  |  | cp -r bin/better-sqlite3/linux-desktop-better_sqlite3.node $SRC_DIR/node_modules/better-sqlite3/build/Release/better_sqlite3.node | 
					
						
							| 
									
										
										
										
											2019-01-12 19:48:45 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-16 17:34:48 +02:00
										 |  |  | echo "Packaging linux x64 electron build" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-11 21:22:59 +02:00
										 |  |  | ./node_modules/.bin/electron-packager $SRC_DIR --asar --out=dist --executable-name=trilium --platform=linux --arch=x64 --overwrite | 
					
						
							| 
									
										
										
										
											2018-12-02 00:26:45 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-11 21:22:59 +02:00
										 |  |  | BUILD_DIR=./dist/trilium-linux-x64 | 
					
						
							|  |  |  | rm -rf $BUILD_DIR | 
					
						
							| 
									
										
										
										
											2018-12-02 00:26:45 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | mv "./dist/Trilium Notes-linux-x64" $BUILD_DIR | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-30 09:39:58 +01:00
										 |  |  | cp images/app-icons/png/128x128.png $BUILD_DIR/icon.png | 
					
						
							| 
									
										
										
										
											2019-01-22 19:49:33 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-02 00:26:45 +01:00
										 |  |  | # removing software WebGL binaries because they are pretty huge and not necessary | 
					
						
							|  |  |  | rm -r $BUILD_DIR/swiftshader | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-29 21:55:57 +02:00
										 |  |  | cp bin/tpl/portable-trilium.sh $BUILD_DIR/ | 
					
						
							|  |  |  | chmod 755 $BUILD_DIR/portable-trilium.sh | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-02 00:26:45 +01:00
										 |  |  | echo "Packaging linux x64 electron distribution..." | 
					
						
							|  |  |  | VERSION=`jq -r ".version" package.json` | 
					
						
							| 
									
										
										
										
											2019-01-12 19:48:45 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-16 23:57:09 +01:00
										 |  |  | cd dist | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | tar cJf trilium-linux-x64-${VERSION}.tar.xz trilium-linux-x64 | 
					
						
							| 
									
										
										
										
											2019-10-11 21:22:59 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | cd .. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-22 23:07:31 +02:00
										 |  |  | bin/build-debian.sh |