mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	build: Add icon.png for Linux builds (fixes #507)
This commit is contained in:
		
							parent
							
								
									0768a2a0a3
								
							
						
					
					
						commit
						e3e6f56a88
					
				| @ -20,13 +20,20 @@ module.exports = { | |||||||
|     afterComplete: [(buildPath, _electronVersion, platform, _arch, callback) => { |     afterComplete: [(buildPath, _electronVersion, platform, _arch, callback) => { | ||||||
|       const extraResources = getExtraResourcesForPlatform(); |       const extraResources = getExtraResourcesForPlatform(); | ||||||
|       for (const resource of extraResources) { |       for (const resource of extraResources) { | ||||||
|  |         const baseName = path.basename(resource); | ||||||
|         let sourcePath; |         let sourcePath; | ||||||
|         if (platform === 'darwin') { |         if (platform === 'darwin') { | ||||||
|           sourcePath = path.join(buildPath, `${APP_NAME}.app`, 'Contents', 'Resources', path.basename(resource)); |           sourcePath = path.join(buildPath, `${APP_NAME}.app`, 'Contents', 'Resources', baseName); | ||||||
|         } else { |         } else { | ||||||
|           sourcePath = path.join(buildPath, 'resources', path.basename(resource)); |           sourcePath = path.join(buildPath, 'resources', path.basename(resource)); | ||||||
|         } |         } | ||||||
|         const destPath = path.join(buildPath, path.basename(resource)); |         let destPath; | ||||||
|  |          | ||||||
|  |         if (baseName !== "256x256.png") { | ||||||
|  |           destPath = path.join(buildPath, path.basename(resource)); | ||||||
|  |         } else { | ||||||
|  |           destPath = path.join(buildPath, "icon.png"); | ||||||
|  |         } | ||||||
| 
 | 
 | ||||||
|         // Copy files from resources folder to root
 |         // Copy files from resources folder to root
 | ||||||
|         fs.move(sourcePath, destPath) |         fs.move(sourcePath, destPath) | ||||||
| @ -96,6 +103,7 @@ function getExtraResourcesForPlatform() { | |||||||
|     case 'darwin': |     case 'darwin': | ||||||
|       break; |       break; | ||||||
|     case 'linux': |     case 'linux': | ||||||
|  |       resources.push("images/app-icons/png/256x256.png") | ||||||
|       for (const script of scripts) { |       for (const script of scripts) { | ||||||
|         resources.push(`./bin/tpl/${script}.sh`) |         resources.push(`./bin/tpl/${script}.sh`) | ||||||
|       } |       } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran