From 65240fce898c824b61edc9cd5f03a4ac43fadb90 Mon Sep 17 00:00:00 2001 From: Th3Dilli Date: Tue, 22 Aug 2023 15:11:24 +0200 Subject: [PATCH 1/3] use a postfix for the glfw wayland library to instead of a subfolder --- download_dependencies.ps1 | 4 ++++ glfw-redist.csproj | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/download_dependencies.ps1 b/download_dependencies.ps1 index 1ff6611..a73c5ec 100644 --- a/download_dependencies.ps1 +++ b/download_dependencies.ps1 @@ -1,5 +1,8 @@ Param([parameter(Mandatory=$true,Position=0)][String]$GLFW_VERSION) +# The built .so file will end in .so.3.3 for a version like 3.3.7, to get the correct file we need to pass "3.3" Rename-Item for wayland +[String]$GLFW_SHORT_VERSION = $GLFW_VERSION.Substring(0, $GLFW_VERSION.LastIndexOf(".")) + New-Item -ItemType Directory -Force -Path tmp try{ @@ -62,6 +65,7 @@ if ($LastExitCode -ne 0) { make -j +Rename-Item -Path "src/libglfw.so.3.3" -NewName "libglfw-wayland.so.$GLFW_SHORT_VERSION" if ($LastExitCode -ne 0) { throw 'GLFW Wayland compilation failed' } diff --git a/glfw-redist.csproj b/glfw-redist.csproj index 62a25e6..8546efb 100644 --- a/glfw-redist.csproj +++ b/glfw-redist.csproj @@ -44,7 +44,7 @@ PreserveNewest - runtimes/linux-x64/native/wayland/ + runtimes/linux-x64/native/ true PreserveNewest From 6d19b53f9d352ea2b827aadb4afc8e2bcd02ef78 Mon Sep 17 00:00:00 2001 From: Th3Dilli Date: Tue, 22 Aug 2023 15:25:54 +0200 Subject: [PATCH 2/3] fix rename path src to use version variable --- download_dependencies.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/download_dependencies.ps1 b/download_dependencies.ps1 index a73c5ec..87b4cc7 100644 --- a/download_dependencies.ps1 +++ b/download_dependencies.ps1 @@ -65,7 +65,7 @@ if ($LastExitCode -ne 0) { make -j -Rename-Item -Path "src/libglfw.so.3.3" -NewName "libglfw-wayland.so.$GLFW_SHORT_VERSION" +Rename-Item -Path "src/libglfw.so.$GLFW_SHORT_VERSION" -NewName "libglfw-wayland.so.$GLFW_SHORT_VERSION" if ($LastExitCode -ne 0) { throw 'GLFW Wayland compilation failed' } From e1815772b098e4b2a736d1159360cbb16d2d7e95 Mon Sep 17 00:00:00 2001 From: Th3Dilli Date: Sat, 26 Aug 2023 16:23:10 +0200 Subject: [PATCH 3/3] add GLFW_SHORT_VERSION as second argument --- download_dependencies.ps1 | 6 ++---- make_nuget.ps1 | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/download_dependencies.ps1 b/download_dependencies.ps1 index 87b4cc7..2e689b6 100644 --- a/download_dependencies.ps1 +++ b/download_dependencies.ps1 @@ -1,7 +1,5 @@ -Param([parameter(Mandatory=$true,Position=0)][String]$GLFW_VERSION) - -# The built .so file will end in .so.3.3 for a version like 3.3.7, to get the correct file we need to pass "3.3" Rename-Item for wayland -[String]$GLFW_SHORT_VERSION = $GLFW_VERSION.Substring(0, $GLFW_VERSION.LastIndexOf(".")) +Param([parameter(Mandatory=$true,Position=0)][String]$GLFW_VERSION, + [parameter(Mandatory=$true,Position=1)][String]$GLFW_SHORT_VERSION) New-Item -ItemType Directory -Force -Path tmp diff --git a/make_nuget.ps1 b/make_nuget.ps1 index d4fb606..82f5a00 100644 --- a/make_nuget.ps1 +++ b/make_nuget.ps1 @@ -14,7 +14,7 @@ if($currentBranch -eq "develop") { $buildVersionResult = "0-pre" + (Get-Date).ToUniversalTime().ToString("yyyyMMddHHmmss") } -./download_dependencies.ps1 $GLFW_VERSION +./download_dependencies.ps1 $GLFW_VERSION $GLFW_SHORT_VERSION $header = Get-Content([System.IO.Path]::Combine($projectDir, ".\tmp\src\include\GLFW\glfw3.h")) | Out-String