From e12c57105546d5e8bb1c005fdecfb5f150c4c298 Mon Sep 17 00:00:00 2001 From: Xinyu Ma Date: Wed, 20 Apr 2022 19:23:36 -0700 Subject: [PATCH] Add more Windows build support --- .gitignore | 1 + Makefile | 5 ++-- cmd/yanfdui/main.go | 4 +-- cmd/yanfdui/static/ndn_app.ico | Bin 0 -> 4286 bytes cmd/yanfdui/versioninfo.json | 43 +++++++++++++++++++++++++++++++ cmd/yanfdui/yanfdui.exe.manifest | 17 ++++++++++++ 6 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 cmd/yanfdui/static/ndn_app.ico create mode 100644 cmd/yanfdui/versioninfo.json create mode 100644 cmd/yanfdui/yanfdui.exe.manifest diff --git a/.gitignore b/.gitignore index 40198bc..1a4b755 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ .vscode .idea publish/** +resource.syso diff --git a/Makefile b/Makefile index e6d8f19..2e8c491 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ PACKAGE = github.com/named-data/YaNFD -VERSION = 1.0.0.0 +VERSION = 1.1.0.0 # COMMIT = git rev-parse --short HEAD # DATE != date @@ -33,9 +33,10 @@ yanfdui: cleanui # To publish a Windows Store application # rm -rf publish # mkdir publish +# go generate github.com/named-data/YaNFD/cmd/yanfdui # go build -ldflags "-X 'main.Version=${VERSION}' ${PACKAGE}/cmd/yanfdui # mv yanfdui publish/ # cp -R cmd/yanfdui/static publish/ -# cp -R cmd/yanfdui/static publish/ +# cp -R cmd/yanfdui/templates publish/ # cp ./ndn_app.ico publish/ # Then, create the YaNFD-x64.msix file (including publish, yanfd.toml) diff --git a/cmd/yanfdui/main.go b/cmd/yanfdui/main.go index 6269ff9..143c4c4 100644 --- a/cmd/yanfdui/main.go +++ b/cmd/yanfdui/main.go @@ -1,10 +1,10 @@ /* YaNFD - Yet another NDN Forwarding Daemon * - * Copyright (C) 2020-2021 Eric Newberry. + * Copyright (C) 2020-2022 Eric Newberry. * * This file is licensed under the terms of the MIT License, as found in LICENSE.md. */ - +//go:generate goversioninfo -icon=static/ndn_app.ico package main import ( diff --git a/cmd/yanfdui/static/ndn_app.ico b/cmd/yanfdui/static/ndn_app.ico new file mode 100644 index 0000000000000000000000000000000000000000..922932ca2d9ed39ce967f9e49c70dfbf45b2fb7a GIT binary patch literal 4286 zcmeHLS!`5g6u!P`d@(Va7+)F{5bB;tgoFr2qd~#wgBq4X6(I!yaivsIu!uYm+(KM1 zRcVMojj>T1DWGi{j0&BZ&U8AR(kWdWXS&@^r_*-U&-0zzTgGOpPi0=X&DYy|{&WBD zEZ=|HsbO3pUj+pQzZ>6NV;I*PhH$ z14Vn=uy$V?3ZHdqY!ah+@cR(P;%OA`JFmHsYyQS2oNkPO*JnS3v<~F%43DcX{fW`> zG}?n>C_mhd+n;l4&JVrn#oq%7)Ser{Z5Meom&iy;*B*J@tG>*?@?@X#Z2BNz)mviS ze=LY}TFp3K*ROWwJf28v4116CVE5PEsHh2}Kax~?>F1s5x4f(c!?6^8^G0#!I+yZ1 z_)0T;U8A}o*Ph(zvvV~oYcKNOw4xDD?`}odOdyrcsDCzpJek3tzNqGU^GZt#J1e@7 z5!ZA65!|!Eg=Ja%cdT=2-;SKJIMTA`bo?9N52yy}ToKKu=64gxR0dU9`IG-_>&T>5 zsFNkzn$go2$6z#xrQ5xDO!{Q!&-!ovFra;M2V!UvjEtpo=1=}Tl|7nE^_fAG$n*d4 zQ!DqDG@<#zsOo`we6-Z!KjRq&`^>fIXbL3<0yuGY2r<#j)cUj3pHzqNm*mmi8`nLk zRrcV&@+bd&o80hsk7-^{yy??-Bhq8`>F6*0+QUOXhP7uWMU%Ps=`=W;1nc|OmtA0Q zc^;0rm?tYu$0|GsM&z}AmD)OWt<>_AlzRrLe-b^>4h z+>5e9omjZp4W0$^us77wafzF=k#^2M?pZ3n%xA$1Zkx-bow4z5&t>(Wh}pJr-R2+< z!Dr@?{Vwgyd7jMMY&-Xnzd4o5-c#;*|NWO0%fIr!ME1-1izY5nt#k48<&m55G~|(g zSh$M?(LBV!&!L|Rt`zJNj0ke|XC`d?+;voNqkx~kuM!jq>I6YSc!m&?eVu|Gg6jmv M+x+)Ho-T6#17lP=7XSbN literal 0 HcmV?d00001 diff --git a/cmd/yanfdui/versioninfo.json b/cmd/yanfdui/versioninfo.json new file mode 100644 index 0000000..6d32ce6 --- /dev/null +++ b/cmd/yanfdui/versioninfo.json @@ -0,0 +1,43 @@ +{ + "FixedFileInfo": { + "FileVersion": { + "Major": 1, + "Minor": 1, + "Patch": 0, + "Build": 0 + }, + "ProductVersion": { + "Major": 1, + "Minor": 1, + "Patch": 0, + "Build": 0 + }, + "FileFlagsMask": "3f", + "FileFlags ": "00", + "FileOS": "040004", + "FileType": "01", + "FileSubType": "00" + }, + "StringFileInfo": { + "Comments": "", + "CompanyName": "NDN Team", + "FileDescription": "The first NDN forwarder running on Windows.", + "FileVersion": "v1.1.0.0", + "InternalName": "254XinyuMa.YaNFD", + "LegalCopyright": "Copyright (C) 2020-2022 Eric Newberry", + "LegalTrademarks": "", + "OriginalFilename": "main.go", + "PrivateBuild": "", + "ProductName": "YaNFD", + "ProductVersion": "v1.1.0.0", + "SpecialBuild": "" + }, + "VarFileInfo": { + "Translation": { + "LangID": "0409", + "CharsetID": "04B0" + } + }, + "IconPath": "", + "ManifestPath": "" +} diff --git a/cmd/yanfdui/yanfdui.exe.manifest b/cmd/yanfdui/yanfdui.exe.manifest new file mode 100644 index 0000000..4298cf5 --- /dev/null +++ b/cmd/yanfdui/yanfdui.exe.manifest @@ -0,0 +1,17 @@ + + + + + + + + + + +