Partial fix for #2353 (files in dev builds) (#2410)

* Move .so libraries to dll dir, update some build scripts

* Move OpenTK.dll.config with OpenTK.dll

* Keep EmuHawkMono.sh in Windows-built artifacts

* Add Package.sh to match QuickTestBuildAndPackage.bat

used as `Dist/BuildRelease.sh && Dist/Package.sh`

* Update GitLab CI to use Package.sh
This commit is contained in:
James Groom 2020-09-19 11:08:34 +10:00 committed by GitHub
parent 302b12cda8
commit a5d166cf71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 33 additions and 27 deletions

1
.gitignore vendored
View File

@ -6,6 +6,7 @@
**/obj/** **/obj/**
/output/** /output/**
/output64/** /output64/**
/packaged_output
/test_output /test_output
**/Release/** **/Release/**
**/Debug/** **/Debug/**

View File

@ -3,31 +3,15 @@ image: mcr.microsoft.com/dotnet/core/sdk:3.1
stages: stages:
- build - build
- test - test
- package
build_master: build:
artifacts:
expire_in: "1 month"
name: "BizHawk_devbuild_$CI_COMMIT_REF_SLUG"
paths:
- output
- test_output
rules:
- if: '$CI_COMMIT_REF_SLUG == "master"'
when: always
script:
- Dist/BuildRelease.sh
stage: build
build_not_master:
artifacts: artifacts:
expire_in: "30 minutes" expire_in: "30 minutes"
name: "BizHawk_devbuild_$CI_COMMIT_REF_SLUG" name: "BizHawk_tempbuild_${CI_COMMIT_REF_SLUG}_$CI_COMMIT_SHORT_SHA"
paths: paths:
- output - output
- test_output - test_output
rules:
- if: '$CI_COMMIT_REF_SLUG != "master"'
when: always
script: script:
- Dist/BuildRelease.sh - Dist/BuildRelease.sh
stage: build stage: build
@ -42,6 +26,19 @@ check_style:
- Dist/BuildRelease.sh -p:MachineRunAnalyzersDuringBuild=true || Dist/BuildRelease.sh -p:MachineRunAnalyzersDuringBuild=true - Dist/BuildRelease.sh -p:MachineRunAnalyzersDuringBuild=true || Dist/BuildRelease.sh -p:MachineRunAnalyzersDuringBuild=true
stage: test stage: test
package:
artifacts:
expire_in: "1 month"
name: "BizHawk_devbuild_${CI_COMMIT_REF_SLUG}_$CI_COMMIT_SHORT_SHA"
paths:
- packaged_output/*
rules:
- if: '$CI_COMMIT_REF_SLUG == "master"'
when: always
script:
- Dist/Package.sh
stage: package
run_tests: run_tests:
artifacts: artifacts:
paths: paths:

7
Dist/Package.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
set -e
cd "$(dirname "$0")/.."
rm -fr "packaged_output" && mkdir -p "packaged_output"
find "output" -type f \( -wholename "output/EmuHawk.exe" -o -wholename "output/DiscoHawk.exe" -o -wholename "output/*.config" -o -wholename "output/defctrl.json" -o -wholename "output/EmuHawkMono.sh" -o -wholename "output/dll/*" -o -wholename "output/shaders/*" -o -wholename "output/gamedb/*" -o -wholename "output/Tools/*" -o -wholename "output/NES/Palettes/*" -o -wholename "output/Lua/*" -o -wholename "output/Gameboy/Palettes/*" \) -not -name "*.pdb" -not -name "*.lib" -not -name "*.pgd" -not -name "*.ipdb" -not -name "*.iobj" -not -name "*.exp" -not -wholename "output/dll/libsneshawk-64*.exe" -not -name "*.ilk" -not -wholename "output/dll/gpgx.elf" -not -wholename "output/dll/miniclient.*" -exec install -D -m644 -T "{}" "packaged_{}" \;
for f in output/*.dll; do cp "$f" "packaged_output/dll"; done && for f in output/*.dll.config; do cp "$f" "packaged_output/dll"; done # the Batch script does this; IMO this should be done in MSBuild
find "packaged_output" -type f -name "*.sh" -exec chmod +x {} \; # installed with -m644 but needs to be 755

View File

@ -30,9 +30,10 @@ rem that might be troublesome some day..... if it does get troublesome, then we'
rem explicitly list the OK ones here as individual copies. until then.... rem explicitly list the OK ones here as individual copies. until then....
copy *.dll dll copy *.dll dll
copy *.dll.config dll
rem Now, we're about to zip and then unzip. Why, you ask? Because that's just the way this evolved. rem Now, we're about to zip and then unzip. Why, you ask? Because that's just the way this evolved.
..\dist\zip.exe -X -r ..\Dist\%NAME% EmuHawk.exe EmuHawk.exe.config DiscoHawk.exe DiscoHawk.exe.config defctrl.json dll shaders gamedb Tools NES\Palettes Lua Gameboy\Palettes -x *.pdb -x *.lib -x *.pgd -x *.ipdb -x *.iobj -x *.exp -x dll\libsneshawk-64*.exe -x *.ilk -x dll\gpgx.elf -x dll\miniclient.* ..\dist\zip.exe -X -r ..\Dist\%NAME% EmuHawk.exe EmuHawk.exe.config DiscoHawk.exe DiscoHawk.exe.config defctrl.json EmuHawkMono.sh dll shaders gamedb Tools NES\Palettes Lua Gameboy\Palettes -x *.pdb -x *.lib -x *.pgd -x *.ipdb -x *.iobj -x *.exp -x dll\libsneshawk-64*.exe -x *.ilk -x dll\gpgx.elf -x dll\miniclient.*
cd ..\Dist cd ..\Dist
.\unzip.exe %NAME% -d temp .\unzip.exe %NAME% -d temp

View File

@ -145,7 +145,7 @@ Development builds are made automatically whenever someone contributes. Because
Click one of the buttons above to download a dev build (they're also at the top of this readme). AppVeyor uses Windows and GitLab CI uses Linux, but they work all the same. Click one of the buttons above to download a dev build (they're also at the top of this readme). AppVeyor uses Windows and GitLab CI uses Linux, but they work all the same.
* On the AppVeyor page for a Build, click "Artifacts", then `BizHawk_Developer-<datetime>-#<long hexadecimal>.zip`. * On the AppVeyor page for a Build, click "Artifacts", then `BizHawk_Developer-<datetime>-#<long hexadecimal>.zip`.
* On the GitLab CI page for a Pipeline, click "Jobs", then the download button at the end of the entry with the name `build_master`/`build_not_master`. (On the Pipelines list page, there's also a download button on each Pipeline.) * On the GitLab CI page for a Pipeline, click "Jobs", then the download button on the right under the heading "Package". (On the Pipelines list page, there's also a download button on each Pipeline—choose `package:archive` there.)
To find the dev builds for a specific commit, you can click the green checkmark next to it (in the [commit history](https://github.com/TASVideos/BizHawk/commits/master), for example) for a dropdown, then click either "Details" link to go to AppVeyor/GitLab. To find the dev builds for a specific commit, you can click the green checkmark next to it (in the [commit history](https://github.com/TASVideos/BizHawk/commits/master), for example) for a dropdown, then click either "Details" link to go to AppVeyor/GitLab.

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
cargo b --features "no-dirty-detection" cargo b --features "no-dirty-detection"
cp target/debug/libwaterboxhost.so ../../Assets cp target/debug/libwaterboxhost.so ../../Assets/dll
cp target/debug/libwaterboxhost.so ../../output cp target/debug/libwaterboxhost.so ../../output/dll

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
cargo b cargo b
cp target/debug/libwaterboxhost.so ../../Assets cp target/debug/libwaterboxhost.so ../../Assets/dll
cp target/debug/libwaterboxhost.so ../../output cp target/debug/libwaterboxhost.so ../../output/dll

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/sh
cargo b --release cargo b --release
cp target/release/libwaterboxhost.so ../../Assets cp target/release/libwaterboxhost.so ../../Assets/dll
cp target/release/libwaterboxhost.so ../../output cp target/release/libwaterboxhost.so ../../output/dll