diff --git a/.clangd b/.clangd deleted file mode 100644 index 3c24f8c29..000000000 --- a/.clangd +++ /dev/null @@ -1,3 +0,0 @@ -CompileFlags: - Remove: - - -mno-direct-extern-access diff --git a/.gitignore b/.gitignore index 4477abd4e..1252fd827 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,4 @@ .DS_Store -/.cache/ -/.flatpak-builder/ -/build/ /dist/ /site/ /target/ diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 804f22e63..727f1f16b 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,7 +1,5 @@ { "recommendations": [ - "llvm-vs-code-extensions.vscode-clangd", - "ms-vscode.cmake-tools", "ms-vscode.hexeditor", "redhat.vscode-yaml", "rust-lang.rust-analyzer", diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 67b6a0f19..000000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,43 +0,0 @@ -cmake_minimum_required(VERSION 3.21) - -include(FetchContent) - -# Fetch external CMake scripts. -FetchContent_Declare( - msvc - GIT_REPOSITORY https://github.com/MarkSchofield/WindowsToolchain.git - GIT_TAG v0.11.0 - GIT_SHALLOW ON -) - -FetchContent_MakeAvailable(msvc) - -# Set project properties. -project(obliteration) - -# Set warning level to highest. This will propagate to sub-directories too. -if(WIN32) - add_compile_options(/W4) -else() - add_compile_options(-Wall -Wextra) -endif() - -# Fix warning for DOWNLOAD_EXTRACT_TIMESTAMP on ExternalProject. -if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") - cmake_policy(SET CMP0135 NEW) -endif() - -# Setup Rust targets. -if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "arm64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64") - # Pre-compiled core crate for aarch64-unknown-none-softfloat does not support - # Position-Independent Executable so we need nightly toolchain for build-std feature to - # re-build core crate to support Position-Independent Executable. - set(kernel_env "softfloat") - set(kernel_toolchain "nightly") - set(kernel_opts -Z build-std=core,alloc) -else() - set(kernel_env "") -endif() - -# Add GUI. -add_subdirectory(gui) diff --git a/CMakePresets.json b/CMakePresets.json deleted file mode 100644 index 82c29192d..000000000 --- a/CMakePresets.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "version": 3, - "configurePresets": [ - { - "name": "default", - "binaryDir": "${sourceDir}/build", - "cacheVariables": { - "CMAKE_EXPORT_COMPILE_COMMANDS": true - } - }, - { - "name": "windows", - "inherits": "default", - "generator": "Ninja", - "toolchainFile": "_deps/msvc-src/Windows.MSVC.toolchain.cmake", - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Windows" - } - }, - { - "name": "windows-release", - "inherits": "windows", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Release" - } - }, - { - "name": "windows-debug", - "inherits": "windows", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug" - } - }, - { - "name": "linux", - "inherits": "default", - "generator": "Unix Makefiles", - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Linux" - } - }, - { - "name": "linux-release", - "inherits": "linux", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Release" - } - }, - { - "name": "linux-debug", - "inherits": "linux", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug" - } - }, - { - "name": "mac", - "inherits": "default", - "generator": "Unix Makefiles", - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Darwin" - } - }, - { - "name": "mac-release", - "inherits": "mac", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Release" - } - }, - { - "name": "mac-debug", - "inherits": "mac", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug" - } - } - ], - "buildPresets": [ - { - "name": "windows-release", - "configurePreset": "windows-release" - }, - { - "name": "windows-debug", - "configurePreset": "windows-debug" - }, - { - "name": "linux-release", - "configurePreset": "linux-release" - }, - { - "name": "linux-debug", - "configurePreset": "linux-debug" - }, - { - "name": "mac-release", - "configurePreset": "mac-release" - }, - { - "name": "mac-debug", - "configurePreset": "mac-debug" - } - ] -} diff --git a/Cargo.lock b/Cargo.lock index 8d95fb27d..3f8b635c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -186,17 +186,11 @@ dependencies = [ "libloading 0.7.4", ] -[[package]] -name = "ash" -version = "0.38.0+1.3.281" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" - [[package]] name = "ashpd" -version = "0.10.2" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9c39d707614dbcc6bed00015539f488d8e3fe3e66ed60961efc0c90f4b380b3" +checksum = "4d43c03d9e36dd40cab48435be0b09646da362c278223ca535493877b2c1dee9" dependencies = [ "async-fs", "async-net", @@ -459,6 +453,15 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + [[package]] name = "block2" version = "0.5.1" @@ -728,36 +731,6 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cbd0f76e066e64fdc5631e3bb46381254deab9ef1158292f27c8c57e3bf3fe59" -[[package]] -name = "cocoa" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" -dependencies = [ - "bitflags 1.3.2", - "block", - "cocoa-foundation", - "core-foundation 0.9.4", - "core-graphics 0.23.2", - "foreign-types", - "libc", - "objc", -] - -[[package]] -name = "cocoa-foundation" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" -dependencies = [ - "bitflags 1.3.2", - "block", - "core-foundation 0.9.4", - "core-graphics-types 0.1.3", - "libc", - "objc", -] - [[package]] name = "codemap" version = "0.1.3" @@ -826,12 +799,6 @@ dependencies = [ "syn", ] -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - [[package]] name = "copypasta" version = "0.10.1" @@ -920,12 +887,30 @@ dependencies = [ "libc", ] +[[package]] +name = "core_maths" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3b02505ccb8c50b0aa21ace0fc08c3e53adebd4e58caa18a36152803c7709a3" +dependencies = [ + "libm", +] + [[package]] name = "countme" version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7704b5fdd17b18ae31c4c1da5a2e0305a2bf17b5249300a9ee9ed7b72114c636" +[[package]] +name = "cpufeatures" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" +dependencies = [ + "libc", +] + [[package]] name = "crc32fast" version = "1.4.2" @@ -981,6 +966,16 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + [[package]] name = "ctor-lite" version = "0.1.0" @@ -1001,15 +996,23 @@ checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" [[package]] name = "derive_more" -version = "0.99.18" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ - "convert_case", "proc-macro2", "quote", - "rustc_version", "syn", + "unicode-xid", ] [[package]] @@ -1023,6 +1026,16 @@ dependencies = [ "syn", ] +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + [[package]] name = "dispatch" version = "0.2.0" @@ -1069,18 +1082,42 @@ checksum = "98888c4bbd601524c11a7ed63f814b8825f420514f78e96f752c437ae9cbb5d1" dependencies = [ "bitflags 2.6.0", "bytemuck", - "drm-ffi", + "drm-ffi 0.8.0", "drm-fourcc", "rustix", ] +[[package]] +name = "drm" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80bc8c5c6c2941f70a55c15f8d9f00f9710ebda3ffda98075f996a0e6c92756f" +dependencies = [ + "bitflags 2.6.0", + "bytemuck", + "drm-ffi 0.9.0", + "drm-fourcc", + "libc", + "rustix", +] + [[package]] name = "drm-ffi" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97c98727e48b7ccb4f4aea8cfe881e5b07f702d17b7875991881b41af7278d53" dependencies = [ - "drm-sys", + "drm-sys 0.7.0", + "rustix", +] + +[[package]] +name = "drm-ffi" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8e41459d99a9b529845f6d2c909eb9adf3b6d2f82635ae40be8de0601726e8b" +dependencies = [ + "drm-sys 0.8.0", "rustix", ] @@ -1100,6 +1137,16 @@ dependencies = [ "linux-raw-sys 0.6.5", ] +[[package]] +name = "drm-sys" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bafb66c8dbc944d69e15cfcc661df7e703beffbaec8bd63151368b06c5f9858c" +dependencies = [ + "libc", + "linux-raw-sys 0.6.5", +] + [[package]] name = "either" version = "1.13.0" @@ -1264,16 +1311,16 @@ dependencies = [ [[package]] name = "fontdb" -version = "0.18.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e32eac81c1135c1df01d4e6d4233c47ba11f6a6d07f33e0bba09d18797077770" +checksum = "a3a6f9af55fb97ad673fb7a69533eb2f967648a06fa21f8c9bb2cd6d33975716" dependencies = [ "fontconfig-parser", "log", "memmap2", "slotmap", "tinyvec", - "ttf-parser 0.21.1", + "ttf-parser 0.24.1", ] [[package]] @@ -1437,12 +1484,12 @@ dependencies = [ [[package]] name = "gbm" -version = "0.15.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45bf55ba6dd53ad0ac115046ff999c5324c283444ee6e0be82454c4e8eb2f36a" +checksum = "fa9a106f044fbd21edf2d8cc57300df1e60630e46ed4bebd59cdcbb23cfad1ce" dependencies = [ "bitflags 2.6.0", - "drm", + "drm 0.14.1", "drm-fourcc", "gbm-sys", "libc", @@ -1481,6 +1528,16 @@ dependencies = [ "num-traits", ] +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + [[package]] name = "gethostname" version = "0.4.3" @@ -1613,7 +1670,7 @@ version = "0.1.0" dependencies = [ "aarch64", "applevisor-sys", - "ash 0.38.0+1.3.281", + "ash", "ashpd", "bitfield-struct", "ciborium", @@ -1629,7 +1686,7 @@ dependencies = [ "i-slint-core", "i-slint-renderer-skia", "libc", - "metal 0.29.0", + "metal", "num_enum", "obconf", "obfw", @@ -1721,12 +1778,12 @@ dependencies = [ [[package]] name = "i-slint-backend-linuxkms" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab8f782e541bb2c856e388a63a409215a4f22876e68a5582f00032145fc08f9f" +checksum = "ddd0ce50deb29bb0fcb916aa6e011f6cddc4dfaa21073ac22da91bb5bd001635" dependencies = [ "calloop 0.14.1", - "drm", + "drm 0.14.1", "gbm", "glutin", "i-slint-common", @@ -1741,29 +1798,30 @@ dependencies = [ [[package]] name = "i-slint-backend-selector" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "350b9375a979856a3655a9905174b055726e85b9c4b6bd315f1d36f6529dbc33" +checksum = "c5c8d220d5fca4d5af0f2caa32f3654f3de410cb0904ee2adc568bf8ec63fbd4" dependencies = [ "cfg-if", "i-slint-backend-linuxkms", "i-slint-backend-winit", "i-slint-common", "i-slint-core", + "i-slint-core-macros", ] [[package]] name = "i-slint-backend-winit" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4831644094018b8533264d601ab54f585ba6cc834068e8eae77e571d4cc5b70e" +checksum = "16fde20570f59861dbe3a2b4400e16b57ba391908fd36a86e1548afdcc0ed5c7" dependencies = [ + "ashpd", "cfg-if", "cfg_aliases", - "cocoa", - "const-field-offset", "copypasta", "derive_more", + "futures", "glutin", "glutin-winit", "i-slint-common", @@ -1771,6 +1829,7 @@ dependencies = [ "i-slint-core-macros", "i-slint-renderer-skia", "lyon_path", + "objc2-app-kit", "once_cell", "pin-weak", "raw-window-handle 0.6.2", @@ -1784,21 +1843,22 @@ dependencies = [ [[package]] name = "i-slint-common" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd025e9a8c1bb6f2132ab453a0f552408050115552134200a7edea2247cccce" +checksum = "40f284cb26f5016f13734244ade66555f1e5abf8411bbae4762d2c403e2cd32a" dependencies = [ "cfg-if", "derive_more", "fontdb", "libloading 0.8.5", + "ttf-parser 0.25.0", ] [[package]] name = "i-slint-compiler" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c3d2bb25fc20cbd999e3c812cae181206d0280e6e73e7ead2fd4598412d93d8" +checksum = "5929d8a4bec474564cfe95f8ecf416acdcfe34c0eb1813550900dbfee77fbf61" dependencies = [ "by_address", "codemap", @@ -1813,8 +1873,10 @@ dependencies = [ "lyon_path", "num_enum", "once_cell", + "polib", "proc-macro2", "quote", + "rayon", "resvg", "rowan", "smol_str 0.3.2", @@ -1825,9 +1887,9 @@ dependencies = [ [[package]] name = "i-slint-core" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2757683b3377730a67966479a88d6c9f27f7b50b379e3a31c7fbf954e4a661" +checksum = "1825cad22c9ab6fc74600ad0406b79d5a71c3a27e7fc937a856d08848911bef3" dependencies = [ "auto_enums", "bitflags 2.6.0", @@ -1858,6 +1920,7 @@ dependencies = [ "slab", "static_assertions", "strum", + "sys-locale", "unicode-linebreak", "unicode-script", "unicode-segmentation", @@ -1869,38 +1932,38 @@ dependencies = [ [[package]] name = "i-slint-core-macros" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17c4f06e2ccbf6e7381abd64e8716767e97b5fdf15280decf8f08f8d58cde25c" +checksum = "b0580b8f31bad314e66dc074145c5a13ee415d3d2f5c00a6403907a9bff5241f" dependencies = [ "quote", + "serde_json", "syn", ] [[package]] name = "i-slint-renderer-skia" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d6e478f22705e017db15416434d5dec7b138b6a1853baacdb489b8b558c1eb" +checksum = "934e1a7bb834bd3abf853889a6806140829787d5adc8fb9f2f0a19f15a7be3fc" dependencies = [ - "ash 0.37.3+1.3.251", + "ash", "bytemuck", "cfg-if", "cfg_aliases", - "cocoa", "const-field-offset", - "core-foundation 0.9.4", - "core-graphics-types 0.1.3", "derive_more", - "foreign-types", "glow", "glutin", "i-slint-common", "i-slint-core", "i-slint-core-macros", "lyon_path", - "metal 0.27.0", - "objc", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-metal", + "objc2-quartz-core", "once_cell", "pin-weak", "raw-window-handle 0.6.2", @@ -2096,9 +2159,9 @@ dependencies = [ [[package]] name = "imagesize" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" +checksum = "edcd27d72f2f071c64249075f42e205ff93c9a4c5f6c6da53e79ed9f9832c285" [[package]] name = "indexmap" @@ -2340,6 +2403,15 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "linereader" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d921fea6860357575519aca014c6e22470585accdd543b370c404a8a72d0dd1d" +dependencies = [ + "memchr", +] + [[package]] name = "linked-hash-map" version = "0.5.6" @@ -2488,21 +2560,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "metal" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25" -dependencies = [ - "bitflags 2.6.0", - "block", - "core-graphics-types 0.1.3", - "foreign-types", - "log", - "objc", - "paste", -] - [[package]] name = "metal" version = "0.29.0" @@ -2642,7 +2699,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" dependencies = [ "malloc_buf", - "objc_exception", ] [[package]] @@ -2859,15 +2915,6 @@ dependencies = [ "objc2-foundation", ] -[[package]] -name = "objc_exception" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" -dependencies = [ - "cc", -] - [[package]] name = "objc_id" version = "0.1.1" @@ -3060,6 +3107,15 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "polib" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b393b155cf9be86249cba1b56cc81be0e6212c66d94ac0d76d37a1761f3bb1b" +dependencies = [ + "linereader", +] + [[package]] name = "polling" version = "3.7.4" @@ -3279,9 +3335,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "resvg" -version = "0.42.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "944d052815156ac8fa77eaac055220e95ba0b01fa8887108ca710c03805d9051" +checksum = "4a325d5e8d1cebddd070b13f44cec8071594ab67d1012797c121f27a669b7958" dependencies = [ "log", "pico-args", @@ -3354,14 +3410,16 @@ checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "rustybuzz" -version = "0.14.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfb9cf8877777222e4a3bc7eb247e398b56baba500c38c1c46842431adc8b55c" +checksum = "c85d1ccd519e61834798eb52c4e886e8c2d7d698dd3d6ce0b1b47eb8557f1181" dependencies = [ "bitflags 2.6.0", "bytemuck", + "core_maths", + "log", "smallvec", - "ttf-parser 0.21.1", + "ttf-parser 0.24.1", "unicode-bidi-mirroring", "unicode-ccc", "unicode-properties", @@ -3485,6 +3543,17 @@ dependencies = [ "unsafe-libyaml", ] +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + [[package]] name = "shlex" version = "1.3.0" @@ -3561,13 +3630,14 @@ dependencies = [ [[package]] name = "slint" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4ec667df21d0bf4a5eb49735ab476c809a625ba2fa9a59a2405bc9edf0977ce" +checksum = "2874954cf5e417b6e60277dcf943484565dba88ccae305ea11fde89aef565e77" dependencies = [ "const-field-offset", "i-slint-backend-selector", "i-slint-core", + "i-slint-core-macros", "num-traits", "once_cell", "pin-weak", @@ -3578,11 +3648,12 @@ dependencies = [ [[package]] name = "slint-build" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec068281021ccd3a69dbe36a0caf207d88aa5b50945ced9000f17a5d2b139003" +checksum = "9bbd42c91a4a702fef5ecfd08bd2d68515358cc8175e5233429c6f795c5966b7" dependencies = [ "i-slint-compiler", + "i-slint-core-macros", "spin_on", "thiserror 1.0.66", "toml_edit", @@ -3590,9 +3661,9 @@ dependencies = [ [[package]] name = "slint-macros" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f79eb3465efc8fb2f1939fd7473cbdfc75aa2d4eef3d2b3964b60595e357a2f" +checksum = "434260184bdff5f3fbe58bc82079b4241cdcee43902417cc511d2c0eb2d2947f" dependencies = [ "i-slint-compiler", "proc-macro2", @@ -3680,7 +3751,7 @@ dependencies = [ "bytemuck", "cfg_aliases", "core-graphics 0.24.0", - "drm", + "drm 0.12.0", "fastrand", "foreign-types", "js-sys", @@ -3792,6 +3863,15 @@ dependencies = [ "syn", ] +[[package]] +name = "sys-locale" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eab9a99a024a169fe8a903cf9d4a3b3601109bcc13bd9e3c6fff259138626c4" +dependencies = [ + "libc", +] + [[package]] name = "talc" version = "4.4.1" @@ -4051,12 +4131,27 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8" +[[package]] +name = "ttf-parser" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be21190ff5d38e8b4a2d3b6a3ae57f612cc39c96e83cedeaf7abc338a8bac4a" +dependencies = [ + "core_maths", +] + [[package]] name = "ttf-parser" version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5902c5d130972a0000f60860bfbf46f7ca3db5391eddfedd1b8728bd9dc96c0e" +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + [[package]] name = "udev" version = "0.9.1" @@ -4088,15 +4183,15 @@ checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-bidi-mirroring" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23cb788ffebc92c5948d0e997106233eeb1d8b9512f93f41651f52b6c5f5af86" +checksum = "64af057ad7466495ca113126be61838d8af947f41d93a949980b2389a118082f" [[package]] name = "unicode-ccc" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df77b101bcc4ea3d78dafc5ad7e4f58ceffe0b2b16bf446aeb50b6cb4157656" +checksum = "260bc6647b3893a9a90668360803a15f96b85a5257b1c3a0c3daf6ae2496de42" [[package]] name = "unicode-ident" @@ -4134,6 +4229,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "unsafe-libyaml" version = "0.2.11" @@ -4154,9 +4255,9 @@ dependencies = [ [[package]] name = "usvg" -version = "0.42.0" +version = "0.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84ea542ae85c715f07b082438a4231c3760539d902e11d093847a0b22963032" +checksum = "7447e703d7223b067607655e625e0dbca80822880248937da65966194c4864e6" dependencies = [ "base64", "data-url", @@ -4252,7 +4353,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70f4278f76307b3c388679234b397b4f90de29cdba53873c26b624ed82653d75" dependencies = [ "ahash", - "ash 0.37.3+1.3.251", + "ash", "bytemuck", "core-graphics-types 0.1.3", "crossbeam-queue", @@ -5054,9 +5155,9 @@ dependencies = [ [[package]] name = "zbus" -version = "5.1.1" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1162094dc63b1629fcc44150bcceeaa80798cd28bcbe7fa987b65a034c258608" +checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" dependencies = [ "async-broadcast", "async-executor", @@ -5071,17 +5172,19 @@ dependencies = [ "enumflags2", "event-listener", "futures-core", + "futures-sink", "futures-util", "hex", "nix", "ordered-stream", + "rand", "serde", "serde_repr", + "sha1", "static_assertions", "tracing", "uds_windows", - "windows-sys 0.59.0", - "winnow", + "windows-sys 0.52.0", "xdg-home", "zbus_macros", "zbus_names", @@ -5090,28 +5193,25 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "5.1.1" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cd2dcdce3e2727f7d74b7e33b5a89539b3cc31049562137faf7ae4eb86cd16d" +checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", "syn", - "zbus_names", - "zvariant", "zvariant_utils", ] [[package]] name = "zbus_names" -version = "4.1.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "856b7a38811f71846fd47856ceee8bccaec8399ff53fb370247e66081ace647b" +checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" dependencies = [ "serde", "static_assertions", - "winnow", "zvariant", ] @@ -5190,25 +5290,23 @@ dependencies = [ [[package]] name = "zvariant" -version = "5.1.0" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1200ee6ac32f1e5a312e455a949a4794855515d34f9909f4a3e082d14e1a56f" +checksum = "2084290ab9a1c471c38fc524945837734fbf124487e105daec2bb57fd48c81fe" dependencies = [ "endi", "enumflags2", "serde", "static_assertions", "url", - "winnow", "zvariant_derive", - "zvariant_utils", ] [[package]] name = "zvariant_derive" -version = "5.1.0" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "687e3b97fae6c9104fbbd36c73d27d149abf04fb874e2efbd84838763daa8916" +checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5219,14 +5317,11 @@ dependencies = [ [[package]] name = "zvariant_utils" -version = "3.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20d1d011a38f12360e5fcccceeff5e2c42a8eb7f27f0dcba97a0862ede05c9c6" +checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" dependencies = [ "proc-macro2", "quote", - "serde", - "static_assertions", "syn", - "winnow", ] diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt deleted file mode 100644 index 25b893fb4..000000000 --- a/gui/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -# External dependencies. -find_package(Qt6 REQUIRED COMPONENTS Svg Widgets) -find_package(Threads REQUIRED) - -# Setup GUI. -add_executable(obliteration WIN32 MACOSX_BUNDLE - main.cpp - main_window.cpp) - -set_target_properties(obliteration PROPERTIES AUTOMOC ON AUTORCC ON) - -target_compile_features(obliteration PRIVATE cxx_std_17) - -target_link_libraries(obliteration PRIVATE Qt6::Svg Qt6::Widgets) -target_link_libraries(obliteration PRIVATE Threads::Threads) - -if(WIN32) - target_link_libraries(obliteration PRIVATE bcrypt imm32 ntdll setupapi userenv version winhvplatform winmm ws2_32) -else() - target_link_libraries(obliteration PRIVATE ${CMAKE_DL_LIBS}) -endif() diff --git a/gui/Cargo.toml b/gui/Cargo.toml index 83b25e38d..db209c0f0 100644 --- a/gui/Cargo.toml +++ b/gui/Cargo.toml @@ -16,7 +16,7 @@ futures = "0.3.31" gdbstub = "0.7.3" gdbstub_arch = "0.3.1" humansize = "2.1.3" -i-slint-core = "=1.8.0" +i-slint-core = "=1.9.0" libc = "0.2.164" num_enum = "0.7.3" obconf = { path = "../src/obconf", features = ["serde", "virt"] } @@ -34,7 +34,7 @@ rev = "64787fdc0489724f0914356d925be014a2f1bf3e" features = ["read"] [dependencies.slint] -version = "=1.8.0" +version = "=1.9.0" features = [ "backend-winit", "compat-1-2", @@ -51,19 +51,19 @@ aarch64 = { path = "../arch/aarch64" } x86-64 = { path = "../arch/x86-64" } [target.'cfg(target_os = "linux")'.dependencies.i-slint-renderer-skia] -version = "=1.8.0" +version = "=1.9.0" features = ["vulkan", "wayland", "x11"] [target.'cfg(target_os = "windows")'.dependencies.i-slint-renderer-skia] -version = "=1.8.0" +version = "=1.9.0" features = ["vulkan"] -[target.'cfg(not(any(target_os = "linux", target_os = "windows")))'.dependencies.i-slint-renderer-skia] -version = "=1.8.0" +[target.'cfg(target_os = "macos")'.dependencies.i-slint-renderer-skia] +version = "=1.9.0" [target.'cfg(not(target_os = "macos"))'.dependencies.ash] -version = "0.38.0" -features = ["linked", "std"] +version = "0.37.3" +features = ["linked"] default-features = false [target.'cfg(windows)'.dependencies.windows-sys] @@ -80,7 +80,7 @@ features = [ ] [target.'cfg(target_os = "linux")'.dependencies.ashpd] -version = "0.10.2" +version = "0.9.2" features = ["async-std", "raw_handle"] default-features = false @@ -96,7 +96,7 @@ metal = "0.29.0" objc = "0.2.7" [build-dependencies] -slint-build = "1.8.0" +slint-build = "1.9.0" [target.'cfg(windows)'.build-dependencies] winres = "0.1.12" diff --git a/gui/main.cpp b/gui/main.cpp deleted file mode 100644 index 44d1821ff..000000000 --- a/gui/main.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "main_window.hpp" - -#include -#include -#include -#include -#include -#include -#ifndef __APPLE__ -#include -#include -#include -#endif - -#ifndef _WIN32 -#include -#endif - -int main(int argc, char *argv[]) -{ - // Setup application. - QCoreApplication::setOrganizationName("OBHQ"); - QCoreApplication::setApplicationName("Obliteration"); - QApplication::setStyle("Fusion"); - - QApplication app(argc, argv); - - // Setup main window. - MainWindow win; - - // Run main window. - return QApplication::exec(); -} diff --git a/gui/main_window.cpp b/gui/main_window.cpp deleted file mode 100644 index 57c24ba15..000000000 --- a/gui/main_window.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include "main_window.hpp" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef _WIN32 -#include -#endif - -MainWindow::MainWindow() -{ - // File menu. - auto fileMenu = menuBar()->addMenu("&File"); - auto openSystemFolder = new QAction("Open System &Folder", this); - - fileMenu->addAction(openSystemFolder); - - // Help menu. - auto helpMenu = menuBar()->addMenu("&Help"); - auto about = new QAction("&About Obliteration", this); - - connect(about, &QAction::triggered, this, &MainWindow::aboutObliteration); - - helpMenu->addAction(about); -} - -MainWindow::~MainWindow() -{ -} - -void MainWindow::aboutObliteration() -{ - QMessageBox::about( - this, - "About Obliteration", - "Obliteration is a free and open-source PlayStation 4 kernel. It will allows you to run " - "the PlayStation 4 system software that you have dumped from your PlayStation 4 on your " - "PC. This will allows you to play your games forever even if your PlayStation 4 stopped " - "working in the future."); -} diff --git a/gui/main_window.hpp b/gui/main_window.hpp deleted file mode 100644 index 7d63084b2..000000000 --- a/gui/main_window.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include -#include - -class MainWindow final : public QMainWindow { -public: - MainWindow(); - ~MainWindow() override; -private slots: - void aboutObliteration(); -}; diff --git a/gui/src/dialogs/linux/mod.rs b/gui/src/dialogs/linux/mod.rs index dd7ad1b43..23c760809 100644 --- a/gui/src/dialogs/linux/mod.rs +++ b/gui/src/dialogs/linux/mod.rs @@ -81,5 +81,5 @@ where let parent = parent.as_ref().map(|v| v.as_ref()).unwrap(); let parent = WindowIdentifier::from_raw_handle(parent, display).await; - f(parent).await + f(Some(parent)).await } diff --git a/gui/src/graphics/vulkan/mod.rs b/gui/src/graphics/vulkan/mod.rs index 34fa0b917..ad5cd428c 100644 --- a/gui/src/graphics/vulkan/mod.rs +++ b/gui/src/graphics/vulkan/mod.rs @@ -3,6 +3,7 @@ use self::screen::VulkanScreen; use super::Graphics; use crate::profile::Profile; use ash::vk::{ApplicationInfo, InstanceCreateInfo, QueueFlags, API_VERSION_1_3}; +use std::ffi::CStr; use thiserror::Error; mod buffer; @@ -10,9 +11,10 @@ mod screen; pub fn new() -> Result { // Setup application info. - let info = ApplicationInfo::default() - .application_name(c"Obliteration") - .api_version(API_VERSION_1_3); + let mut app = ApplicationInfo::default(); + + app.p_application_name = c"Obliteration".as_ptr(); + app.api_version = API_VERSION_1_3; // Setup validation layers. let layers = [ @@ -21,9 +23,11 @@ pub fn new() -> Result { ]; // Setup VkInstanceCreateInfo. - let info = InstanceCreateInfo::default() - .application_info(&info) - .enabled_layer_names(&layers); + let mut info = InstanceCreateInfo::default(); + + info.p_application_info = &app; + info.pp_enabled_layer_names = layers.as_ptr(); + info.enabled_layer_count = layers.len().try_into().unwrap(); // Create Vulkan instance. let api = ash::Entry::linked(); @@ -62,9 +66,7 @@ pub fn new() -> Result { } // Add to list. - let name = p - .device_name_as_c_str() - .unwrap() + let name = unsafe { CStr::from_ptr(p.device_name.as_ptr()) } .to_str() .unwrap() .to_owned(); diff --git a/gui/src/graphics/vulkan/screen.rs b/gui/src/graphics/vulkan/screen.rs index 6a07317b4..740fb76c1 100644 --- a/gui/src/graphics/vulkan/screen.rs +++ b/gui/src/graphics/vulkan/screen.rs @@ -37,17 +37,23 @@ impl VulkanScreen { .into_iter() .position(|p| p.queue_flags.contains(QueueFlags::GRAPHICS)) .ok_or(VulkanScreenError::NoQueue)?; - let queue = queue .try_into() .map_err(|_| VulkanScreenError::QueueOutOfBounds(queue))?; + let mut queues = DeviceQueueCreateInfo::default(); + let priorities = [1.0]; + + queues.queue_family_index = queue; + queues.queue_count = 1; + queues.p_queue_priorities = priorities.as_ptr(); + + // Setup VkDeviceCreateInfo. + let mut device = DeviceCreateInfo::default(); - let queues = DeviceQueueCreateInfo::default() - .queue_family_index(queue) - .queue_priorities(&[1.0]); + device.p_queue_create_infos = &queues; + device.queue_create_info_count = 1; // Create logical device. - let device = DeviceCreateInfo::default().queue_create_infos(std::slice::from_ref(&queues)); let device = unsafe { instance.create_device(physical, &device, None) } .map_err(VulkanScreenError::CreateDeviceFailed)?;