mirror of
https://github.com/mgerb/go-discord-bot
synced 2026-01-10 09:02:49 +00:00
need to fix cross compilation - CGO is the issue
This commit is contained in:
BIN
dist/GoBot-linux
vendored
BIN
dist/GoBot-linux
vendored
Binary file not shown.
4
dist/index.html
vendored
4
dist/index.html
vendored
@@ -1,5 +1,5 @@
|
||||
<html><head><link href="/static/app.0fcbc3860a585b0e46d5.css" rel="stylesheet"></head>
|
||||
<html><head><link href="/static/app.51a9064c6fa89f0c8861.css" rel="stylesheet"></head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="text/javascript" src="/static/manifest.0fcbc3860a585b0e46d5.js"></script><script type="text/javascript" src="/static/vendor.0fcbc3860a585b0e46d5.js"></script><script type="text/javascript" src="/static/app.0fcbc3860a585b0e46d5.js"></script></body>
|
||||
<script type="text/javascript" src="/static/manifest.51a9064c6fa89f0c8861.js"></script><script type="text/javascript" src="/static/vendor.51a9064c6fa89f0c8861.js"></script><script type="text/javascript" src="/static/app.51a9064c6fa89f0c8861.js"></script></body>
|
||||
</html>
|
||||
@@ -1 +1 @@
|
||||
!function(e){function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(t,c,i){for(var u,a,f,s=0,l=[];s<t.length;s++)a=t[s],o[a]&&l.push(o[a][0]),o[a]=0;for(u in c)Object.prototype.hasOwnProperty.call(c,u)&&(e[u]=c[u]);for(n&&n(t,c,i);l.length;)l.shift()();if(i)for(s=0;s<i.length;s++)f=r(r.s=i[s]);return f};var t={},o={2:0};r.e=function(e){function n(){c.onerror=c.onload=null,clearTimeout(i);var r=o[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}if(0===o[e])return Promise.resolve();if(o[e])return o[e][2];var t=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,r.nc&&c.setAttribute("nonce",r.nc),c.src=r.p+"/static/"+e+".0fcbc3860a585b0e46d5.js";var i=setTimeout(n,12e4);c.onerror=c.onload=n;var u=new Promise(function(r,n){o[e]=[r,n]});return o[e][2]=u,t.appendChild(c),u},r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:t})},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r.oe=function(e){throw console.error(e),e}}([]);
|
||||
!function(e){function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(t,c,i){for(var u,a,f,s=0,l=[];s<t.length;s++)a=t[s],o[a]&&l.push(o[a][0]),o[a]=0;for(u in c)Object.prototype.hasOwnProperty.call(c,u)&&(e[u]=c[u]);for(n&&n(t,c,i);l.length;)l.shift()();if(i)for(s=0;s<i.length;s++)f=r(r.s=i[s]);return f};var t={},o={2:0};r.e=function(e){function n(){c.onerror=c.onload=null,clearTimeout(i);var r=o[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}if(0===o[e])return Promise.resolve();if(o[e])return o[e][2];var t=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,r.nc&&c.setAttribute("nonce",r.nc),c.src=r.p+"/static/"+e+".51a9064c6fa89f0c8861.js";var i=setTimeout(n,12e4);c.onerror=c.onload=n;var u=new Promise(function(r,n){o[e]=[r,n]});return o[e][2]=u,t.appendChild(c),u},r.m=e,r.c=t,r.i=function(e){return e},r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:t})},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r.oe=function(e){throw console.error(e),e}}([]);
|
||||
5
makefile
5
makefile
@@ -5,10 +5,10 @@ linux:
|
||||
go build -o ./dist/GoBot-linux ./server/main.go
|
||||
|
||||
mac:
|
||||
GOOS=darwin GOARCH=amd64 go build -o ./dist/GoBot-mac ./server/main.go
|
||||
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -o ./dist/GoBot-mac ./server/main.go
|
||||
|
||||
windows:
|
||||
GOOS=windows GOARCH=386 go build -o ./dist/GoBot-windows.exe ./server/main.go
|
||||
CGO_ENABLED=1 GOOS=windows GOARCH=386 go build -o ./dist/GoBot-windows.exe ./server/main.go
|
||||
|
||||
clean:
|
||||
rm -rf ./dist
|
||||
@@ -17,3 +17,4 @@ copyfiles:
|
||||
cp config.template.json ./dist/config.template.json
|
||||
|
||||
all: linux copyfiles
|
||||
yarn run build
|
||||
|
||||
15
readme.md
15
readme.md
@@ -1,3 +1,18 @@
|
||||
# GoBot
|
||||
|
||||
My experimental Discord bot
|
||||
|
||||
### Cross Compiling
|
||||
The gopus library uses the CGO package, therefore building both Mac and Linux require `CGO_ENABLED=1`.
|
||||
|
||||
< Work in progress
|
||||
|
||||
Other libraries are needed in order for CGO work properly cross platform.
|
||||
|
||||
```
|
||||
sudo apt-get install gcc-multilib
|
||||
apt-get install libpango1.0
|
||||
```
|
||||
|
||||
This are some packages I came across as suggestions after a little browsing. Doesn't seem to be working currently.
|
||||
This is something I need to investigate more on in the future.
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
var webpack = require("./webpack.config.js")
|
||||
|
||||
webpack.plugins[0].filename = "/static/[name].[hash].css";
|
||||
webpack.output.filename = '/static/[name].[hash].js';
|
||||
|
||||
module.exports = webpack;
|
||||
Reference in New Issue
Block a user