github.com/Asutorufa/yuhaiin@v0.3.6-0.20240502055049-7984da7023a0/scripts/build/generate.go (about)

     1  package scripts
     2  
     3  import _ "golang.org/x/mobile/bind"
     4  
     5  // windows exe icon and describe
     6  // windres from minGW64 https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/
     7  // qt set application icon https://github.com/therecipe/qt/wiki/Setting-the-Application-Icon
     8  //go:generate windres.exe -o yuhaiin_windows_amd64.syso yuhaiin.rc
     9  //go:generate windres.exe -F pe-i386 -o yuhaiin_windows_386.syso yuhaiin.rc
    10  
    11  // hide windows cmd window while runnig kernel
    12  //go:generate go build -ldflags="-H windowsgui -w -s" -tags api -o deploy/yuhaiin_kernel.exe
    13  
    14  // windows debug gui
    15  //go:generate set QT_DEBUG_CONSOLE=true
    16  //go:generate qtdeploy build
    17  
    18  // generate gRPC and protobuf
    19  //go:generate protoc -I "./" -I "../" --go_out=plugins=grpc:. --go_opt=paths=source_relative api/api.proto
    20  //go:generate protoc --go_out=plugins=grpc:. --go_opt=paths=source_relative config/config.proto
    21  //go:generate protoc -I "./" -I "../" --go_out=. --go-grpc_out=. --go-grpc_opt=paths=source_relative --go_opt=paths=source_relative api/api.proto
    22  //go:generate protoc --go_out=. --go-grpc_out=. --go-grpc_opt=paths=source_relative --go_opt=paths=source_relative config/config.proto