Refact. build.py, skip portable packing (#7264)
ci and build.py do the packing. Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
		
							parent
							
								
									7b8e983412
								
							
						
					
					
						commit
						1b99d28c9b
					
				
							
								
								
									
										3
									
								
								.github/workflows/flutter-build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.github/workflows/flutter-build.yml
									
									
									
									
										vendored
									
									
								
							| @ -107,7 +107,7 @@ jobs: | |||||||
|         shell: bash |         shell: bash | ||||||
| 
 | 
 | ||||||
|       - name: Build rustdesk |       - name: Build rustdesk | ||||||
|         run: python3 .\build.py --portable --hwcodec --flutter --gpucodec |         run: python3 .\build.py --portable --hwcodec --flutter --gpucodec --skip-portable-pack | ||||||
| 
 | 
 | ||||||
|       - name: find Runner.res |       - name: find Runner.res | ||||||
|         # Windows: find Runner.res (compiled from ./flutter/windows/runner/Runner.rc), copy to ./Runner.res |         # Windows: find Runner.res (compiled from ./flutter/windows/runner/Runner.rc), copy to ./Runner.res | ||||||
| @ -141,6 +141,7 @@ jobs: | |||||||
|         if: env.UPLOAD_ARTIFACT == 'true' |         if: env.UPLOAD_ARTIFACT == 'true' | ||||||
|         run: | |         run: | | ||||||
|           pushd ./libs/portable |           pushd ./libs/portable | ||||||
|  |           pip3 install -r requirements.txt | ||||||
|           python3 ./generate.py -f ../../flutter/build/windows/x64/runner/Release/ -o . -e ../../flutter/build/windows/x64/runner/Release/rustdesk.exe |           python3 ./generate.py -f ../../flutter/build/windows/x64/runner/Release/ -o . -e ../../flutter/build/windows/x64/runner/Release/rustdesk.exe | ||||||
|           popd |           popd | ||||||
|           mkdir -p ./SignOutput |           mkdir -p ./SignOutput | ||||||
|  | |||||||
							
								
								
									
										12
									
								
								build.py
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								build.py
									
									
									
									
									
								
							| @ -145,6 +145,12 @@ def make_parser(): | |||||||
|         action='store_true', |         action='store_true', | ||||||
|         help='Skip cargo build process, only flutter version + Linux supported currently' |         help='Skip cargo build process, only flutter version + Linux supported currently' | ||||||
|     ) |     ) | ||||||
|  |     if windows: | ||||||
|  |         parser.add_argument( | ||||||
|  |             '--skip-portable-pack', | ||||||
|  |             action='store_true', | ||||||
|  |             help='Skip packing, only flutter version + Windows supported' | ||||||
|  |         ) | ||||||
|     parser.add_argument( |     parser.add_argument( | ||||||
|         "--package", |         "--package", | ||||||
|         type=str |         type=str | ||||||
| @ -427,7 +433,7 @@ def build_flutter_arch_manjaro(version, features): | |||||||
|     system2('HBB=`pwd`/.. FLUTTER=1 makepkg -f') |     system2('HBB=`pwd`/.. FLUTTER=1 makepkg -f') | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def build_flutter_windows(version, features): | def build_flutter_windows(version, features, skip_portable_pack): | ||||||
|     if not skip_cargo: |     if not skip_cargo: | ||||||
|         system2(f'cargo build --features {features} --lib --release') |         system2(f'cargo build --features {features} --lib --release') | ||||||
|         if not os.path.exists("target/release/librustdesk.dll"): |         if not os.path.exists("target/release/librustdesk.dll"): | ||||||
| @ -438,6 +444,8 @@ def build_flutter_windows(version, features): | |||||||
|     os.chdir('..') |     os.chdir('..') | ||||||
|     shutil.copy2('target/release/deps/dylib_virtual_display.dll', |     shutil.copy2('target/release/deps/dylib_virtual_display.dll', | ||||||
|                  flutter_build_dir_2) |                  flutter_build_dir_2) | ||||||
|  |     if skip_portable_pack: | ||||||
|  |         return | ||||||
|     os.chdir('libs/portable') |     os.chdir('libs/portable') | ||||||
|     system2('pip3 install -r requirements.txt') |     system2('pip3 install -r requirements.txt') | ||||||
|     system2( |     system2( | ||||||
| @ -487,7 +495,7 @@ def main(): | |||||||
|         os.chdir('../../..') |         os.chdir('../../..') | ||||||
| 
 | 
 | ||||||
|         if flutter: |         if flutter: | ||||||
|             build_flutter_windows(version, features) |             build_flutter_windows(version, features, args.skip_portable_pack) | ||||||
|             return |             return | ||||||
|         system2('cargo build --release --features ' + features) |         system2('cargo build --release --features ' + features) | ||||||
|         # system2('upx.exe target/release/rustdesk.exe') |         # system2('upx.exe target/release/rustdesk.exe') | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user