Skip to content

Commit

Permalink
Added project files
Browse files Browse the repository at this point in the history
Signed-off-by: Alessandro Bellia <[email protected]>
  • Loading branch information
lauralex committed Jan 20, 2023
1 parent bcd1c23 commit d007dfe
Show file tree
Hide file tree
Showing 7 changed files with 652 additions and 1 deletion.
90 changes: 90 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Common settings that generally should always be used with your language specific settings

# Auto detect text files and perform LF normalization
* text=auto

#
# The above will handle all files NOT found below
#

# Documents
*.bibtex text diff=bibtex
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.md text diff=markdown
*.mdx text diff=markdown
*.tex text diff=tex
*.adoc text
*.textile text
*.mustache text
*.csv text
*.tab text
*.tsv text
*.txt text
*.sql text
*.epub diff=astextplain

# Graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
# SVG treated as text by default.
*.svg text
# If you want to treat it as binary,
# use the following line instead.
# *.svg binary
*.eps binary

# Scripts
*.bash text eol=lf
*.fish text eol=lf
*.sh text eol=lf
*.zsh text eol=lf
# These are explicitly windows files and should use crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

# Serialisation
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text

# Archives
*.7z binary
*.gz binary
*.tar binary
*.tgz binary
*.zip binary

# Text files where line endings should be preserved
*.patch -text

#
# Exclude files from exporting
#

.gitattributes export-ignore
.gitignore export-ignore
.gitkeep export-ignore

# Auto detect text files and perform normalization
* text=auto

*.rs text diff=rust
*.toml text diff=toml
Cargo.lock text
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Generated by Cargo
# will have compiled files and executables
/target/
target/
debug/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk
.idea/*
*.pdb
16 changes: 16 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "nwgtray"
version = "0.1.0"
edition = "2021"
build = "build.rs"

[build-dependencies]
winres = "0.1.12"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
native-windows-gui = "1.0.13"
native-windows-derive = "1.0.5"
winapi = { version= "*", features = ["winuser", "mmdeviceapi", "combaseapi", "commapi", "guiddef", "objbase", "unknwnbase", "propsys", "propidl", "endpointvolume", "ntdef", "stralign", "coml2api", "functiondiscoverykeys_devpkey", "devpkey", "impl-default", "windef", "winnt", "securitybaseapi", "tlhelp32", "handleapi", "synchapi"]}
once_cell = "*"
11 changes: 11 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
extern crate winres;

fn main() {
if cfg!(target_os = "windows") {
let mut res = winres::WindowsResource::new();
res.set_icon("volcontrol.ico");
res.set_manifest_file("manifest.xml");
res.set_version_info(winres::VersionInfo::PRODUCTVERSION, 0x0001000000000000);
res.compile().unwrap();
}
}
23 changes: 23 additions & 0 deletions manifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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"
publicKeyToken="6595b64144ccf1df"
language="*"
processorArchitecture="*"/>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="requireAdministrator"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
Loading

0 comments on commit d007dfe

Please sign in to comment.