Skip to content

Commit

Permalink
add local builld
Browse files Browse the repository at this point in the history
  • Loading branch information
eltorio committed Apr 21, 2024
1 parent f0371aa commit 038912c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions build-sctg.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ def make_parser():
action='store_true',
help='Enable feature Quic'
)
parser.add_argument(
'--local_build',
action='store_true',
help='Only for local build',
default=False
)
API_SERVER = os.environ['API_SERVER']
parser.add_argument(
'--disable_api_server_forced',
Expand Down Expand Up @@ -549,8 +555,9 @@ def sctgdesk_customization(args):
replace_in_file('flutter/web/client.html', '__API_SERVER__', f'{API_SERVER_PROTOCOL}://{API_SERVER}')
insert_line_after('src/common.rs','pub fn get_api_server',f' return format!("{API_SERVER_PROTOCOL}://{API_SERVER}");')
insert_line_after('flutter/web/js/src/globals.js','function getApiServer()',f' return "{API_SERVER_PROTOCOL}://{API_SERVER}";')
replace_in_file('flutter/lib/models/platform_model.dart', 'RustdeskImpl', f'{APP_NAME_CAPITALIZED}Impl')
replace_in_file('flutter/lib/models/native_model.dart', 'RustdeskImpl', f'{APP_NAME_CAPITALIZED}Impl')
if args.local_build:
replace_in_file('flutter/lib/models/platform_model.dart', 'RustdeskImpl', f'{APP_NAME_CAPITALIZED}Impl')
replace_in_file('flutter/lib/models/native_model.dart', 'RustdeskImpl', f'{APP_NAME_CAPITALIZED}Impl')

def build_ios_ipa(version, features):
MACOS_CODESIGN_IDENTITY = os.environ.get('MACOS_CODESIGN_IDENTITY')
Expand Down

0 comments on commit 038912c

Please sign in to comment.