mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-02 19:26:56 -05:00
Can't build on Windows: crate::VERSION not found #1291
Labels
No labels
bug
documentation
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
question
unreproducible
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rustdesk-rustdesk#1291
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tognols on GitHub (Jan 27, 2023).
Hi, I'm trying to build rustdesk on the master branch for Windows (I assume it's the nightly build since the nightly "Source Code.zip" is dated October 20 2022).
I followed all the steps from the docs and from the README.md to build on Windows. (downloading msvc, llvm, vcpkg, sciter.dll)
I installed rust with rustup and i'm in the stable msvc channel.
The error seems to be about mod version in lib.rs not being found.
Here is the full log including the cloning of the repo, I don't know what to do
Thanks in advantage
@tognols commented on GitHub (Jan 27, 2023):
I have managed to build rustdesk with
python3 .\build.pyFrom the root directory.
I thought that for development I should have used cargo run to produce target/debug.
It may seem obvious but I found it kinda unintuitive since it is stated that build.py should be used to produce the final executables and not for debugging purposes.
@rustdesk commented on GitHub (Jan 27, 2023):
#763
@hax10 commented on GitHub (Jan 31, 2023):
I came across a similar problem building the newest master branch on Linux. I worked around it by adding this line in
src/main.rsbefore the main function:I'm pretty sure this isn't the proper way to solve the problem, but it works.
@suzp1984 commented on GitHub (Jan 31, 2023):
Meet the same issue on Mac OS.
My solution:
add
src/version.rswith the following content.@hax10 commented on GitHub (Jan 31, 2023):
It looks like this is fixed in the latest master by PR #2963
Originally, the Cargo build script would (re-)generate
src/version.rsautomatically for release builds but not for debug or any other ones. Now it (re-)generates for all circumstances.