mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-27 14:59:02 +08:00
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
|
||||
|
||||
- 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
|
||||
# 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'
|
||||
run: |
|
||||
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
|
||||
popd
|
||||
mkdir -p ./SignOutput
|
||||
|
12
build.py
12
build.py
@ -145,6 +145,12 @@ def make_parser():
|
||||
action='store_true',
|
||||
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(
|
||||
"--package",
|
||||
type=str
|
||||
@ -427,7 +433,7 @@ def build_flutter_arch_manjaro(version, features):
|
||||
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:
|
||||
system2(f'cargo build --features {features} --lib --release')
|
||||
if not os.path.exists("target/release/librustdesk.dll"):
|
||||
@ -438,6 +444,8 @@ def build_flutter_windows(version, features):
|
||||
os.chdir('..')
|
||||
shutil.copy2('target/release/deps/dylib_virtual_display.dll',
|
||||
flutter_build_dir_2)
|
||||
if skip_portable_pack:
|
||||
return
|
||||
os.chdir('libs/portable')
|
||||
system2('pip3 install -r requirements.txt')
|
||||
system2(
|
||||
@ -487,7 +495,7 @@ def main():
|
||||
os.chdir('../../..')
|
||||
|
||||
if flutter:
|
||||
build_flutter_windows(version, features)
|
||||
build_flutter_windows(version, features, args.skip_portable_pack)
|
||||
return
|
||||
system2('cargo build --release --features ' + features)
|
||||
# system2('upx.exe target/release/rustdesk.exe')
|
||||
|
Loading…
Reference in New Issue
Block a user