Giter Site home page Giter Site logo

Comments (4)

amrbashir avatar amrbashir commented on August 30, 2024

Please provide a minimal reproduction, as I can't seem to be able to reproduce. Also make sure your JS packages are up to date.

from tauri.

WhiteKSl avatar WhiteKSl commented on August 30, 2024

So I tried updating JS packages and checked my Crates which didn't change a thing but updating my build.rs to not apply my windows attributes let it load. The new issue is that my app requires elevated permission to function.

Here is my build.rs

fn main() {
  let mut windows = tauri_build::WindowsAttributes::new();
  let manifest = include_str!("manifest.xml"); 

  windows = windows.app_manifest(
    manifest 
  );
  
  let attrs =  tauri_build::Attributes::new()
    .windows_attributes(windows);
  tauri_build::try_build(attrs).expect("failed to run build script");
}

And manifest.xml

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
            <requestedPrivileges>
                <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
            </requestedPrivileges>
        </security>
    </trustInfo>
</assembly>

Just by tinkering around with it only when I commented out the
.windows_attributes() line from when I create the attributes fixed it which proves the issue is with either the manifest or how I am creating the attributes (although the manifest was straight from tauri docs)

from tauri.

FabianLars avatar FabianLars commented on August 30, 2024

Since you mentioned the dialog, it seems like you skipped over the warning here: https://docs.rs/tauri-build/latest/tauri_build/struct.WindowsAttributes.html#warning so your manifest should look more like this

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
 <dependency>
   <dependentAssembly>
     <assemblyIdentity
       type="win32"
       name="Microsoft.Windows.Common-Controls"
       version="6.0.0.0"
       processorArchitecture="*"
       publicKeyToken="6595b64144ccf1df"
       language="*"
     />
   </dependentAssembly>
 </dependency>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>

If it's not that, then it probably doesn't like that it requires admin in dev mode - maybe try running tauri dev in an admin terminal then (not a general recommendation of course - running stuff in admin terminals is pretty meh)

from tauri.

WhiteKSl avatar WhiteKSl commented on August 30, 2024

Since you mentioned the dialog, it seems like you skipped over the warning here: https://docs.rs/tauri-build/latest/tauri_build/struct.WindowsAttributes.html#warning so your manifest should look more like this

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
 <dependency>
   <dependentAssembly>
     <assemblyIdentity
       type="win32"
       name="Microsoft.Windows.Common-Controls"
       version="6.0.0.0"
       processorArchitecture="*"
       publicKeyToken="6595b64144ccf1df"
       language="*"
     />
   </dependentAssembly>
 </dependency>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>

If it's not that, then it probably doesn't like that it requires admin in dev mode - maybe try running tauri dev in an admin terminal then (not a general recommendation of course - running stuff in admin terminals is pretty meh)

Yeah that seemed to fix it, Thank you!

from tauri.

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.