Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glfw 3.4 #15

Merged
merged 4 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 7 additions & 25 deletions download_dependencies.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Param([parameter(Mandatory=$true,Position=0)][String]$GLFW_VERSION,
[parameter(Mandatory=$true,Position=1)][String]$GLFW_SHORT_VERSION)
Param([parameter(Mandatory=$true,Position=0)][String]$GLFW_VERSION)

New-Item -ItemType Directory -Force -Path tmp

Expand Down Expand Up @@ -37,35 +36,18 @@ if (Test-Path tmp/src) {
}
Rename-Item -Path tmp/glfw-$GLFW_VERSION -NewName src

mkdir tmp/src/build-x11
pushd tmp/src/build-x11
cmake -DCMAKE_BUILD_TYPE=Release -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DBUILD_SHARED_LIBS=ON ..
mkdir tmp/src/build
Push-Location tmp/src/build
cmake -DCMAKE_BUILD_TYPE=Release -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_X11=ON -DGLFW_BUILD_WAYLAND=ON ..

if ($LastExitCode -ne 0) {
throw 'GLFW X11 compilation setup failed'
throw 'GLFW compilation setup failed'
}

make -j

if ($LastExitCode -ne 0) {
throw 'GLFW X11 compilation failed'
throw 'GLFW compilation failed'
}

popd

mkdir tmp/src/build-wayland
pushd tmp/src/build-wayland
cmake -DCMAKE_BUILD_TYPE=Release -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DBUILD_SHARED_LIBS=ON -DGLFW_USE_WAYLAND=ON ..

if ($LastExitCode -ne 0) {
throw 'GLFW Wayland compilation setup failed'
}

make -j

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'
}

popd
Pop-Location
7 changes: 1 addition & 6 deletions glfw-redist.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@
<Pack>true</Pack>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="tmp/src/build-x11/src/*.so.$(GLFW_SHORT_VERSION)">
<PackagePath>runtimes/linux-x64/native/</PackagePath>
<Pack>true</Pack>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="tmp/src/build-wayland/src/*.so.$(GLFW_SHORT_VERSION)">
<Content Include="tmp/src/build/src/*.so.$(GLFW_SHORT_VERSION)">
<PackagePath>runtimes/linux-x64/native/</PackagePath>
<Pack>true</Pack>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
4 changes: 2 additions & 2 deletions make_nuget.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
param([String]$projectDir, [int]$verBuild)

$ErrorActionPreference = "Stop"
[String]$GLFW_VERSION="3.3.8"
[String]$GLFW_VERSION="3.4"

# 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" to the .csproj
[String]$GLFW_SHORT_VERSION = $GLFW_VERSION.Substring(0, $GLFW_VERSION.LastIndexOf("."))
Expand All @@ -14,7 +14,7 @@ if($currentBranch -eq "develop") {
$buildVersionResult = "0-pre" + (Get-Date).ToUniversalTime().ToString("yyyyMMddHHmmss")
}

./download_dependencies.ps1 $GLFW_VERSION $GLFW_SHORT_VERSION
./download_dependencies.ps1 $GLFW_VERSION


$header = Get-Content([System.IO.Path]::Combine($projectDir, ".\tmp\src\include\GLFW\glfw3.h")) | Out-String
Expand Down
Loading