Skip to content

Commit

Permalink
Fix readability and use fabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Spidy123222 authored Jul 22, 2023
1 parent ecedd32 commit fb09e0d
Show file tree
Hide file tree
Showing 23 changed files with 81 additions and 4,947 deletions.
51 changes: 42 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,9 @@ jobs:
- configuration: Debug
build_param: --debug
artifact_name: xemu-win-debug
artifact_filename: xemu-win-debug.zip
- configuration: Release
build_param:
artifact_name: xemu-win-release
artifact_filename: xemu-win-release.zip
env:
DOCKER_IMAGE_NAME: ghcr.io/xemu-project/xemu-win64-toolchain:sha-d0d3e7b

Expand Down Expand Up @@ -98,13 +96,46 @@ jobs:
-u $(id -u):$(id -g) \
$DOCKER_IMAGE_NAME \
bash -c "ccache -z; ./build.sh -p win64-cross ${{ matrix.build_param }} && ccache -s"
cd dist
zip -r ../${{ matrix.artifact_filename }} *
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.artifact_name }}
path: ${{ matrix.artifact_filename }}
path: dist

# Generate a symbols package for Windows. Use cv2pdb to generate PDBs from
# DWARF and update + strip the executable. Re-package the original release
# and create symbols package.
WindowsPdb:
name: Generate PDB for Windows (${{ matrix.configuration }})
runs-on: windows-latest
needs: Windows
strategy:
matrix:
include:
- configuration: Debug
artifact_name: xemu-win-debug
- configuration: Release
artifact_name: xemu-win-release
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: ${{ matrix.artifact_name }}
path: ${{ matrix.artifact_name }}
- name: Generate PDB
run: |
Invoke-WebRequest -Uri "https://github.com/rainers/cv2pdb/releases/download/v0.52/cv2pdb-0.52.zip" -OutFile "cv2pdb.zip"
7z x -ocv2pdb -y cv2pdb.zip
cd ${{ matrix.artifact_name }}
../cv2pdb/cv2pdb64.exe xemu.exe
mkdir ../dist
7z a -tzip ../dist/${{ matrix.artifact_name }}.zip * "-xr!*.pdb"
7z a -tzip ../dist/${{ matrix.artifact_name }}-pdb.zip "-ir!*.pdb"
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.artifact_name }}-pdb
path: dist

Ubuntu:
name: Build for Ubuntu (${{ matrix.configuration }})
Expand Down Expand Up @@ -324,7 +355,7 @@ jobs:
Release:
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))
runs-on: ubuntu-latest
needs: [Ubuntu, macOSUniversal, Windows]
needs: [Ubuntu, macOSUniversal, WindowsPdb]
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
Expand Down Expand Up @@ -353,8 +384,10 @@ jobs:
draft: false
files: |
dist/src.tar.gz/src.tar.gz
dist/xemu-win-debug/xemu-win-debug.zip
dist/xemu-win-release/xemu-win-release.zip
dist/xemu-win-debug-pdb/xemu-win-debug.zip
dist/xemu-win-debug-pdb/xemu-win-debug-pdb.zip
dist/xemu-win-release-pdb/xemu-win-release.zip
dist/xemu-win-release-pdb/xemu-win-release-pdb.zip
dist/xemu-macos-universal-release/xemu-macos-universal-release.zip
dist/xemu-macos-universal-debug/xemu-macos-universal-debug.zip
dist/xemu-ubuntu-release/xemu/xemu-v${{ env.XEMU_VERSION }}-x86_64.AppImage
Expand All @@ -374,7 +407,7 @@ jobs:
PushToPPA:
name: Push to PPA Snapshot Branch
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))
needs: [Ubuntu, macOSUniversal, Windows]
needs: [Ubuntu, macOSUniversal, WindowsPdb]
runs-on: ubuntu-latest
steps:
- name: Download source package
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,6 @@
[submodule "hw/xbox/nv2a/thirdparty/nv2a_vsh_cpu"]
path = hw/xbox/nv2a/thirdparty/nv2a_vsh_cpu
url = https://github.com/abaire/nv2a_vsh_cpu.git
[submodule "ui/thirdparty/httplib"]
path = ui/thirdparty/httplib
url = https://github.com/yhirose/cpp-httplib
11 changes: 0 additions & 11 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,13 @@ package_windows() {
rm -rf dist
mkdir -p dist
cp build/qemu-system-i386w.exe dist/xemu.exe
# cp -r "${project_source_dir}/data" dist/
python3 "${project_source_dir}/get_deps.py" dist/xemu.exe dist
if [ "$debug" != "y" ]; then
strip dist/xemu.exe
fi
}

package_wincross() {
STRIP=${CROSSPREFIX}strip
rm -rf dist
mkdir -p dist
cp build/qemu-system-i386w.exe dist/xemu.exe
# cp -r "${project_source_dir}/data" dist/
if [ "$debug" != "y" ]; then
$STRIP dist/xemu.exe
fi
python3 ./scripts/gen-license.py --platform windows > dist/LICENSE.txt
}

Expand Down Expand Up @@ -68,7 +59,6 @@ package_macos() {

# Copy in runtime resources
mkdir -p dist/xemu.app/Contents/Resources
# cp -r "${project_source_dir}/data" dist/xemu.app/Contents/Resources

# Generate icon file
mkdir -p xemu.iconset
Expand All @@ -88,7 +78,6 @@ package_linux() {
rm -rf dist
mkdir -p dist
cp build/qemu-system-i386 dist/xemu
# cp -r "${project_source_dir}/data" dist
if test -e "${project_source_dir}/XEMU_LICENSE"; then
cp "${project_source_dir}/XEMU_LICENSE" dist/LICENSE.txt
else
Expand Down
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ else
git_submodules_action="ignore"
fi

git_submodules="ui/keycodemapdb ui/thirdparty/imgui ui/thirdparty/implot util/xxHash tomlplusplus genconfig hw/xbox/nv2a/thirdparty/nv2a_vsh_cpu"
git_submodules="ui/keycodemapdb ui/thirdparty/imgui ui/thirdparty/implot ui/thirdparty/httplib util/xxHash tomlplusplus genconfig hw/xbox/nv2a/thirdparty/nv2a_vsh_cpu"
git="git"

# Don't accept a target_list environment variable.
Expand Down
2 changes: 1 addition & 1 deletion scripts/archive-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sub_file="${sub_tdir}/submodule.tar"
# different to the host OS.
submodules="dtc meson ui/keycodemapdb"
submodules="$submodules tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3"
submodules="$submodules ui/thirdparty/imgui ui/thirdparty/implot util/xxHash tomlplusplus genconfig" # xemu extras
submodules="$submodules ui/thirdparty/imgui ui/thirdparty/implot ui/thirdparty/httplib util/xxHash tomlplusplus genconfig" # xemu extras
submodules="$submodules hw/xbox/nv2a/thirdparty/nv2a_vsh_cpu"
sub_deinit=""

Expand Down
2 changes: 1 addition & 1 deletion scripts/gen-license.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def head(self):
Lib('httplib', 'https://github.com/yhirose/cpp-httplib',
mit, 'https://raw.githubusercontent.com/yhirose/cpp-httplib/master/LICENSE',
ships_static=all_platforms,
version='776b3ffbf95520047eb6e21ccdb9237eb5c4eaee'
submodule=Submodule('ui/thirdparty/httplib')
),

Lib('noc', 'https://github.com/guillaumechereau/noc/blob/master/noc_file_dialog.h',
Expand Down
2 changes: 1 addition & 1 deletion tomlplusplus
Submodule tomlplusplus updated 136 files
1 change: 1 addition & 0 deletions ui/thirdparty/httplib
Submodule httplib added at 0f1b62
Loading

0 comments on commit fb09e0d

Please sign in to comment.