From 06e5dc6bb332756473582f1366e99733cfc935ca Mon Sep 17 00:00:00 2001 From: KnicKnic Date: Sun, 7 Jul 2019 14:13:43 -0700 Subject: [PATCH] test for building out of precompiled binaries --- my_notes.md | 7 +++++++ native-powershell | 2 +- pkg/powershell/chelpers.go | 2 +- pkg/powershell/hostcommand.go | 2 +- pkg/powershell/powershell.cpp | 2 +- pkg/powershell/powershell.go | 2 +- pkg/powershell/powershell.h | 2 +- pkg/powershell/powershellobjects.go | 2 +- pkg/powershell/runspace.go | 2 +- scripts/update_bin.ps1 | 5 +++++ 10 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 scripts/update_bin.ps1 diff --git a/my_notes.md b/my_notes.md index 7073d3a..f78dbe9 100644 --- a/my_notes.md +++ b/my_notes.md @@ -4,6 +4,13 @@ copy /y ..\native-powershell\host.h . copy /y ..\native-powershell\x64\Release\psh_host.dll . + +cp .\native-powershell\host.h .\native-powershell\native-powershell-bin\ +cp .\native-powershell\x64\Release\psh_host.dll .\native-powershell\native-powershell-bin\ +cp .\native-powershell\x64\Release\psh_host.pdb .\native-powershell\native-powershell-bin\ +cp .\native-powershell\x64\Release\psh_host.lib .\native-powershell\native-powershell-bin\ + + copy /y native-powershell\host.h .\pkg\powershell\ copy /y native-powershell\x64\Release\psh_host.dll .\pkg\powershell diff --git a/native-powershell b/native-powershell index 1f66ea6..6bec13f 160000 --- a/native-powershell +++ b/native-powershell @@ -1 +1 @@ -Subproject commit 1f66ea651f46323053f984597bba4d14078607a6 +Subproject commit 6bec13fd94564a4e0f8b971e080a9790f80a1911 diff --git a/pkg/powershell/chelpers.go b/pkg/powershell/chelpers.go index 100f773..8c15bcc 100644 --- a/pkg/powershell/chelpers.go +++ b/pkg/powershell/chelpers.go @@ -9,7 +9,7 @@ import ( /* #cgo CFLAGS: -I. -#cgo LDFLAGS: ${SRCDIR}/psh_host.dll +#cgo LDFLAGS: ${SRCDIR}/../../native-powershell/native-powershell-bin/psh_host.dll #include diff --git a/pkg/powershell/hostcommand.go b/pkg/powershell/hostcommand.go index 9a8b2ea..83387d9 100644 --- a/pkg/powershell/hostcommand.go +++ b/pkg/powershell/hostcommand.go @@ -3,7 +3,7 @@ package powershell /* #cgo CFLAGS: -I. -#cgo LDFLAGS: ${SRCDIR}/psh_host.dll +#cgo LDFLAGS: ${SRCDIR}/../../native-powershell/native-powershell-bin/psh_host.dll #include diff --git a/pkg/powershell/powershell.cpp b/pkg/powershell/powershell.cpp index 3e3c638..4e2619c 100644 --- a/pkg/powershell/powershell.cpp +++ b/pkg/powershell/powershell.cpp @@ -1,6 +1,6 @@ #include #include "powershell.h" -#include "host.h" +#include "./../../native-powershell/native-powershell-bin/host.h" #include #include diff --git a/pkg/powershell/powershell.go b/pkg/powershell/powershell.go index 9407b94..20fd3c6 100644 --- a/pkg/powershell/powershell.go +++ b/pkg/powershell/powershell.go @@ -9,7 +9,7 @@ import ( /* #cgo CFLAGS: -I. -#cgo LDFLAGS: ${SRCDIR}/psh_host.dll +#cgo LDFLAGS: ${SRCDIR}/../../native-powershell/native-powershell-bin/psh_host.dll #include diff --git a/pkg/powershell/powershell.h b/pkg/powershell/powershell.h index bf25520..9fea466 100644 --- a/pkg/powershell/powershell.h +++ b/pkg/powershell/powershell.h @@ -1,5 +1,5 @@ -#include "host.h" +#include "./../../native-powershell/native-powershell-bin/host.h" #include #ifdef __cplusplus extern "C" { diff --git a/pkg/powershell/powershellobjects.go b/pkg/powershell/powershellobjects.go index 5fdd9c2..785d545 100644 --- a/pkg/powershell/powershellobjects.go +++ b/pkg/powershell/powershellobjects.go @@ -3,7 +3,7 @@ package powershell /* #cgo CFLAGS: -I. -#cgo LDFLAGS: ${SRCDIR}/psh_host.dll +#cgo LDFLAGS: ${SRCDIR}/../../native-powershell/native-powershell-bin/psh_host.dll #include diff --git a/pkg/powershell/runspace.go b/pkg/powershell/runspace.go index 2b1ecd0..4e7edd1 100644 --- a/pkg/powershell/runspace.go +++ b/pkg/powershell/runspace.go @@ -3,7 +3,7 @@ package powershell /* #cgo CFLAGS: -I. -#cgo LDFLAGS: ${SRCDIR}/psh_host.dll +#cgo LDFLAGS: ${SRCDIR}/../../native-powershell/native-powershell-bin/psh_host.dll #include diff --git a/scripts/update_bin.ps1 b/scripts/update_bin.ps1 new file mode 100644 index 0000000..2017d18 --- /dev/null +++ b/scripts/update_bin.ps1 @@ -0,0 +1,5 @@ + +cp .\native-powershell\host.h .\native-powershell\native-powershell-bin\ +cp .\native-powershell\x64\Release\psh_host.dll .\native-powershell\native-powershell-bin\ +cp .\native-powershell\x64\Release\psh_host.pdb .\native-powershell\native-powershell-bin\ +cp .\native-powershell\x64\Release\psh_host.lib .\native-powershell\native-powershell-bin\ \ No newline at end of file