files for building windows exe with mainico

This commit is contained in:
cryptonote-social 2020-06-22 12:19:47 -07:00
parent 62108800c5
commit a7d7328113
4 changed files with 13 additions and 1 deletions

View File

@ -4,7 +4,7 @@
// Package rx provides Go access to various randomx library methods.
package rx
// #cgo CFLAGS: -std=c11 -D_GNU_SOURCE
// #cgo CFLAGS: -std=c11 -D_GNU_SOURCE -m64
// #cgo LDFLAGS: -L${SRCDIR}/cpp/ -Wl,-rpath,$ORIGIN ${SRCDIR}/cpp/rxlib.cpp.o -lrandomx -lstdc++ -lm
/*
#include <stdlib.h>

BIN
win/MAINICON.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

1
win/csminer.rc Normal file
View File

@ -0,0 +1 @@
MAINICON ICON "MAINICON.ico"

11
win/make.bat Normal file
View File

@ -0,0 +1,11 @@
del csminer.exe
del csminer_res.o
del ..\rx\cpp\rxlib.cpp.o
del ..\rx\cpp\rxlib.o
cd ..\rx\cpp
call make.bat
cd ..\..\win
windres csminer.rc csminer_res.o
ld -relocatable csminer_res.o ..\rx\cpp\rxlib.cpp.o -o ..\rx\cpp\rxlib.o
move ..\rx\cpp\rxlib.o ..\rx\cpp\rxlib.cpp.o
go build -x -ldflags="-s -w" csminer.go