mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	added scripts for running trilium as "portable"
This commit is contained in:
		
							parent
							
								
									6d6695e3a9
								
							
						
					
					
						commit
						81fbefb9cd
					
				
							
								
								
									
										16
									
								
								.idea/dataSources.xml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										16
									
								
								.idea/dataSources.xml
									
									
									
										generated
									
									
									
								
							| @ -5,7 +5,21 @@ | |||||||
|       <driver-ref>sqlite.xerial</driver-ref> |       <driver-ref>sqlite.xerial</driver-ref> | ||||||
|       <synchronize>true</synchronize> |       <synchronize>true</synchronize> | ||||||
|       <jdbc-driver>org.sqlite.JDBC</jdbc-driver> |       <jdbc-driver>org.sqlite.JDBC</jdbc-driver> | ||||||
|       <jdbc-url>jdbc:sqlite:$USER_HOME$/trilium-data/document.db</jdbc-url> |       <jdbc-url>jdbc:sqlite:$PROJECT_DIR$/../trilium-data/document.db</jdbc-url> | ||||||
|  |     </data-source> | ||||||
|  |     <data-source source="LOCAL" name="document" uuid="066dc5f4-4097-429e-8cf1-3adc0a9d648a"> | ||||||
|  |       <driver-ref>sqlite.xerial</driver-ref> | ||||||
|  |       <synchronize>true</synchronize> | ||||||
|  |       <jdbc-driver>org.sqlite.JDBC</jdbc-driver> | ||||||
|  |       <jdbc-url>jdbc:sqlite:$PROJECT_DIR$/dist/trilium linux x64/trilium-data/document.db</jdbc-url> | ||||||
|  |       <libraries> | ||||||
|  |         <library> | ||||||
|  |           <url>file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.16.1/xerial-sqlite-license.txt</url> | ||||||
|  |         </library> | ||||||
|  |         <library> | ||||||
|  |           <url>file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.16.1/sqlite-jdbc-3.16.1.jar</url> | ||||||
|  |         </library> | ||||||
|  |       </libraries> | ||||||
|     </data-source> |     </data-source> | ||||||
|   </component> |   </component> | ||||||
| </project> | </project> | ||||||
| @ -29,6 +29,9 @@ cp images/app-icons/png/128x128.png $BUILD_DIR/icon.png | |||||||
| # removing software WebGL binaries because they are pretty huge and not necessary | # removing software WebGL binaries because they are pretty huge and not necessary | ||||||
| rm -r $BUILD_DIR/swiftshader | rm -r $BUILD_DIR/swiftshader | ||||||
| 
 | 
 | ||||||
|  | cp bin/tpl/portable-trilium.sh $BUILD_DIR/ | ||||||
|  | chmod 755 $BUILD_DIR/portable-trilium.sh | ||||||
|  | 
 | ||||||
| echo "Packaging linux x64 electron distribution..." | echo "Packaging linux x64 electron distribution..." | ||||||
| VERSION=`jq -r ".version" package.json` | VERSION=`jq -r ".version" package.json` | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -31,6 +31,8 @@ mv "./dist/Trilium Notes-win32-x64" $BUILD_DIR | |||||||
| # removing software WebGL binaries because they are pretty huge and not necessary | # removing software WebGL binaries because they are pretty huge and not necessary | ||||||
| rm -r $BUILD_DIR/swiftshader | rm -r $BUILD_DIR/swiftshader | ||||||
| 
 | 
 | ||||||
|  | cp bin/tpl/portable-trilium.bat $BUILD_DIR/ | ||||||
|  | 
 | ||||||
| echo "Zipping windows x64 electron distribution..." | echo "Zipping windows x64 electron distribution..." | ||||||
| VERSION=`jq -r ".version" package.json` | VERSION=`jq -r ".version" package.json` | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										4
									
								
								bin/tpl/portable-trilium.bat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								bin/tpl/portable-trilium.bat
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,4 @@ | |||||||
|  | SET DIR=%~dp0 | ||||||
|  | SET TRILIUM_DATA_DIR=%DIR%\trilium-data | ||||||
|  | cd %DIR% | ||||||
|  | start trilium.exe | ||||||
							
								
								
									
										7
									
								
								bin/tpl/portable-trilium.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										7
									
								
								bin/tpl/portable-trilium.sh
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,7 @@ | |||||||
|  | #!/usr/bin/env sh | ||||||
|  | 
 | ||||||
|  | DIR=`dirname "$0"` | ||||||
|  | export TRILIUM_DATA_DIR="$DIR/trilium-data" | ||||||
|  | 
 | ||||||
|  | "$DIR/trilium" | ||||||
|  | 
 | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam