mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 01:20:06 +00:00 
			
		
		
		
	Working flatpak build
This commit is contained in:
		
							parent
							
								
									4e3600414e
								
							
						
					
					
						commit
						83c5d15cdf
					
				
					 3 changed files with 81 additions and 1 deletions
				
			
		
							
								
								
									
										38
									
								
								.github/workflows/ci.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										38
									
								
								.github/workflows/ci.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -129,6 +129,8 @@ jobs: | |||
|                              wayland-protocols \ | ||||
|                              libwayland-dev \ | ||||
|                              libwayland-egl-backend-dev \ | ||||
|                              flatpak \ | ||||
|                              flatpak-builder \ | ||||
|                              ${{ matrix.compiler_packages }} | ||||
| 
 | ||||
|     - name: Setup Python Environment | ||||
|  | @ -261,7 +263,8 @@ jobs: | |||
|     - name: Build AppImage (Linux) | ||||
|       if: ${{ startsWith(matrix.os, 'ubuntu') }} | ||||
|       env: | ||||
|         APPIMAGE_DIR: ${{ github.workspace }}/supercell-wx/ | ||||
|         INSTALL_DIR: ${{ github.workspace }}/supercell-wx/ | ||||
|         APPIMAGE_DIR: ${{ github.workspace }}/supercell-wx-appimage/ | ||||
|         LDAI_UPDATE_INFORMATION: gh-releases-zsync|dpaulat|supercell-wx|latest|*${{ matrix.appimage_arch }}.AppImage.zsync | ||||
|         LDAI_OUTPUT: supercell-wx-${{ env.SCWX_VERSION }}-${{ matrix.appimage_arch }}.AppImage | ||||
|         LINUXDEPLOY_OUTPUT_APP_NAME: supercell-wx | ||||
|  | @ -272,6 +275,7 @@ jobs: | |||
|         chmod +x linuxdeploy-${{ matrix.appimage_arch }}.AppImage | ||||
|         cp "${{ github.workspace }}/source/scwx-qt/res/icons/scwx-256.png" supercell-wx.png | ||||
|         cp "${{ github.workspace }}/source/scwx-qt/res/linux/supercell-wx.desktop" . | ||||
|         cp -r "${{ env.INSTALL_DIR }}" "${{ env.APPIMAGE_DIR }}" | ||||
|         pushd "${{ env.APPIMAGE_DIR }}" | ||||
|         mkdir -p usr/ | ||||
|         mv bin/ usr/ | ||||
|  | @ -289,6 +293,38 @@ jobs: | |||
|         name: supercell-wx-appimage-${{ matrix.artifact_suffix }} | ||||
|         path: ${{ github.workspace }}/*-${{ matrix.appimage_arch }}.AppImage* | ||||
| 
 | ||||
|     - name: Build FlatPak (Linux) | ||||
|       if: ${{ startsWith(matrix.os, 'ubuntu') }} | ||||
|       env: | ||||
|         INSTALL_DIR: ${{ github.workspace }}/supercell-wx/ | ||||
|         FLATPAK_DIR: ${{ github.workspace }}/supercell-wx-flatpak/ | ||||
|       shell: bash | ||||
|       run: | | ||||
|         cp -r ${{ env.INSTALL_DIR }} ${{ env.FLATPAK_DIR }} | ||||
|         # Copy krb5 libraries to flatpak | ||||
|         cp /usr/lib/*/libkrb5.so* \ | ||||
|            /usr/lib/*/libkrb5support.so* \ | ||||
|            /usr/lib/*/libgssapi_krb5.so* \ | ||||
|            /usr/lib/*/libk5crypto.so* \ | ||||
|            /usr/lib/*/libkeyutils.so* \ | ||||
|            ${{ env.FLATPAK_DIR }}/lib | ||||
| 
 | ||||
|         flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo | ||||
|         flatpak-builder --force-clean \ | ||||
|             --user \ | ||||
|             --install-deps-from=flathub \ | ||||
|             --repo=flatpak-repo \ | ||||
|             --install flatpak-build \ | ||||
|             ${{ github.workspace }}/source/tools/net.supercellwx.app.yml | ||||
|         flatpak build-bundle flatpak-repo supercell-wx.flatpak net.supercellwx.app | ||||
| 
 | ||||
|     - name: Upload FlatPak (Linux) | ||||
|       if: ${{ startsWith(matrix.os, 'ubuntu') }} | ||||
|       uses: actions/upload-artifact@v4 | ||||
|       with: | ||||
|         name: supercell-wx-flatpak-${{ matrix.artifact_suffix }} | ||||
|         path: ${{ github.workspace }}/supercell-wx.flatpak | ||||
| 
 | ||||
|     - name: Test Supercell Wx | ||||
|       working-directory: ${{ github.workspace }}/build | ||||
|       env: | ||||
|  |  | |||
							
								
								
									
										7
									
								
								scwx-qt/res/linux/net.supercellwx.app.desktop
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								scwx-qt/res/linux/net.supercellwx.app.desktop
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | |||
| [Desktop Entry] | ||||
| Type=Application | ||||
| Name=Supercell Wx | ||||
| Comment=Weather Radar and Data Viewer | ||||
| Exec=supercell-wx | ||||
| Icon=net.supercellwx.app.png | ||||
| Categories=Network;Science; | ||||
							
								
								
									
										37
									
								
								tools/net.supercellwx.app.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								tools/net.supercellwx.app.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,37 @@ | |||
| id: net.supercellwx.app | ||||
| version: '0.4.9' | ||||
| runtime: "org.freedesktop.Platform" | ||||
| runtime-version: "23.08" | ||||
| sdk: "org.freedesktop.Sdk" | ||||
| command: supercell-wx | ||||
| modules: | ||||
|   - name: supercell-wx | ||||
|     buildsystem: simple | ||||
|     build-commands: | ||||
|       - install -Dm644 net.supercellwx.app.desktop /app/share/applications/${FLATPAK_ID}.desktop | ||||
|       - install -Dm644 scwx-256.png /app/share/icons/hicolor/256x256/apps/net.supercellwx.app.png | ||||
|       - install -Dm644 scwx-64.png /app/share/icons/hicolor/64x64/apps/net.supercellwx.app.png | ||||
|       - rm net.supercellwx.app.desktop scwx-256.png scwx-64.png | ||||
|       - cp -r * /app/ | ||||
|     sources: | ||||
|       - type: dir | ||||
|         path: ../../supercell-wx-flatpak | ||||
|       - type: file | ||||
|         path: ../scwx-qt/res/linux/net.supercellwx.app.desktop | ||||
|       - type: file | ||||
|         path: ../scwx-qt/res/icons/scwx-256.png | ||||
|       - type: file | ||||
|         path: ../scwx-qt/res/icons/scwx-64.png | ||||
| 
 | ||||
| finish-args: | ||||
|   # X11 + XShm access | ||||
|   - --share=ipc | ||||
|   - --socket=fallback-x11 | ||||
|   # Wayland access | ||||
|   - --socket=wayland | ||||
|   # GPU acceleration if needed | ||||
|   - --device=dri | ||||
|   # Needs to talk to the network: | ||||
|   - --share=network | ||||
|   # Needs to save files locally | ||||
|   - --filesystem=xdg-documents | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 AdenKoperczak
						AdenKoperczak