FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
RustPython-test/build.rs at auto-format · RustPython/RustPython-test · GitHub
RustPython
RustPython-test
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
RustPython-test
/
build.rs
Copy path
More file actions
More file actions
Latest commit
History
History
History
17 lines (17 loc) · 590 Bytes
Breadcrumbs
RustPython-test
/
build.rs
Copy path
File metadata and controls
17 lines (17 loc) · 590 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fn
main
(
)
{
if
std
::
env
::
var
(
"CARGO_CFG_TARGET_OS"
)
.
unwrap
(
)
==
"windows"
{
println
!
(
"cargo:rerun-if-changed=logo.ico"
)
;
let
mut
res = winresource
::
WindowsResource
::
new
(
)
;
if
std
::
path
::
Path
::
new
(
"logo.ico"
)
.
exists
(
)
{
res
.
set_icon
(
"logo.ico"
)
;
}
else
{
println
!
(
"cargo:warning=logo.ico not found, skipping icon embedding"
)
;
return
;
}
res
.
compile
(
)
.
map_err
(
|e|
{
println
!
(
"cargo:warning=Failed to compile Windows resources: {e}"
)
;
}
)
.
ok
(
)
;
}
}
Back
|
FazBrowse Home
|
New Git URL