@@ -122,14 +122,11 @@ exec --fail-on-error ${python} -m py2many --rust=1 /tmp/piksi_tools_constants.py
122122'''
123123
124124[tasks .generate-resources ]
125- command = " ${PYSIDE2_RCC}"
126- args = [
127- " resources/console_resources.qrc" ,
128- " -o" ,
129- " swiftnav_console/console_resources.py" ,
130- " -g" ,
131- " python" ,
132- ]
125+ dependencies = [" build-splash-version" ]
126+ script_runner = " @duckscript"
127+ script = '''
128+ exec --fail-on-error "${PYSIDE2_RCC}" "resources/console_resources.qrc" "-o" "swiftnav_console/console_resources.py" "-g" "python"
129+ '''
133130
134131[tasks .check-capnp ]
135132script_runner = " @shell"
@@ -357,7 +354,6 @@ script = "sudo apt-get install gsfonts imagemagick"
357354script = " brew install imagemagick"
358355
359356[tasks .build-splash-version ]
360- private = true
361357script_runner = " @duckscript"
362358script = '''
363359output = exec --fail-on-error git describe --always --tags --dirty
@@ -370,30 +366,39 @@ else
370366end
371367'''
372368
373- [tasks .build-splash-bin ]
374- private = true
369+ [tasks .build-windowpos-bin ]
375370dependencies = [" build-splash-version" ]
376371command = " cargo"
377372args = [
378373 " build" ,
379374 " --release" ,
380375 " -vv" ,
381376 " --features" ,
382- " splash " ,
377+ " winit " ,
383378 " --bin" ,
384- " swift-console-splash " ,
379+ " windowpos " ,
385380]
386381
387382[tasks .build-console-bin ]
388- private = true
389- dependencies = [" build-splash-bin" ]
383+ command = " cargo"
384+ args = [
385+ " build" ,
386+ " --release" ,
387+ " -vv" ,
388+ " --features=entrypoint" ,
389+ " --bin" ,
390+ " ${APP_NAME}" ,
391+ ]
392+
393+ [tasks .build-console-bin .linux ]
394+ dependencies = [" build-windowpos-bin" ]
390395command = " cargo"
391396args = [
392397 " build" ,
393398 " --release" ,
394399 " -vv" ,
395400 " --features" ,
396- " entrypoint" ,
401+ " entrypoint,splash " ,
397402 " --bin" ,
398403 " ${APP_NAME}" ,
399404]
@@ -412,19 +417,21 @@ script_runner = "@duckscript"
412417script = '''
413418app_name = get_env APP_NAME
414419cp target/release/${app_name} py39-dist/${app_name}
415- cp target/release/swift-console-splash py39-dist/swift-console-splash
416420os = os_family
417421if eq ${os} mac
418422 exec --fail-on-error install_name_tool -change /install/lib/libpython3.9.dylib @executable_path/lib/libpython3.9.dylib py39-dist/${app_name}
423+ elseif eq ${os} linux
424+ cp target/release/windowpos py39-dist/windowpos
419425end
420426'''
421427
422428[tasks .build-dist-install-console .windows ]
423429script = '''
424- cp target/release/swift-console-splash.exe py39-dist/swift-console-splash.exe
425430cp target/release/${APP_NAME}.exe py39-dist/${APP_NAME}.exe
426431cp target/release/${APP_NAME}.d py39-dist/${APP_NAME}.d
427- cp target/release/swift_console.pdb py39-dist/swift_console.pdb
432+ if is_path_exists target/release/swift_console.pdb
433+ cp target/release/swift_console.pdb py39-dist/swift_console.pdb
434+ end
428435cp target/x86_64-pc-windows-msvc/release/console_backend.pdb py39-dist/Lib/site-packages/console_backend/console_backend.pdb
429436'''
430437
@@ -688,7 +695,6 @@ mkdir ${contents_dir}
688695mkdir ${contents_mac_os}
689696exec --fail-on-error cp -r py39-dist "${contents_resources_dir}"
690697exec --fail-on-error mv ./${contents_resources_dir}/${app_original_name} "./${contents_mac_os}/${app_file_prefix}"
691- exec --fail-on-error mv ./${contents_resources_dir}/swift-console-splash "./${contents_mac_os}/swift-console-splash"
692698exec --fail-on-error ln -s "../Resources/lib" ${contents_mac_os}/lib
693699exec --fail-on-error ln -s "../Resources/.frozen" ${contents_mac_os}/.frozen
694700exec --fail-on-error ln -s "../Resources/resources" ${contents_mac_os}/resources
@@ -885,6 +891,20 @@ dependencies = ["store-version", "copy-capnp"]
885891command = " cargo"
886892args = [" check" ]
887893
894+ [tasks .watch-entrypoint ]
895+ dependencies = [" store-version" , " copy-capnp" ]
896+ command = " cargo"
897+ args = [
898+ " watch" ,
899+ " --exec" ,
900+ " check --bin swift-console --features=entrypoint,splash" ,
901+ ]
902+
903+ [tasks .watch-windowpos ]
904+ dependencies = [" store-version" , " copy-capnp" ]
905+ command = " cargo"
906+ args = [" watch" , " --exec" , " check --bin windowpos --features=winit" ]
907+
888908[tasks .python-type-check ]
889909dependencies = [" set-python-files" ]
890910command = " ${PYTHON}"
0 commit comments