Skip to content

Commit

Permalink
refactor nsi patch
Browse files Browse the repository at this point in the history
  • Loading branch information
humbletim committed Oct 24, 2024
1 parent 958408d commit 7f14894
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 223 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CompileWindows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ jobs:
run: fsvr_step 090

- name: ~004 Setup tmate session
if: fromJSON(inputs.fstuple).pause == '004'
if: fromJSON(inputs.fstuple).pause == '004' || fromJSON(inputs.fstuple).pause == 'always'
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true
Expand Down Expand Up @@ -261,7 +261,7 @@ jobs:
# )"

- name: ~Setup tmate session
if: failure() && fromJSON(inputs.fstuple).pause != 'never'
if: (failure() && fromJSON(inputs.fstuple).pause != 'never') || fromJSON(inputs.fstuple).pause == 'always'
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: false
47 changes: 2 additions & 45 deletions blueprints/fs-7.1.11-avx2/000.bash
Original file line number Diff line number Diff line change
@@ -1,46 +1,3 @@
#!/bin/bash
maybe-clone viewer ${hub:-github.com} $repo "$ref"
maybe-clone p373r github.com ${GITHUB_REPOSITORY} P373R_6.6.8

pushd repo/viewer
patch -p1 < <(cat <<'EOF'
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 29ae1e54f05..53d6ff09826 100644
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -244,7 +244,7 @@ Function CheckCPUFlagsAVX2
; Replace %DLURL% in the language string with the URL
${WordReplace} "$(MissingAVX2)" "%DLURL%" "$2" "+*" $3
MessageBox MB_OK "$3"
- ${OpenURL} '$2'
+ ${OpenURL} "${DL_URL}-legacy-cpus#version-${VERSION_LONG}"
Quit
OK_AVX2:
@@ -267,7 +267,7 @@ Function CheckCPUFlagsAVX2_Prompt
MessageBox MB_YESNO $3 IDYES DownloadAVX2 IDNO ContinueInstall
DownloadAVX2:
- ${OpenURL} '$3'
+ ${OpenURL} "${DL_URL}#version-${VERSION_LONG}"
Quit
ContinueInstall:
Pop $3
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 9fa11fd534c..0dcc76d3ab3 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -939,6 +939,7 @@ class Windows_x86_64_Manifest(ViewerManifest):
return result
# </FS:Ansariel>
def dl_url_from_channel(self):
+ return "https://github.com/humbletim/firestorm-gha/wiki/downloads"
if self.channel_type() == 'release':
return 'https://www.firestormviewer.org/choose-your-platform'
elif self.channel_type() == 'beta':
EOF
)
git diff
# git -C repo/viewer diff
popd

# do the same source repo prep as non-avx2 blueprint
source $nunja_dir/../${base/-avx2}/000.sh
45 changes: 3 additions & 42 deletions blueprints/fs-7.1.11/000.bash
Original file line number Diff line number Diff line change
@@ -1,46 +1,7 @@
#!/bin/bash
maybe-clone viewer ${hub:-github.com} $repo "$ref"
maybe-clone p373r github.com ${GITHUB_REPOSITORY} P373R_6.6.8

pushd repo/viewer
patch -p1 < <(cat <<'EOF'
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 29ae1e54f05..53d6ff09826 100644
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -244,7 +244,7 @@ Function CheckCPUFlagsAVX2
; Replace %DLURL% in the language string with the URL
${WordReplace} "$(MissingAVX2)" "%DLURL%" "$2" "+*" $3
MessageBox MB_OK "$3"
- ${OpenURL} '$2'
+ ${OpenURL} "${DL_URL}-legacy-cpus#version-${VERSION_LONG}"
Quit
OK_AVX2:
@@ -267,7 +267,7 @@ Function CheckCPUFlagsAVX2_Prompt
MessageBox MB_YESNO $3 IDYES DownloadAVX2 IDNO ContinueInstall
DownloadAVX2:
- ${OpenURL} '$3'
+ ${OpenURL} "${DL_URL}#version-${VERSION_LONG}"
Quit
ContinueInstall:
Pop $3
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 9fa11fd534c..0dcc76d3ab3 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -939,6 +939,7 @@ class Windows_x86_64_Manifest(ViewerManifest):
return result
# </FS:Ansariel>
def dl_url_from_channel(self):
+ return "https://github.com/humbletim/firestorm-gha/wiki/downloads"
if self.channel_type() == 'release':
return 'https://www.firestormviewer.org/choose-your-platform'
elif self.channel_type() == 'beta':
EOF
)
pushd repo/viewer
patch -p1 < $nunja_dir/../fs-7.1.11/installer_template.nsi.patch
git diff
# git -C repo/viewer diff
popd

popd
34 changes: 34 additions & 0 deletions blueprints/fs-7.1.11/installer_template.nsi.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 29ae1e54f05..53d6ff09826 100644
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -244,7 +244,7 @@ Function CheckCPUFlagsAVX2
; Replace %DLURL% in the language string with the URL
${WordReplace} "$(MissingAVX2)" "%DLURL%" "$2" "+*" $3
MessageBox MB_OK "$3"
- ${OpenURL} '$2'
+ ${OpenURL} "${DL_URL}-legacy-cpus#version-${VERSION_LONG}"
Quit

OK_AVX2:
@@ -267,7 +267,7 @@ Function CheckCPUFlagsAVX2_Prompt

MessageBox MB_YESNO $3 IDYES DownloadAVX2 IDNO ContinueInstall
DownloadAVX2:
- ${OpenURL} '$3'
+ ${OpenURL} "${DL_URL}#version-${VERSION_LONG}"
Quit
ContinueInstall:
Pop $3
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 9fa11fd534c..0dcc76d3ab3 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -939,6 +939,7 @@ class Windows_x86_64_Manifest(ViewerManifest):
return result
# </FS:Ansariel>
def dl_url_from_channel(self):
+ return "https://github.com/humbletim/firestorm-gha/wiki/downloads"
if self.channel_type() == 'release':
return 'https://www.firestormviewer.org/choose-your-platform'
elif self.channel_type() == 'beta':
80 changes: 2 additions & 78 deletions blueprints/sgeo-7.1.11-avx2/000.bash
Original file line number Diff line number Diff line change
@@ -1,79 +1,3 @@
#!/bin/bash

quiet-clone github.com Sgeo/p373r-sgeo-minimal sgeo_min_vr_7.1.9 repo/p373r
echo $BASH_SOURCE -- skipping > repo/p373r/applied
echo 'https://github.com/Sgeo/p373r-sgeo-minimal/tree/sgeo_min_vr_7.1.9' > repo/p373r/.gha_source

gha-cache-restore $cache_id-repo-0000 repo/viewer || (
set -Euo pipefail
quiet-clone ${hub:-github.com} $repo $ref repo/viewer

pushd repo/viewer

git remote add sgeo-minimal https://github.com/Sgeo/p373r-sgeo-minimal
git fetch sgeo-minimal sgeo_min_vr_7.1.9
git -c user.email=CITEST -c user.name=CITEST merge --no-edit sgeo-minimal/sgeo_min_vr_7.1.9 || {
dos2unix --to-stdout $nunja_dir/sgeo-minimal.7.1.10.mergeconflict-fixes.patch | patch -p1
git add -u
git -c user.email=CITEST -c user.name=CITEST commit -m "sgeo-minimal.7.1.10 locally patched"
}

patch -p1 < <(cat <<'EOF'
diff --git a/indra/newview/llviewerVR.h b/indra/newview/llviewerVR.h
index fd2aa7880..89804262b 100644
--- a/indra/newview/llviewerVR.h
+++ b/indra/newview/llviewerVR.h
@@ -1,7 +1,6 @@
#pragma once
-#include "../../../openvr/headers/openvr.h"
-#pragma comment(lib, "../../../openvr/lib/win64/openvr_api.lib")
+#include <openvr.h>
#include "llhudtext.h"
#include "llgl.h"
#include "string.h"
EOF
)
patch -p1 < <(cat <<'EOF'
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 29ae1e54f05..53d6ff09826 100644
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -244,7 +244,7 @@ Function CheckCPUFlagsAVX2
; Replace %DLURL% in the language string with the URL
${WordReplace} "$(MissingAVX2)" "%DLURL%" "$2" "+*" $3
MessageBox MB_OK "$3"
- ${OpenURL} '$2'
+ ${OpenURL} "${DL_URL}-legacy-cpus#version-${VERSION_LONG}"
Quit
OK_AVX2:
@@ -267,7 +267,7 @@ Function CheckCPUFlagsAVX2_Prompt
MessageBox MB_YESNO $3 IDYES DownloadAVX2 IDNO ContinueInstall
DownloadAVX2:
- ${OpenURL} '$3'
+ ${OpenURL} "${DL_URL}#version-${VERSION_LONG}"
Quit
ContinueInstall:
Pop $3
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 9fa11fd534c..0dcc76d3ab3 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -939,6 +939,7 @@ class Windows_x86_64_Manifest(ViewerManifest):
return result
# </FS:Ansariel>
def dl_url_from_channel(self):
+ return "https://github.com/humbletim/firestorm-gha/wiki/downloads"
if self.channel_type() == 'release':
return 'https://www.firestormviewer.org/choose-your-platform'
elif self.channel_type() == 'beta':
EOF
)
git diff
# git -C repo/viewer diff
popd

gha-cache-save $cache_id-repo-0000 repo/viewer || exit 37
)
# do the same source repo prep as non-avx2 blueprint
source $nunja_dir/../${base/-avx2}/000.sh
71 changes: 15 additions & 56 deletions blueprints/sgeo-7.1.11/000.bash
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
#!/bin/bash

quiet-clone github.com Sgeo/p373r-sgeo-minimal sgeo_min_vr_7.1.9 repo/p373r
maybe-clone viewer ${hub:-github.com} $repo "$ref"
maybe-clone p373r github.com Sgeo/p373r-sgeo-minimal sgeo_min_vr_7.1.9
echo $BASH_SOURCE -- skipping > repo/p373r/applied
echo 'https://github.com/Sgeo/p373r-sgeo-minimal/tree/sgeo_min_vr_7.1.9' > repo/p373r/.gha_source

gha-cache-restore $cache_id-repo-0000 repo/viewer || (
set -Euo pipefail
quiet-clone ${hub:-github.com} $repo $ref repo/viewer
pushd repo/viewer
patch -p1 < $nunja_dir/../fs-7.1.11/installer_template.nsi.patch
git diff
popd

pushd repo/viewer

pushd repo/viewer
git remote add sgeo-minimal https://github.com/Sgeo/p373r-sgeo-minimal
git fetch sgeo-minimal sgeo_min_vr_7.1.9
git -c user.email=CITEST -c user.name=CITEST merge --no-edit sgeo-minimal/sgeo_min_vr_7.1.9 || {
dos2unix --to-stdout $nunja_dir/sgeo-minimal.7.1.10.mergeconflict-fixes.patch | patch -p1
git add -u
git -c user.email=CITEST -c user.name=CITEST commit -m "sgeo-minimal.7.1.10 locally patched"
}

patch -p1 < <(cat <<'EOF'
git -c user.email=CITEST -c user.name=CITEST merge --no-edit sgeo-minimal/sgeo_min_vr_7.1.9
# || {
# dos2unix --to-stdout $nunja_dir/sgeo-minimal.7.1.10.mergeconflict-fixes.patch | patch -p1
# git add -u
# git -c user.email=CITEST -c user.name=CITEST commit -m "sgeo-minimal.7.1.10 locally patched"
# }
patch -p1 < <(cat <<'EOF'
diff --git a/indra/newview/llviewerVR.h b/indra/newview/llviewerVR.h
index fd2aa7880..89804262b 100644
--- a/indra/newview/llviewerVR.h
Expand All @@ -33,47 +33,6 @@ index fd2aa7880..89804262b 100644
#include "llgl.h"
#include "string.h"
EOF
)
patch -p1 < <(cat <<'EOF'
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 29ae1e54f05..53d6ff09826 100644
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -244,7 +244,7 @@ Function CheckCPUFlagsAVX2
; Replace %DLURL% in the language string with the URL
${WordReplace} "$(MissingAVX2)" "%DLURL%" "$2" "+*" $3
MessageBox MB_OK "$3"
- ${OpenURL} '$2'
+ ${OpenURL} "${DL_URL}-legacy-cpus#version-${VERSION_LONG}"
Quit
OK_AVX2:
@@ -267,7 +267,7 @@ Function CheckCPUFlagsAVX2_Prompt
MessageBox MB_YESNO $3 IDYES DownloadAVX2 IDNO ContinueInstall
DownloadAVX2:
- ${OpenURL} '$3'
+ ${OpenURL} "${DL_URL}#version-${VERSION_LONG}"
Quit
ContinueInstall:
Pop $3
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 9fa11fd534c..0dcc76d3ab3 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -939,6 +939,7 @@ class Windows_x86_64_Manifest(ViewerManifest):
return result
# </FS:Ansariel>
def dl_url_from_channel(self):
+ return "https://github.com/humbletim/firestorm-gha/wiki/downloads"
if self.channel_type() == 'release':
return 'https://www.firestormviewer.org/choose-your-platform'
elif self.channel_type() == 'beta':
EOF
)
git diff
# git -C repo/viewer diff
popd

gha-cache-save $cache_id-repo-0000 repo/viewer || exit 37
)
popd

0 comments on commit 7f14894

Please sign in to comment.