Coder Social home page Coder Social logo

Comments (11)

nabijaczleweli avatar nabijaczleweli commented on August 26, 2024

Argh, I think I know why, can you try again with this patch applied?

diff --git a/src/main.rs b/src/main.rs
index ede6561..76a5455 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,6 +1,7 @@
 // This is so cargo actually considers linking to the fucking manifest,
 // since the build scripts' documentation can do the digital equivalent of fucking off
 #[cfg(target_os="windows")]
+#[cfg(target_env="gnu")]
 #[link(name="cargo-install-update-manifest", kind="static")]
 extern "C" {}

from cargo-update.

liigo avatar liigo commented on August 26, 2024

that means, no manifest is embedded (for msvc ABI), and can't be run without Administrator privilege

from cargo-update.

nabijaczleweli avatar nabijaczleweli commented on August 26, 2024

Okay, so I have to work around that, too, now

from cargo-update.

nabijaczleweli avatar nabijaczleweli commented on August 26, 2024

Can you try the fix/14-manifest-embed-msvc branch? It should build&link in an MSVC-compatible way.
If you get object type errors try replacing "--output-format=coff" with "--output-format=res", please.

from cargo-update.

liigo avatar liigo commented on August 26, 2024

I will

from cargo-update.

mzji avatar mzji commented on August 26, 2024

If the content of the manifest file won't be changed, then I think we don't need to compile it, we could just write the file with the name "cargo-install-update.exe.manifest" to the $HOME\.cargo\bin\ directory.

The advantage of this method is, we do not need to worry about the compiler toolchain/triples, the writing code will work on any Windows environment, since it only uses the std library.

from cargo-update.

nabijaczleweli avatar nabijaczleweli commented on August 26, 2024

No

from cargo-update.

liigo avatar liigo commented on August 26, 2024

@nabijaczleweli
Branch fix/14-manifest-embed-msvc build failed.
I don't think there is a windres.exe in MSVC toolchain.

Edit: but you can try rc.exe.

from cargo-update.

nabijaczleweli avatar nabijaczleweli commented on August 26, 2024

Updated the branch to use RC.EXE, try again, please?

from cargo-update.

liigo avatar liigo commented on August 26, 2024

@nabijaczleweli
After some changes to cargo-install-update-manifest.rc, build success.
But it doesn't work, the manifest resource was not linked into .exe.

Changes to cargo-install-update-manifest.rc:

@@ -1,2 +1,2 @@
-#include "winuser.h"
-1 RT_MANIFEST cargo-install-update.exe.manifest
+#define RT_MANIFEST 24
+1 RT_MANIFEST "cargo-install-update.exe.manifest"

If you don't mind, I'd like to have a try to submit a new pr.

from cargo-update.

nabijaczleweli avatar nabijaczleweli commented on August 26, 2024

Have at it

from cargo-update.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.