miraclx / freyr-gui

A cross-platform front-end GUI for freyr-js written in Rust
https://github.com/miraclx/freyr-js
Apache License 2.0
9 stars 2 forks source link

Mockup Community Screenshots #1

Open miraclx opened 3 years ago

miraclx commented 3 years ago

If you happen to test this on your system, please send screenshots, I'd love to see variations of this mockup with your current theming and user-interface.

steamgirl2020 commented 3 years ago

hi~miraclx,get Compilation failed,why?

PS C:\Windows\system32\freyr-gui> cargo run --release
   Compiling qt_macros v0.1.0
   Compiling ritual_common v0.4.0
error[E0432]: unresolved import `syn::export`
 --> C:\Users\fitgirl\.cargo\registry\src\github.com-1ecc6299db9ec823\qt_macros-0.1.0\src\q_init_resource.rs:3:11
  |
3 | use syn::{export::Span, parse_macro_input, Ident, LitStr};
  |           ^^^^^^ could not find `export` in `syn`

error[E0432]: unresolved import `syn::export`
 --> C:\Users\fitgirl\.cargo\registry\src\github.com-1ecc6299db9ec823\qt_macros-0.1.0\src\slot.rs:3:11
  |
3 | use syn::{export::Span, parse_macro_input, Ident, ItemFn};
  |           ^^^^^^ could not find `export` in `syn`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0432`.
error: could not compile `qt_macros`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
PS C:\Windows\system32\freyr-gui>
miraclx commented 3 years ago

This is an issue with a dependency qt_widgets and it's equivalent dependency ritual mis-importing a symbol from syn. https://github.com/rust-qt/ritual/issues/107.

A lockfile has been added with 973a4c3 that ensures this compiles before those dependencies are updated.

Please, pull and retest!

steamgirl2020 commented 3 years ago
C:\Windows\System32\freyr-gui>cargo run --release
  Downloaded adler v0.2.3
  Downloaded quote v1.0.8
  Downloaded backtrace v0.3.55
  Downloaded miniz_oxide v0.4.3
  Downloaded bincode v1.3.1
  Downloaded thread_local v1.0.1
  Downloaded object v0.22.0
  Downloaded serde_derive v1.0.118
  Downloaded cfg-if v0.1.10
  Downloaded serde v1.0.118
  Downloaded libc v0.2.81
  Downloaded syn v1.0.57
  Downloaded regex-syntax v0.6.21
  Downloaded log v0.4.11
  Downloaded regex v1.4.2
  Downloaded serde_json v1.0.61
  Downloaded 16 crates (1.9 MB) in 10.20s
   Compiling proc-macro2 v1.0.24
   Compiling unicode-xid v0.2.1
   Compiling libc v0.2.81
   Compiling syn v1.0.57
   Compiling serde v1.0.118
   Compiling memchr v2.3.4
   Compiling autocfg v1.0.1
   Compiling winapi-build v0.1.1
   Compiling byteorder v1.3.4
   Compiling ryu v1.0.5
   Compiling adler v0.2.3
   Compiling winapi v0.2.8
   Compiling log v0.4.11
   Compiling gimli v0.23.0
   Compiling lazy_static v1.4.0
   Compiling failure_derive v0.1.8
   Compiling winapi v0.3.9
   Compiling regex-syntax v0.6.21
   Compiling serde_json v1.0.61
   Compiling cfg-if v1.0.0
   Compiling rustc-demangle v0.1.18
   Compiling serde_derive v1.0.118
   Compiling object v0.22.0
   Compiling cfg-if v0.1.10
   Compiling itoa v0.4.7
   Compiling either v1.6.1
   Compiling semver-parser v0.7.0
   Compiling dunce v1.0.1
   Compiling pathdiff v0.1.0
   Compiling shell-words v0.1.0
   Compiling quick-error v1.2.3
   Compiling proc-macro-hack v0.5.19
   Compiling kernel32-sys v0.2.2
   Compiling miniz_oxide v0.4.3
   Compiling thread_local v1.0.1
   Compiling itertools v0.8.2
   Compiling semver v0.9.0
   Compiling humantime v1.3.0
   Compiling num_cpus v1.13.0
   Compiling aho-corasick v0.7.15
   Compiling quote v1.0.8
   Compiling cpp_core v0.6.0
   Compiling addr2line v0.14.1
   Compiling regex v1.4.2
   Compiling backtrace v0.3.55
   Compiling winapi-util v0.1.5
   Compiling atty v0.2.14
   Compiling toml v0.4.10
   Compiling bincode v1.3.1
   Compiling termcolor v1.1.2
   Compiling env_logger v0.7.1
   Compiling synstructure v0.12.4
   Compiling qt_macros v0.1.0
   Compiling failure v0.1.8
   Compiling term v0.4.6
   Compiling term-painter v0.2.4
   Compiling ritual_common v0.4.0
   Compiling ritual_build v0.4.0
   Compiling qt_ritual_common v0.4.0
   Compiling qt_ritual_build v0.5.0
   Compiling qt_core v0.5.0
   Compiling qt_gui v0.5.0
   Compiling qt_widgets v0.5.0
   Compiling qt_ui_tools v0.5.0
error: failed to run custom build command for `qt_gui v0.5.0`

Caused by:
  process didn't exit successfully: `C:\Windows\System32\freyr-gui\target\release\build\qt_gui-b5d20a681c0877e3\build-script-build` (exit code: 1)
  --- stderr
  [2021-03-18T17:02:32Z ERROR ritual_common::errors] Error:
  [2021-03-18T17:02:32Z ERROR ritual_common::errors]    failed to run command: "qmake" "-query" "QT_VERSION"
  [2021-03-18T17:02:32Z ERROR ritual_common::errors]    The system can not find the file specified。 (os error 2)
warning: build failed, waiting for other jobs to finish...
error: build failed

C:\Windows\System32\freyr-gui>
miraclx commented 3 years ago

Yeah, well the app is built with Qt5, so you have to figure that out first before you proceed to compile this.

There's nothing platform specific at the moment so once that's sorted, you should have it working.

Keep in mind that this, so far, is simply a mock-up of the app.

I haven't tried running this on windows myself so I don't have any useful directions to figuring this out, but when you do figure this out, tell your methods..

Thanks.

EDIT: does this help? https://stackoverflow.com/a/60246645/9806233

aarkkappler commented 3 years ago

Hi miraclx, i also have the same issue it seems Fresh qt_ui_tools v0.5.0 on macOS (Qt 5.14.2) Fresh freyr-gui v0.1.0 (/Users/celinevalenza/Projects/freyr-gui) Finished release [optimized] target(s) in 0.19s Running target/release/freyr-gui dyld: Library not loaded: @rpath/QtCore.framework/Versions/5/QtCore Referenced from: /Users/.../.../freyr-gui/target/release/freyr-gui

The QT version 6 is not supported only Version 5

OK.. I just saw you tried with a 5.12.7 version, so I will try to see if it works better

SOLVED : with an alias/symlink : ln -s $QTDIR/lib ~/Library/Framework

After the application is built, it does not work at all on macOS

Crilum commented 2 years ago

Is it possible to build this on arm Linux (Raspberry Pi OS, based on Debian, to be exact)?

miraclx commented 2 years ago

@Crilum, Unless there's a platform-specific limitation I'm unaware of, I don't see why not. Please go ahead and try this. Feedback would be much appreciated.

Although, before you throw yourself into making it work, please note that this isn't a complete music downloading application. Please see https://github.com/miraclx/freyr-js if that's what you're looking for.

This project was intended to be a GUI version of the CLI version, but I couldn't find the time to work on it.

If you just need a music downloader, use the CLI instead – https://github.com/miraclx/freyr-js. For that, you won't have to worry about whether or not it builds.

Crilum commented 2 years ago

@miraclx I use the CLI, it awesome! I saw this though, and thought it would be cool to try.

Every time I try to build, I get this, or something similar:

$ cargo build
   Compiling qt_core v0.5.0
   Compiling qt_gui v0.5.0
   Compiling qt_widgets v0.5.0
   Compiling qt_ui_tools v0.5.0
error: failed to run custom build command for `qt_widgets v0.5.0`

Caused by:
  process didn't exit successfully: `/home/pi/src/freyr-gui/target/debug/build/qt_widgets-b50adad65b778ebc/build-script-build` (exit status: 1)
  --- stderr
  [2022-02-09T00:23:59Z ERROR ritual_common::errors] Error:
  [2022-02-09T00:23:59Z ERROR ritual_common::errors]    extra header dir not found (tried: /usr/lib/arm-linux-gnueabihf/QtWidgets.framework/Headers, /usr/include/arm-linux-gnueabihf/qt5/QtWidgets)
warning: build failed, waiting for other jobs to finish...
error: build failed

I tried making sym-links to the specified directory, but it still doesn't work:


pi@AwePi:~/src/freyr-gui $ cargo build
   Compiling qt_core v0.5.0
   Compiling qt_gui v0.5.0
   Compiling qt_widgets v0.5.0
   Compiling qt_ui_tools v0.5.0
error: failed to run custom build command for `qt_core v0.5.0`

Caused by:
  process didn't exit successfully: `/home/pi/src/freyr-gui/target/debug/build/qt_core-66149e64da0d845c/build-script-build` (exit status: 1)
  --- stdout
  Current Qt version (5.15.2) is unknown to qt_core crate. Using closest known version (5.14.0)
  Current target is unknown: v5.14.0 on arm-linux-unix-gnu
  Known targets:
  * v5.9.7 on x86_64-linux-unix-gnu
  * v5.11.3 on x86_64-linux-unix-gnu
  * v5.12.2 on x86_64-linux-unix-gnu
  * v5.13.0 on x86_64-linux-unix-gnu
  * v5.14.0 on x86_64-linux-unix-gnu
  -- RITUAL_INCLUDE_PATH=/usr/include/arm-linux-gnueabihf/qt5;/usr/lib/arm-linux-gnueabihf/QtCore.framework/Headers
  -- RITUAL_LIBRARY_TYPE=STATIC
  -- RITUAL_FRAMEWORK_PATH=/usr/lib/arm-linux-gnueabihf
  -- RITUAL_LINKED_FRAMEWORKS=QtCore
  -- Configuring incomplete, errors occurred!
  See also "/home/pi/src/freyr-gui/target/debug/build/qt_core-736e6ec805a27638/out/c_lib_build/CMakeFiles/CMakeOutput.log".

  --- stderr
  CMake Error at CMakeLists.txt:42 (message):
    Framework not found: QtCore
  Call Stack (most recent call first):
    CMakeLists.txt:56 (ADD_OSX_FRAMEWORK)

  [2022-02-09T00:57:44Z ERROR ritual_common::errors] Error:
  [2022-02-09T00:57:44Z ERROR ritual_common::errors]    command failed with exit status: 1: "cmake" "-Wno-dev" "/home/pi/.cargo/registry/src/github.com-1285ae84e5963aae/qt_core-0.5.0/c_lib" "-DRITUAL_LIBRARY_TYPE=STATIC" "-DRITUAL_CPP_LIB_VERSION=51400" "-DRITUAL_INCLUDE_PATH=/usr/include/arm-linux-gnueabihf/qt5;/usr/lib/arm-linux-gnueabihf/QtCore.framework/Headers" "-DRITUAL_LIBRARY_PATH=" "-DRITUAL_FRAMEWORK_PATH=/usr/lib/arm-linux-gnueabihf" "-DRITUAL_LINKED_LIBS=" "-DRITUAL_LINKED_FRAMEWORKS=QtCore" "-DRITUAL_COMPILER_FLAGS=-std=gnu++11 -fPIC" "-DRITUAL_QT=1" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=/home/pi/src/freyr-gui/target/debug/build/qt_core-736e6ec805a27638/out/c_lib_install"
warning: build failed, waiting for other jobs to finish...
error: build failed
miraclx commented 2 years ago

Hm.. I'm not quite sure what the fix is here, as this is specifically a QT-related issue.

I guess the takeaway from this project, simple as it is, is that QT is a real pain to have work cross-platform without knowing the little knobs to turn to tweak it just right.

I suppose if I were to reconsider completing this project, I might look into another UI framework like iced - https://github.com/iced-rs/iced (at least, something built in Rust, so it's better to manage)

@miraclx I use the CLI, it awesome!

❤️

Crilum commented 2 years ago

@miraclx I think this (freyr-gui) would be an amazing project to continue.

miraclx commented 2 years ago

I'll take that under advisement and If I have any free time on my hands, I'll look into it.