* [bug#41778] [PATCH WIP 0/2] Add ppsspp @ 2020-06-09 21:40 Leo Prikler 2020-06-09 21:47 ` [bug#41778] [PATCH 1/2] gnu: Add armips Leo Prikler 2020-06-29 10:02 ` [bug#41778] [PATCH 0/3] " Leo Prikler 0 siblings, 2 replies; 12+ messages in thread From: Leo Prikler @ 2020-06-09 21:40 UTC (permalink / raw) To: 41778 Hello, Guix I've been wanting to play some old PSP games, so I tried packaging ppsspp. The build works for me so far, but it's not very clean -- I'd especially appreciate it if someone could help me remove all those gratuitous sources from ext. The package description mentions spirv-cross, which I still have in my local checkout after applying an early version of 40495. That patch has been lying around since early April and is IIUC not applied since it was bundled together with taisei, whose description raised some debate about formalities. If needed, I can split that patch and resend it, but credit should still go to Vitaliy. Regards, Leo ^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#41778] [PATCH 1/2] gnu: Add armips. 2020-06-09 21:40 [bug#41778] [PATCH WIP 0/2] Add ppsspp Leo Prikler @ 2020-06-09 21:47 ` Leo Prikler 2020-06-09 21:47 ` [bug#41778] [PATCH 2/2] gnu: Add ppsspp Leo Prikler 2020-06-29 10:02 ` [bug#41778] [PATCH 0/3] " Leo Prikler 1 sibling, 1 reply; 12+ messages in thread From: Leo Prikler @ 2020-06-09 21:47 UTC (permalink / raw) To: 41778 * gnu/packages/assembly.scm (armips): New variable. --- gnu/packages/assembly.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/assembly.scm b/gnu/packages/assembly.scm index c9582bc596..5567208d27 100644 --- a/gnu/packages/assembly.scm +++ b/gnu/packages/assembly.scm @@ -371,3 +371,37 @@ It understands mnemonics and generates code for NMOS 6502s (such as 6502A, 6504, 6507, 6510, 7501, 8500, 8501, 8502 ...), CMOS 6502s (65C02 and Rockwell R65C02) and the 65816.") (license license:gpl2))) + +(define-public armips + (package + (name "armips") + (version "0.11.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Kingcom/armips.git") + (commit (string-append "v" version)))) + (sha256 + (base32 + "1c4dhjkvynqn9xm2vcvwzymk7yg8h25alnawkz4z1dnn1z1k3r9g")))) + (build-system cmake-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs #:allow-other-keys) + (invoke "./armipstests" "../source/Tests"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (install-file "armips" (string-append (assoc-ref outputs "out") + "/bin")) + #t))))) + (home-page "https://github.com/Kingcom/armips") + (synopsis "Assembler for various ARM and MIPS platforms") + (description + "armips is an assembler with full support for the MIPS R3000, MIPS R4000, +Allegrex and RSP instruction sets, partial support for the EmotionEngine +instruction set, as well as complete support for the ARM7 and ARM9 instruction +sets, both THUMB and ARM mode.") + (license license:expat))) -- 2.26.2 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#41778] [PATCH 2/2] gnu: Add ppsspp. 2020-06-09 21:47 ` [bug#41778] [PATCH 1/2] gnu: Add armips Leo Prikler @ 2020-06-09 21:47 ` Leo Prikler 0 siblings, 0 replies; 12+ messages in thread From: Leo Prikler @ 2020-06-09 21:47 UTC (permalink / raw) To: 41778 * gnu/packages/emulators.scm (ppsspp): New variable. --- gnu/packages/emulators.scm | 115 +++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index 9798ac370e..2e11807325 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -1622,3 +1622,118 @@ derived from Gens. Project goals include clean source code, combined features from various forks of Gens, and improved platform portability.") (supported-systems '("i686-linux" "x86_64-linux")) (license license:gpl2+))) + +(define-public ppsspp + (package + (name "ppsspp") + (version "1.9.4") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hrydgard/ppsspp.git") + (commit (string-append "v" version)))) + (sha256 + (base32 + "0cbxrm7i4xymlglb2aqyiiys3wm6zvnrn5n0cw4fcxdvh196ivwm")) + (file-name (git-file-name name version)))) + (build-system cmake-build-system) + (native-inputs + `(("python" ,python))) + (inputs + `(;; TODO: find a way to add FFMPEG + ;; ("ffmpeg" ,ffmpeg) + ;; TODO: unbundle builds + ("armips-source" ,(package-source armips)) + ("glslang-source" ,(package-source glslang)) + ("spirv-cross-source" ,(package-source spirv-cross)) + + ("lang" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hrydgard/ppsspp-lang.git") + (commit "3a5eb3fcb4852cb28c9138e78492effa0c227253"))) + (sha256 + (base32 + "0cnv9g5l75dmdb0hq7xxbxl06z18p1621j41bggfqj1015kvq7jk")))) + ("tests" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hrydgard/pspautotests.git") + (commit "2970fbcc23c258ebc03bba922926003fe37555e5"))) + (sha256 + (base32 + "1c3lkjhknwmiyikrfjrghfxnkd2jp698c28s4kwv6qjwdj2nwc1i")))) + + ("glew" ,glew) + ("libpng" ,libpng) + ("mesa" ,mesa) + ("sdl2" ,sdl2) + ("snappy" ,snappy) + ("zlib" ,zlib))) + (arguments + `(#:out-of-source? #f + #:configure-flags (list "-DUSE_FFMPEG=OFF" ; see TODO above + "-DUSE_DISCORD=OFF" + ;; for testing + "-DUNITTEST=ON" "-DHEADLESS=ON") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'add-external-sources + (lambda* (#:key inputs #:allow-other-keys) + ;; TODO: unbundle builds + ;; not only should we not copy these sources in, + ;; we should also remove as much from ext/ as we can + (copy-recursively (assoc-ref inputs "armips-source") + "ext/armips") + (copy-recursively (assoc-ref inputs "glslang-source") + "ext/glslang") + (copy-recursively (assoc-ref inputs "spirv-cross-source") + "ext/SPIRV-Cross") + ;; some tests are externalised, so we add them here + (copy-recursively (assoc-ref inputs "tests") + "pspautotests") + ;; i18n is externalised, so we add it here + (copy-recursively (assoc-ref inputs "lang") + "assets/lang") + #t)) + (replace 'check + (lambda _ + (for-each + (lambda (t) (invoke "./unitTest" t)) + '("Arm64Emitter" "ArmEmitter" "X64Emitter" "VertexJit" "Asin" + "SinCos" "VFPUSinCos" "MathUtil" "Parsers" "Jit" + "MatrixTranspose" "ParseLBN" "QuickTexHash" "CLZ" "MemMap")) + (invoke "python3" "test.py" "-g") + #t)) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin/ppsspp (string-append out "/bin/ppsspp")) + (share (string-append out "/share/ppsspp"))) + (copy-recursively "icons/hicolor" + (string-append out "/share/icons/hicolor")) + (install-file "PPSSPPSDL" share) + (copy-recursively "assets" (string-append share "/assets")) + + (make-desktop-entry-file + (string-append out "/share/applications/ppsspp.desktop") + #:name "PPSSPP" + #:exec (string-append share "/PPSSPPSDL") + #:icon "ppsspp") + + (mkdir-p (string-append out "/bin")) + (with-output-to-file bin/ppsspp + (lambda () + (format #t "#!~a~%exec ~a/PPSSPPSDL \"$@\"" + (which "sh") share))) + (chmod bin/ppsspp #o755) + + #t)))))) + (home-page "https://www.ppsspp.org/") + (synopsis "PSP emulator") + (description + "PPSSPP is a \"high-level\" emulator simulating the PSP operating system.") + (license license:gpl2+))) -- 2.26.2 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#41778] [PATCH 0/3] Add ppsspp 2020-06-09 21:40 [bug#41778] [PATCH WIP 0/2] Add ppsspp Leo Prikler 2020-06-09 21:47 ` [bug#41778] [PATCH 1/2] gnu: Add armips Leo Prikler @ 2020-06-29 10:02 ` Leo Prikler 2020-06-29 10:06 ` [bug#41778] [PATCH 1/3] gnu: Add armips Leo Prikler ` (3 more replies) 1 sibling, 4 replies; 12+ messages in thread From: Leo Prikler @ 2020-06-29 10:02 UTC (permalink / raw) To: 41778 Following the release of version 1.10, I've updated my package descriptions. I've also been able to unbundle some sources, but not all of them. ^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#41778] [PATCH 1/3] gnu: Add armips. 2020-06-29 10:02 ` [bug#41778] [PATCH 0/3] " Leo Prikler @ 2020-06-29 10:06 ` Leo Prikler 2020-06-29 10:06 ` [bug#41778] [PATCH 2/3] gnu: add spirv-cross Leo Prikler ` (2 subsequent siblings) 3 siblings, 0 replies; 12+ messages in thread From: Leo Prikler @ 2020-06-29 10:06 UTC (permalink / raw) To: 41778 * gnu/packages/assembly.scm (armips): New variable. --- gnu/packages/assembly.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/assembly.scm b/gnu/packages/assembly.scm index c9582bc596..5567208d27 100644 --- a/gnu/packages/assembly.scm +++ b/gnu/packages/assembly.scm @@ -371,3 +371,37 @@ It understands mnemonics and generates code for NMOS 6502s (such as 6502A, 6504, 6507, 6510, 7501, 8500, 8501, 8502 ...), CMOS 6502s (65C02 and Rockwell R65C02) and the 65816.") (license license:gpl2))) + +(define-public armips + (package + (name "armips") + (version "0.11.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Kingcom/armips.git") + (commit (string-append "v" version)))) + (sha256 + (base32 + "1c4dhjkvynqn9xm2vcvwzymk7yg8h25alnawkz4z1dnn1z1k3r9g")))) + (build-system cmake-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs #:allow-other-keys) + (invoke "./armipstests" "../source/Tests"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (install-file "armips" (string-append (assoc-ref outputs "out") + "/bin")) + #t))))) + (home-page "https://github.com/Kingcom/armips") + (synopsis "Assembler for various ARM and MIPS platforms") + (description + "armips is an assembler with full support for the MIPS R3000, MIPS R4000, +Allegrex and RSP instruction sets, partial support for the EmotionEngine +instruction set, as well as complete support for the ARM7 and ARM9 instruction +sets, both THUMB and ARM mode.") + (license license:expat))) -- 2.26.2 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#41778] [PATCH 2/3] gnu: add spirv-cross. 2020-06-29 10:02 ` [bug#41778] [PATCH 0/3] " Leo Prikler 2020-06-29 10:06 ` [bug#41778] [PATCH 1/3] gnu: Add armips Leo Prikler @ 2020-06-29 10:06 ` Leo Prikler 2020-06-29 10:06 ` [bug#41778] [PATCH 3/3] gnu: Add ppsspp Leo Prikler 2020-06-29 22:02 ` [bug#41778] [PATCH 0/3] " Nicolas Goaziou 3 siblings, 0 replies; 12+ messages in thread From: Leo Prikler @ 2020-06-29 10:06 UTC (permalink / raw) To: 41778 * gnu/packages/vulkan.scm (spirv-cross): New variable. --- gnu/packages/vulkan.scm | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index d5f5be6816..6468b0ec3d 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -102,6 +102,55 @@ SPIR-V modules. The project includes an assembler, binary module parser,disassembler, validator, and optimizer for SPIR-V.") (license license:asl2.0))) +(define-public spirv-cross + (package + (name "spirv-cross") + (version "2020-05-19") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/KhronosGroup/SPIRV-Cross") + (commit version))) + (sha256 + (base32 + "0zyijp9zx9wbd4i5lwjap7n793iz6yjkf27la60dsffxl75yy9pd")) + (file-name (git-file-name name version)))) + (build-system cmake-build-system) + (arguments + `(;; FIXME: The following tests fail: + ;; 15 - spirv-cross-test-opt + ;; 16 - spirv-cross-test-metal-opt + ;; 17 - spirv-cross-test-hlsl-opt + #:tests? #f + #:configure-flags + (list "-DSPIRV_CROSS_SHARED=YES") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-tests-to-find-deps + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "CMakeLists.txt" + (("\\$\\{CMAKE_(.*)_DIR\\}/external/glslang(.*)/bin") + (string-append (assoc-ref inputs "glslang") "/bin"))) + (substitute* "CMakeLists.txt" + (("\\$\\{CMAKE_(.*)_DIR\\}/external/spirv-tools(.*)/bin") + (string-append (assoc-ref inputs "spirv-tools") "/bin"))) + #t))))) + (inputs `(("glslang" ,glslang) + ("spirv-headers" ,spirv-headers) + ("spirv-tools" ,spirv-tools))) + (native-inputs `(("python" ,python))) + (home-page "https://github.com/KhronosGroup/SPIRV-Cross") + (synopsis "Parser for and converter of SPIR-V to other shader languages") + (description + "SPIRV-Cross tries hard to emit readable and clean output from the +SPIR-V. The goal is to emit GLSL or MSL that looks like it was written by a +human and not awkward IR/assembly-like code. NOTE: Individual features are +expected to be mostly complete, but it is possible that certain obscure GLSL +features are not yet supported. However, most missing features are expected +to be \"trivial\" improvements at this stage.") + (license license:asl2.0))) + (define-public glslang (package (name "glslang") -- 2.26.2 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#41778] [PATCH 3/3] gnu: Add ppsspp. 2020-06-29 10:02 ` [bug#41778] [PATCH 0/3] " Leo Prikler 2020-06-29 10:06 ` [bug#41778] [PATCH 1/3] gnu: Add armips Leo Prikler 2020-06-29 10:06 ` [bug#41778] [PATCH 2/3] gnu: add spirv-cross Leo Prikler @ 2020-06-29 10:06 ` Leo Prikler 2020-06-29 22:02 ` [bug#41778] [PATCH 0/3] " Nicolas Goaziou 3 siblings, 0 replies; 12+ messages in thread From: Leo Prikler @ 2020-06-29 10:06 UTC (permalink / raw) To: 41778 * gnu/packages/emulators.scm (ppsspp): New variable. * gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch: New file. * gnu/local.mk: Register it. --- gnu/local.mk | 1 + gnu/packages/emulators.scm | 137 +++++++ .../ppsspp-disable-upgrade-and-gold.patch | 358 ++++++++++++++++++ 3 files changed, 496 insertions(+) create mode 100644 gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch diff --git a/gnu/local.mk b/gnu/local.mk index a1f32a10bf..9738edfa89 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1350,6 +1350,7 @@ dist_patch_DATA = \ %D%/packages/patches/pam-mount-luks2-support.patch \ %D%/packages/patches/pango-skip-libthai-test.patch \ %D%/packages/patches/pciutils-hurd-configure.patch \ + %D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \ %D%/packages/patches/sdl-pango-api_additions.patch \ %D%/packages/patches/sdl-pango-blit_overflow.patch \ %D%/packages/patches/sdl-pango-fillrect_crash.patch \ diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index 5525b066f4..c3c6d07348 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -1778,3 +1778,140 @@ performance, features, and ease of use.") "Unicorn is a lightweight, multi-platform, multi-architecture CPU emulator framework based on QEMU.") (license license:gpl2+)))) + +(define-public ppsspp + (package + (name "ppsspp") + (version "1.10") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hrydgard/ppsspp.git") + (commit (string-append "v" version)))) + (sha256 + (base32 + "02yx1w0ygclnmdl0imsvgj24lkzi55wvxkf47q617j0jgrqhy8yl")) + (file-name (git-file-name name version)) + (patches + (search-patches "ppsspp-disable-upgrade-and-gold.patch")) + (modules '((guix build utils))) + (snippet + `(begin + ;; unbundle sources + (substitute* (list "Common/Vulkan/VulkanContext.cpp" + "ext/native/thin3d/vulkan_utils.cpp" + "GPU/Common/ShaderCommon.cpp" + "GPU/Common/ShaderTranslation.cpp" + "SDL/SDLMain.cpp") + (("ext/glslang/") "") + (("ext/SPIRV-Cross/") "spirv_cross/")) + ;; patch CMakeLists + (substitute* "CMakeLists.txt" + (("include_directories\\(ext/glslang\\)") "") + (("spirv-cross-glsl" all) + (string-append all + " spirv-cross-core spirv-cross-cpp" + " spirv-cross-reflect spirv-cross-util"))) + (substitute* "ext/CMakeLists.txt" + (("add_subdirectory\\(glslang\\)") "") + (("add_subdirectory\\(SPIRV-Cross-build\\)") "")) + (delete-file-recursively "ext/cmake") + (substitute* "git-version.cmake" + (("unknown") ,version)))))) + (build-system cmake-build-system) + (native-inputs + `(("pkg-config" ,pkg-config) + ("python" ,python))) + (inputs + `(;; TODO: unbundle builds + ("armips-source" ,(package-source armips)) + + ("lang" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hrydgard/ppsspp-lang.git") + (commit "d184ba2b607a03435be579406b816c90add334e6"))) + (sha256 + (base32 + "0s003x6247nx09qd6a1jz1l2hsk5d6k1zmh8mg3m6hjjhvbvd9j9")))) + ("tests" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hrydgard/pspautotests.git") + (commit "328b839c7243e7f733f9eae88d059485e3d808e7"))) + (sha256 + (base32 + "1gj1kr5ijxrqwvz7c41phskjr70ndp8iz0gr8c3xxsd8p9z5gdvm")))) + + ("ffmpeg" ,ffmpeg) + ("glew" ,glew) + ("glslang" ,glslang) + ("libpng" ,libpng) + ("mesa" ,mesa) + ("sdl2" ,sdl2) + ("snappy" ,snappy) + ("spirv-cross" ,spirv-cross) + ("zlib" ,zlib))) + (arguments + `(#:out-of-source? #f + #:configure-flags (list "-DUSE_DISCORD=OFF" + "-DUSE_SYSTEM_FFMPEG=ON" + ;; for testing + "-DUNITTEST=ON" "-DHEADLESS=ON") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'add-external-sources + (lambda* (#:key inputs #:allow-other-keys) + ;; TODO: unbundle builds + ;; not only should we not copy these sources in, + ;; we should also remove as much from ext/ as we can + (copy-recursively (assoc-ref inputs "armips-source") + "ext/armips") + ;; some tests are externalised, so we add them here + (copy-recursively (assoc-ref inputs "tests") + "pspautotests") + ;; i18n is externalised, so we add it here + (copy-recursively (assoc-ref inputs "lang") + "assets/lang") + #t)) + (replace 'check + (lambda _ + (for-each + (lambda (t) (invoke "./unitTest" t)) + '("Arm64Emitter" "ArmEmitter" "X64Emitter" "VertexJit" "Asin" + "SinCos" "VFPUSinCos" "MathUtil" "Parsers" "Jit" + "MatrixTranspose" "ParseLBN" "QuickTexHash" "CLZ" "MemMap")) + (invoke "python3" "test.py" "-g") + #t)) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin/ppsspp (string-append out "/bin/ppsspp")) + (share (string-append out "/share/ppsspp"))) + (copy-recursively "icons/hicolor" + (string-append out "/share/icons/hicolor")) + (install-file "PPSSPPSDL" share) + (copy-recursively "assets" (string-append share "/assets")) + + (make-desktop-entry-file + (string-append out "/share/applications/ppsspp.desktop") + #:name "PPSSPP" + #:exec (string-append share "/PPSSPPSDL") + #:icon "ppsspp") + + (mkdir-p (string-append out "/bin")) + (with-output-to-file bin/ppsspp + (lambda () + (format #t "#!~a~%exec ~a/PPSSPPSDL \"$@\"" + (which "sh") share))) + (chmod bin/ppsspp #o755) + + #t)))))) + (home-page "https://www.ppsspp.org/") + (synopsis "PSP emulator") + (description + "PPSSPP is a \"high-level\" emulator simulating the PSP operating system.") + (license license:gpl2+))) diff --git a/gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch b/gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch new file mode 100644 index 0000000000..9503ab6f31 --- /dev/null +++ b/gnu/packages/patches/ppsspp-disable-upgrade-and-gold.patch @@ -0,0 +1,358 @@ +From 951f2269f67d618d376656db831796c119f4f6b3 Mon Sep 17 00:00:00 2001 +From: Leo Prikler <leo.prikler@student.tugraz.at> +Date: Fri, 26 Jun 2020 18:20:04 +0200 +Subject: [PATCH] ppsspp: disable upgrade and gold + +--- + Core/Config.cpp | 11 ------- + Core/Config.h | 2 -- + Qt/QtMain.cpp | 6 ---- + SDL/SDLMain.cpp | 6 ---- + UI/DevScreens.cpp | 3 -- + UI/GameSettingsScreen.cpp | 1 - + UI/MainScreen.cpp | 63 +------------------------------------ + UI/MiscScreens.cpp | 31 ++---------------- + UWP/PPSSPP_UWPMain.cpp | 6 ---- + Windows/MainWindowMenu.cpp | 2 +- + Windows/main.cpp | 6 ---- + android/jni/app-android.cpp | 6 ---- + 12 files changed, 5 insertions(+), 138 deletions(-) + +diff --git a/Core/Config.cpp b/Core/Config.cpp +index 214aeb433..04e3b151d 100644 +--- a/Core/Config.cpp ++++ b/Core/Config.cpp +@@ -428,7 +428,6 @@ static ConfigSetting generalSettings[] = { + ConfigSetting("IgnoreBadMemAccess", &g_Config.bIgnoreBadMemAccess, true, true), + ConfigSetting("CurrentDirectory", &g_Config.currentDirectory, ""), + ConfigSetting("ShowDebuggerOnLoad", &g_Config.bShowDebuggerOnLoad, false), +- ConfigSetting("CheckForNewVersion", &g_Config.bCheckForNewVersion, true), + ConfigSetting("Language", &g_Config.sLanguageIni, &DefaultLangRegion), + ConfigSetting("ForceLagSync2", &g_Config.bForceLagSync, false, true, true), + ConfigSetting("DiscordPresence", &g_Config.bDiscordPresence, true, true, false), // Or maybe it makes sense to have it per-game? Race conditions abound... +@@ -1229,16 +1228,6 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) { + upgradeMessage = ""; + } + +- // Check for new version on every 10 runs. +- // Sometimes the download may not be finished when the main screen shows (if the user dismisses the +- // splash screen quickly), but then we'll just show the notification next time instead, we store the +- // upgrade number in the ini. +- if (iRunCount % 10 == 0 && bCheckForNewVersion) { +- std::shared_ptr<http::Download> dl = g_DownloadManager.StartDownloadWithCallback( +- "http://www.ppsspp.org/version.json", "", &DownloadCompletedCallback); +- dl->SetHidden(true); +- } +- + INFO_LOG(LOADER, "Loading controller config: %s", controllerIniFilename_.c_str()); + bSaveSettings = true; + +diff --git a/Core/Config.h b/Core/Config.h +index 084eacc94..e7134cab5 100644 +--- a/Core/Config.h ++++ b/Core/Config.h +@@ -99,7 +99,6 @@ struct Config { + bool bIgnoreBadMemAccess; + bool bFastMemory; + int iCpuCore; +- bool bCheckForNewVersion; + bool bForceLagSync; + bool bFuncReplacements; + bool bHideSlowWarnings; +@@ -521,4 +520,3 @@ std::string CreateRandMAC(); + // TODO: Find a better place for this. + extern http::Downloader g_DownloadManager; + extern Config g_Config; +- +diff --git a/Qt/QtMain.cpp b/Qt/QtMain.cpp +index 7713b6587..1d92d1175 100644 +--- a/Qt/QtMain.cpp ++++ b/Qt/QtMain.cpp +@@ -194,12 +194,6 @@ bool System_GetPropertyBool(SystemProperty prop) { + return true; + case SYSPROP_HAS_FILE_BROWSER: + return true; +- case SYSPROP_APP_GOLD: +-#ifdef GOLD +- return true; +-#else +- return false; +-#endif + default: + return false; + } +diff --git a/SDL/SDLMain.cpp b/SDL/SDLMain.cpp +index 52028d087..d8697d210 100644 +--- a/SDL/SDLMain.cpp ++++ b/SDL/SDLMain.cpp +@@ -356,12 +356,6 @@ bool System_GetPropertyBool(SystemProperty prop) { + switch (prop) { + case SYSPROP_HAS_BACK_BUTTON: + return true; +- case SYSPROP_APP_GOLD: +-#ifdef GOLD +- return true; +-#else +- return false; +-#endif + default: + return false; + } +diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp +index f146d099e..625ee124c 100644 +--- a/UI/DevScreens.cpp ++++ b/UI/DevScreens.cpp +@@ -603,9 +603,6 @@ void SystemInfoScreen::CreateViews() { + #ifdef _M_SSE + buildConfig->Add(new InfoItem("_M_SSE", StringFromFormat("0x%x", _M_SSE))); + #endif +- if (System_GetPropertyBool(SYSPROP_APP_GOLD)) { +- buildConfig->Add(new InfoItem("GOLD", "")); +- } + + ViewGroup *cpuExtensionsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT)); + cpuExtensionsScroll->SetTag("DevSystemInfoCPUExt"); +diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp +index 8202870c7..81112f822 100644 +--- a/UI/GameSettingsScreen.cpp ++++ b/UI/GameSettingsScreen.cpp +@@ -796,7 +796,6 @@ void GameSettingsScreen::CreateViews() { + } + #endif + +- systemSettings->Add(new CheckBox(&g_Config.bCheckForNewVersion, sy->T("VersionCheck", "Check for new versions of PPSSPP"))); + const std::string bgPng = GetSysDirectory(DIRECTORY_SYSTEM) + "background.png"; + const std::string bgJpg = GetSysDirectory(DIRECTORY_SYSTEM) + "background.jpg"; + if (File::Exists(bgPng) || File::Exists(bgJpg)) { +diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp +index 43535913d..36834020d 100644 +--- a/UI/MainScreen.cpp ++++ b/UI/MainScreen.cpp +@@ -1054,11 +1054,7 @@ void MainScreen::CreateViews() { + sprintf(versionString, "%s", PPSSPP_GIT_VERSION); + rightColumnItems->SetSpacing(0.0f); + LinearLayout *logos = new LinearLayout(ORIENT_HORIZONTAL); +- if (System_GetPropertyBool(SYSPROP_APP_GOLD)) { +- logos->Add(new ImageView(ImageID("I_ICONGOLD"), IS_DEFAULT, new AnchorLayoutParams(64, 64, 10, 10, NONE, NONE, false))); +- } else { +- logos->Add(new ImageView(ImageID("I_ICON"), IS_DEFAULT, new AnchorLayoutParams(64, 64, 10, 10, NONE, NONE, false))); +- } ++ logos->Add(new ImageView(ImageID("I_ICON"), IS_DEFAULT, new AnchorLayoutParams(64, 64, 10, 10, NONE, NONE, false))); + logos->Add(new ImageView(ImageID("I_LOGO"), IS_DEFAULT, new LinearLayoutParams(Margins(-12, 0, 0, 0)))); + rightColumnItems->Add(logos); + TextView *ver = rightColumnItems->Add(new TextView(versionString, new LinearLayoutParams(Margins(70, -6, 0, 0)))); +@@ -1070,11 +1066,6 @@ void MainScreen::CreateViews() { + rightColumnItems->Add(new Choice(mm->T("Game Settings", "Settings")))->OnClick.Handle(this, &MainScreen::OnGameSettings); + rightColumnItems->Add(new Choice(mm->T("Credits")))->OnClick.Handle(this, &MainScreen::OnCredits); + rightColumnItems->Add(new Choice(mm->T("www.ppsspp.org")))->OnClick.Handle(this, &MainScreen::OnPPSSPPOrg); +- if (!System_GetPropertyBool(SYSPROP_APP_GOLD)) { +- Choice *gold = rightColumnItems->Add(new Choice(mm->T("Buy PPSSPP Gold"))); +- gold->OnClick.Handle(this, &MainScreen::OnSupport); +- gold->SetIcon(ImageID("I_ICONGOLD")); +- } + + #if !PPSSPP_PLATFORM(UWP) + // Having an exit button is against UWP guidelines. +@@ -1099,28 +1090,6 @@ void MainScreen::CreateViews() { + } else if (tabHolder_->GetVisibility() != V_GONE) { + root_->SetDefaultFocusView(tabHolder_); + } +- +- auto u = GetI18NCategory("Upgrade"); +- +- upgradeBar_ = 0; +- if (!g_Config.upgradeMessage.empty()) { +- upgradeBar_ = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT)); +- +- UI::Margins textMargins(10, 5); +- UI::Margins buttonMargins(0, 0); +- UI::Drawable solid(0xFFbd9939); +- upgradeBar_->SetBG(solid); +- upgradeBar_->Add(new TextView(u->T("New version of PPSSPP available") + std::string(": ") + g_Config.upgradeVersion, new LinearLayoutParams(1.0f, textMargins))); +- upgradeBar_->Add(new Button(u->T("Download"), new LinearLayoutParams(buttonMargins)))->OnClick.Handle(this, &MainScreen::OnDownloadUpgrade); +- upgradeBar_->Add(new Button(u->T("Dismiss"), new LinearLayoutParams(buttonMargins)))->OnClick.Handle(this, &MainScreen::OnDismissUpgrade); +- +- // Slip in under root_ +- LinearLayout *newRoot = new LinearLayout(ORIENT_VERTICAL); +- newRoot->Add(root_); +- newRoot->Add(upgradeBar_); +- root_->ReplaceLayoutParams(new LinearLayoutParams(1.0)); +- root_ = newRoot; +- } + } + + UI::EventReturn MainScreen::OnAllowStorage(UI::EventParams &e) { +@@ -1128,27 +1097,6 @@ UI::EventReturn MainScreen::OnAllowStorage(UI::EventParams &e) { + return UI::EVENT_DONE; + } + +-UI::EventReturn MainScreen::OnDownloadUpgrade(UI::EventParams &e) { +-#if PPSSPP_PLATFORM(ANDROID) +- // Go to app store +- if (System_GetPropertyBool(SYSPROP_APP_GOLD)) { +- LaunchBrowser("market://details?id=org.ppsspp.ppssppgold"); +- } else { +- LaunchBrowser("market://details?id=org.ppsspp.ppsspp"); +- } +-#else +- // Go directly to ppsspp.org and let the user sort it out +- LaunchBrowser("https://www.ppsspp.org/downloads.html"); +-#endif +- return UI::EVENT_DONE; +-} +- +-UI::EventReturn MainScreen::OnDismissUpgrade(UI::EventParams &e) { +- g_Config.DismissUpgrade(); +- upgradeBar_->SetVisibility(UI::V_GONE); +- return UI::EVENT_DONE; +-} +- + void MainScreen::sendMessage(const char *message, const char *value) { + // Always call the base class method first to handle the most common messages. + UIScreenWithBackground::sendMessage(message, value); +@@ -1319,15 +1267,6 @@ UI::EventReturn MainScreen::OnCredits(UI::EventParams &e) { + return UI::EVENT_DONE; + } + +-UI::EventReturn MainScreen::OnSupport(UI::EventParams &e) { +-#ifdef __ANDROID__ +- LaunchBrowser("market://details?id=org.ppsspp.ppssppgold"); +-#else +- LaunchBrowser("https://central.ppsspp.org/buygold"); +-#endif +- return UI::EVENT_DONE; +-} +- + UI::EventReturn MainScreen::OnPPSSPPOrg(UI::EventParams &e) { + LaunchBrowser("https://www.ppsspp.org"); + return UI::EVENT_DONE; +diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp +index a6542c65d..f5f101594 100644 +--- a/UI/MiscScreens.cpp ++++ b/UI/MiscScreens.cpp +@@ -498,11 +498,7 @@ void LogoScreen::render() { + char temp[256]; + // Manually formatting UTF-8 is fun. \xXX doesn't work everywhere. + snprintf(temp, sizeof(temp), "%s Henrik Rydg%c%crd", cr->T("created", "Created by"), 0xC3, 0xA5); +- if (System_GetPropertyBool(SYSPROP_APP_GOLD)) { +- dc.Draw()->DrawImage(ImageID("I_ICONGOLD"), bounds.centerX() - 120, bounds.centerY() - 30, 1.2f, textColor, ALIGN_CENTER); +- } else { +- dc.Draw()->DrawImage(ImageID("I_ICON"), bounds.centerX() - 120, bounds.centerY() - 30, 1.2f, textColor, ALIGN_CENTER); +- } ++ dc.Draw()->DrawImage(ImageID("I_ICON"), bounds.centerX() - 120, bounds.centerY() - 30, 1.2f, textColor, ALIGN_CENTER); + dc.Draw()->DrawImage(ImageID("I_LOGO"), bounds.centerX() + 40, bounds.centerY() - 30, 1.5f, textColor, ALIGN_CENTER); + //dc.Draw()->DrawTextShadow(UBUNTU48, "PPSSPP", xres / 2, yres / 2 - 30, textColor, ALIGN_CENTER); + dc.SetFontScale(1.0f, 1.0f); +@@ -538,10 +534,6 @@ void CreditsScreen::CreateViews() { + // Really need to redo this whole layout with some linear layouts... + + int rightYOffset = 0; +- if (!System_GetPropertyBool(SYSPROP_APP_GOLD)) { +- root_->Add(new Button(cr->T("Buy Gold"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnSupport); +- rightYOffset = 74; +- } + root_->Add(new Button(cr->T("PPSSPP Forums"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 158, false)))->OnClick.Handle(this, &CreditsScreen::OnForums); + root_->Add(new Button(cr->T("Discord"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 232, false)))->OnClick.Handle(this, &CreditsScreen::OnDiscord); + root_->Add(new Button("www.ppsspp.org", new AnchorLayoutParams(260, 64, 10, NONE, NONE, 10, false)))->OnClick.Handle(this, &CreditsScreen::OnPPSSPPOrg); +@@ -550,20 +542,7 @@ void CreditsScreen::CreateViews() { + #if PPSSPP_PLATFORM(ANDROID) || PPSSPP_PLATFORM(IOS) + root_->Add(new Button(cr->T("Share PPSSPP"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, rightYOffset + 158, false)))->OnClick.Handle(this, &CreditsScreen::OnShare); + #endif +- if (System_GetPropertyBool(SYSPROP_APP_GOLD)) { +- root_->Add(new ImageView(ImageID("I_ICONGOLD"), IS_DEFAULT, new AnchorLayoutParams(100, 64, 10, 10, NONE, NONE, false))); +- } else { +- root_->Add(new ImageView(ImageID("I_ICON"), IS_DEFAULT, new AnchorLayoutParams(100, 64, 10, 10, NONE, NONE, false))); +- } +-} +- +-UI::EventReturn CreditsScreen::OnSupport(UI::EventParams &e) { +-#ifdef __ANDROID__ +- LaunchBrowser("market://details?id=org.ppsspp.ppssppgold"); +-#else +- LaunchBrowser("https://central.ppsspp.org/buygold"); +-#endif +- return UI::EVENT_DONE; ++ root_->Add(new ImageView(ImageID("I_ICON"), IS_DEFAULT, new AnchorLayoutParams(100, 64, 10, 10, NONE, NONE, false))); + } + + UI::EventReturn CreditsScreen::OnTwitter(UI::EventParams &e) { +@@ -747,11 +726,7 @@ void CreditsScreen::render() { + + // TODO: This is kinda ugly, done on every frame... + char temp[256]; +- if (System_GetPropertyBool(SYSPROP_APP_GOLD)) { +- snprintf(temp, sizeof(temp), "PPSSPP Gold %s", PPSSPP_GIT_VERSION); +- } else { +- snprintf(temp, sizeof(temp), "PPSSPP %s", PPSSPP_GIT_VERSION); +- } ++ snprintf(temp, sizeof(temp), "PPSSPP %s", PPSSPP_GIT_VERSION); + credits[0] = (const char *)temp; + + UIContext &dc = *screenManager()->getUIContext(); +diff --git a/UWP/PPSSPP_UWPMain.cpp b/UWP/PPSSPP_UWPMain.cpp +index 24f3b964d..1d66ba7ee 100644 +--- a/UWP/PPSSPP_UWPMain.cpp ++++ b/UWP/PPSSPP_UWPMain.cpp +@@ -399,12 +399,6 @@ bool System_GetPropertyBool(SystemProperty prop) { + return false; + case SYSPROP_HAS_BACK_BUTTON: + return true; +- case SYSPROP_APP_GOLD: +-#ifdef GOLD +- return true; +-#else +- return false; +-#endif + default: + return false; + } +diff --git a/Windows/MainWindowMenu.cpp b/Windows/MainWindowMenu.cpp +index b5e1bb0eb..71b29b48a 100644 +--- a/Windows/MainWindowMenu.cpp ++++ b/Windows/MainWindowMenu.cpp +@@ -1377,7 +1377,7 @@ namespace MainWindow { + { + W32Util::CenterWindow(hDlg); + HWND versionBox = GetDlgItem(hDlg, IDC_VERSION); +- std::string windowText = System_GetPropertyBool(SYSPROP_APP_GOLD) ? "PPSSPP Gold " : "PPSSPP "; ++ std::string windowText = "PPSSPP "; + windowText.append(PPSSPP_GIT_VERSION); + SetWindowText(versionBox, ConvertUTF8ToWString(windowText).c_str()); + } +diff --git a/Windows/main.cpp b/Windows/main.cpp +index 3795597e2..fd98d0453 100644 +--- a/Windows/main.cpp ++++ b/Windows/main.cpp +@@ -268,12 +268,6 @@ bool System_GetPropertyBool(SystemProperty prop) { + return true; + case SYSPROP_HAS_BACK_BUTTON: + return true; +- case SYSPROP_APP_GOLD: +-#ifdef GOLD +- return true; +-#else +- return false; +-#endif + default: + return false; + } +diff --git a/android/jni/app-android.cpp b/android/jni/app-android.cpp +index 086371085..0a340c0ae 100644 +--- a/android/jni/app-android.cpp ++++ b/android/jni/app-android.cpp +@@ -372,12 +372,6 @@ bool System_GetPropertyBool(SystemProperty prop) { + return true; + case SYSPROP_HAS_IMAGE_BROWSER: + return true; +- case SYSPROP_APP_GOLD: +-#ifdef GOLD +- return true; +-#else +- return false; +-#endif + default: + return false; + } +-- +2.26.2 + -- 2.26.2 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#41778] [PATCH 0/3] Add ppsspp 2020-06-29 10:02 ` [bug#41778] [PATCH 0/3] " Leo Prikler ` (2 preceding siblings ...) 2020-06-29 10:06 ` [bug#41778] [PATCH 3/3] gnu: Add ppsspp Leo Prikler @ 2020-06-29 22:02 ` Nicolas Goaziou 2020-06-29 23:33 ` Leo Prikler 3 siblings, 1 reply; 12+ messages in thread From: Nicolas Goaziou @ 2020-06-29 22:02 UTC (permalink / raw) To: Leo Prikler; +Cc: 41778 Hello, Leo Prikler <leo.prikler@student.tugraz.at> writes: > Following the release of version 1.10, I've updated my package > descriptions. I've also been able to unbundle some sources, but not > all of them. OOC, did you try to symlink sources instead of copying them? Note that you don't mention what is left to unbundle. Would it make sense to add this information? Otherwise, LGTM, barring the description of spirv-cross, where I suggest to drop the "NOTE:" part. It reminds me taisei package felt through the cracks. I'll apply it once spirv-cross is pushed. Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#41778] [PATCH 0/3] Add ppsspp 2020-06-29 22:02 ` [bug#41778] [PATCH 0/3] " Nicolas Goaziou @ 2020-06-29 23:33 ` Leo Prikler 2020-06-30 15:08 ` bug#41778: " Nicolas Goaziou 0 siblings, 1 reply; 12+ messages in thread From: Leo Prikler @ 2020-06-29 23:33 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: 41778 Hello, Am Dienstag, den 30.06.2020, 00:02 +0200 schrieb Nicolas Goaziou: > Hello, > > Leo Prikler <leo.prikler@student.tugraz.at> writes: > > > Following the release of version 1.10, I've updated my package > > descriptions. I've also been able to unbundle some sources, but > > not > > all of them. > > OOC, did you try to symlink sources instead of copying them? No, but I'd imagine it would not work out great, because the source is a git checkout in /gnu/store, which is read-only and it is compiled in- place. > Note that you don't mention what is left to unbundle. Would it make > sense to add this information? I'm looking mostly at the contents of ext/ here, which has stuff we already package, like cityhash among others. A bit of context is given in the unbundling snippet I use for glslang and spirv-cross, which I've managed to unbundle, but the rest are not pulled in as submodules, so it would require a `guix build --source` and manual analysis to sift through all that. I don't think a less vague comment could improve this understanding without risking to be invalidated at some point in the future. Perhaps I could clarify, that it's "mostly ext/", but even that is not completely true, since upstream also has ffmpeg as a toplevel submodule (which I don't pull in, instead using the flags they already provide for using system ffmpeg). > Otherwise, LGTM, barring the description of spirv-cross, where I > suggest > to drop the "NOTE:" part. It reminds me taisei package felt through > the > cracks. I'll apply it once spirv-cross is pushed. To be fair, that's where I copied it from – I think I already mentioned that. I just updated the version and added some details in the comment regarding failing tests and hence added my updated patch. I also think this description to be quite weird, but at the same time am unsure on how to better rephrase it. I will send an updated version of it once I do come up with something better than just dropping the "NOTE:" part. Regards, Leo ^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#41778: [PATCH 0/3] Add ppsspp 2020-06-29 23:33 ` Leo Prikler @ 2020-06-30 15:08 ` Nicolas Goaziou 2020-06-30 21:31 ` [bug#41778] " Leo Prikler 0 siblings, 1 reply; 12+ messages in thread From: Nicolas Goaziou @ 2020-06-30 15:08 UTC (permalink / raw) To: Leo Prikler; +Cc: 41778-done Hello, Leo Prikler <leo.prikler@student.tugraz.at> writes: > No, but I'd imagine it would not work out great, because the source is > a git checkout in /gnu/store, which is read-only and it is compiled in- > place. Oh ok. I didn't get it was compiled in-place. > I'm looking mostly at the contents of ext/ here, which has stuff we > already package, like cityhash among others. A bit of context is given > in the unbundling snippet I use for glslang and spirv-cross, which I've > managed to unbundle, but the rest are not pulled in as submodules, so > it would require a `guix build --source` and manual analysis to sift > through all that. > I don't think a less vague comment could improve this understanding > without risking to be invalidated at some point in the future. Perhaps > I could clarify, that it's "mostly ext/", but even that is not > completely true, since upstream also has ffmpeg as a toplevel submodule > (which I don't pull in, instead using the flags they already provide > for using system ffmpeg). Fair enough. >> Otherwise, LGTM, barring the description of spirv-cross, where I >> suggest >> to drop the "NOTE:" part. It reminds me taisei package felt through >> the >> cracks. I'll apply it once spirv-cross is pushed. > To be fair, that's where I copied it from – I think I already mentioned > that. I know. And this is what reminded about taisei. > I just updated the version and added some details in the comment > regarding failing tests and hence added my updated patch. I also think > this description to be quite weird, but at the same time am unsure on > how to better rephrase it. I will send an updated version of it once I > do come up with something better than just dropping the "NOTE:" part. Well, I still think dropping the note is appropriate, but I won't fight over it. Let me know if you find something that suits you better. I applied your patches. I tweaked comments. In particular comments starting with two semicolons are full sentences and are supposed to start with a capital and end with a full stop. Thank you! Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 12+ messages in thread
* [bug#41778] [PATCH 0/3] Add ppsspp 2020-06-30 15:08 ` bug#41778: " Nicolas Goaziou @ 2020-06-30 21:31 ` Leo Prikler 2020-07-01 10:15 ` Nicolas Goaziou 0 siblings, 1 reply; 12+ messages in thread From: Leo Prikler @ 2020-06-30 21:31 UTC (permalink / raw) To: Nicolas Goaziou; +Cc: 41778-done [-- Attachment #1: Type: text/plain, Size: 806 bytes --] Am Dienstag, den 30.06.2020, 17:08 +0200 schrieb Nicolas Goaziou: > Well, I still think dropping the note is appropriate, but I won't > fight > over it. Let me know if you find something that suits you better. Don't get me wrong, I agree on dropping the note, but I didn't want to resend the patch just to delete it (since deletion is a rather trivial operation, simpler even than forming partial sentences to full ones in comments). Either way, I do have a better phrasing now, which I'll attach. > I applied your patches. I tweaked comments. In particular comments > starting with two semicolons are full sentences and are supposed to > start with a capital and end with a full stop. Thanks you! I managed to unbundle some more sources today and also cleaned up my comments as I did so. Regards, Leo [-- Attachment #2: 0001-gnu-spirv-cross-Improve-description.patch --] [-- Type: text/x-patch, Size: 1291 bytes --] From 8d44bfdd8bfc0d9595ff1ecbc5fd5f00a5d1f4c5 Mon Sep 17 00:00:00 2001 From: Leo Prikler <leo.prikler@student.tugraz.at> Date: Tue, 30 Jun 2020 11:41:36 +0200 Subject: [PATCH 1/2] gnu: spirv-cross: Improve description. * gnu/packages/vulkan.scm (spirv-cross)[description]: Simplify. --- gnu/packages/vulkan.scm | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm index 2e640f502c..fe37b59e26 100644 --- a/gnu/packages/vulkan.scm +++ b/gnu/packages/vulkan.scm @@ -144,13 +144,7 @@ parser,disassembler, validator, and optimizer for SPIR-V.") (synopsis "Parser for and converter of SPIR-V to other shader languages") (description "SPIRV-Cross tries hard to emit readable and clean output from the -SPIR-V. The goal is to emit GLSL or MSL that looks like it was written by -a human and not awkward IR/assembly-like code. - -NOTE: Individual features are expected to be mostly complete, but it is -possible that certain obscure GLSL features are not yet supported. However, -most missing features are expected to be ``trivial'' improvements at this -stage.") +SPIR-V, aiming to emit GLSL or MSL that looks like human-written code.") (license license:asl2.0))) (define-public glslang -- 2.27.0 [-- Attachment #3: 0002-gnu-ppsspp-Unbundle-more-sources.patch --] [-- Type: text/x-patch, Size: 6990 bytes --] From 655b614f643eeaac570dde3d999bb6fd29f55af6 Mon Sep 17 00:00:00 2001 From: Leo Prikler <leo.prikler@student.tugraz.at> Date: Tue, 30 Jun 2020 19:34:38 +0200 Subject: [PATCH 2/2] gnu: ppsspp: Unbundle more sources. * gnu/packages/emulators (ppsspp)[source]: Update unbundling snippet. [inputs]: Add cityhash, libzip, vulkan-headers, vulkan-loader, xxhash. [arguments]<#:configure-flags>: Add -DUSE_SYSTEM_LIBZIP=ON. Update comments accordingly. --- gnu/packages/emulators.scm | 79 ++++++++++++++++++++++++++++++-------- 1 file changed, 64 insertions(+), 15 deletions(-) diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index 8b39517e3f..8a9ca428a9 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -48,6 +48,7 @@ #:use-module (gnu packages compression) #:use-module (gnu packages cross-base) #:use-module (gnu packages curl) + #:use-module (gnu packages digest) #:use-module (gnu packages elf) #:use-module (gnu packages fonts) #:use-module (gnu packages fontutils) @@ -1858,25 +1859,69 @@ framework based on QEMU.") (modules '((guix build utils))) (snippet `(begin - ;; Unbundle sources. - (substitute* (list "Common/Vulkan/VulkanContext.cpp" - "ext/native/thin3d/vulkan_utils.cpp" - "GPU/Common/ShaderCommon.cpp" - "GPU/Common/ShaderTranslation.cpp" - "SDL/SDLMain.cpp") + ;; The following is quite a heavy-handed way of unbundling PPSSPP. + ;; There are still a number of external sources, that we don't + ;; remove here. Some may be packaged, others are not. + ;; First, we patch existing sources to include the right headers. + (substitute* (append (list "ext/native/thin3d/vulkan_utils.cpp" + "ext/native/thin3d/thin3d_vulkan.cpp") + (find-files "Common" ".*\\.(h|cpp)") + (find-files "Core" ".*\\.(h|cpp)") + (find-files "GPU" ".*\\.(h|cpp)") + (find-files "SDL" ".*\\.(h|cpp)") + (find-files "UI" ".*\\.(h|cpp)")) + ;; These headers are all hard-coded in the original source. + (("ext/cityhash/") "") (("ext/glslang/") "") - (("ext/SPIRV-Cross/") "spirv_cross/")) - ;; Patch CMakeLists. + (("ext/SPIRV-Cross/") "spirv_cross/") + (("ext/vulkan/") "vulkan/") + (("ext/xxhash.h") "xxhash.h") + ;; These definitions do not actually exist in the Vulkan headers, + ;; but PPSSPP defines them in ext/vulkan. + (("VK_FORMAT_BEGIN_RANGE") "VK_FORMAT_UNDEFINED") + (("VK_FORMAT_END_RANGE") "VK_FORMAT_ASTC_12x12_SRGB_BLOCK")) + ;; Next, we patch CMakeLists. (substitute* "CMakeLists.txt" + ;; Drop unnecessary includes and targets. (("include_directories\\(ext/glslang\\)") "") + (("include_directories\\(ext/xxhash\\)") "") + (("include_directories\\(ext/cityhash\\)") "") + (("set_target_properties\\(cityhash .*\\)") "") + ;; Fix linking to GLEW. + (("TARGET Ext::GLEW") "true") + (("target_link_libraries\\(native Ext::GLEW\\)") + "find_package(GLEW)\ntarget_link_libraries(native GLEW::GLEW)") + (("Ext::Snappy") "snappy") + ;; Don't search for cityhash/xxhash, we already have them. + (("add_library\\((city|xx)hash STATIC") "if()\nendif(") + (("ext/xxhash\\.[ch]") "") + (("ext/native/ext/cityhash/.*\\.(cpp|h)") "") + ;; Link all of spirv-cross. (("spirv-cross-glsl" all) (string-append all " spirv-cross-core spirv-cross-cpp" " spirv-cross-reflect spirv-cross-util"))) (substitute* "ext/CMakeLists.txt" + (("add_subdirectory\\(glew\\)") "") (("add_subdirectory\\(glslang\\)") "") + (("add_subdirectory\\(snappy\\)") "") (("add_subdirectory\\(SPIRV-Cross-build\\)") "")) - (delete-file-recursively "ext/cmake") + ;; Finally, we can delete the bundled sources. + (for-each delete-file-recursively + '("ext/cmake" + "ext/glew" + "ext/glslang" "ext/glslang-build" + "ext/native/ext/cityhash" + "ext/native/ext/libpng17" + "ext/native/ext/libzip" + "ext/snappy" + "ext/SPIRV-Cross" "ext/SPIRV-Cross-build" + "ext/vulkan" + "ext/xxhash.c" + "ext/xxhash.h" + "ext/zlib")) + ;; Since we are not including git as an input, PPSSPP is confused + ;; about its version. Let's fix that here. (substitute* "git-version.cmake" (("unknown") ,version)))))) (build-system cmake-build-system) @@ -1884,16 +1929,21 @@ framework based on QEMU.") `(("pkg-config" ,pkg-config) ("python" ,python))) (inputs - `(("ffmpeg" ,ffmpeg) + `(("cityhash" ,cityhash) + ("ffmpeg" ,ffmpeg) ("glew" ,glew) ("glslang" ,glslang) ("libpng" ,libpng) + ("libzip" ,libzip) ("mesa" ,mesa) ("sdl2" ,sdl2) ("snappy" ,snappy) ("spirv-cross" ,spirv-cross) + ("vulkan-headers" ,vulkan-headers) + ("vulkan-loader" ,vulkan-loader) + ("xxhash" ,xxhash) ("zlib" ,zlib) - ;; TODO: unbundle builds. + ;; TODO: unbundle armips. ("armips-source" ,(package-source armips)) ("lang" ,(origin @@ -1915,15 +1965,14 @@ framework based on QEMU.") `(#:out-of-source? #f #:configure-flags (list "-DUSE_DISCORD=OFF" "-DUSE_SYSTEM_FFMPEG=ON" - ;; For testing. + "-DUSE_SYSTEM_LIBZIP=ON" + ;; for testing "-DUNITTEST=ON" "-DHEADLESS=ON") #:phases (modify-phases %standard-phases (add-after 'unpack 'add-external-sources (lambda* (#:key inputs #:allow-other-keys) - ;; TODO: unbundle builds. Not only should we not copy these - ;; sources in, we should also remove as much from "ext/" as we - ;; can. + ;; TODO: unbundle armips. (copy-recursively (assoc-ref inputs "armips-source") "ext/armips") ;; Some tests are externalised, so we add them here. -- 2.27.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [bug#41778] [PATCH 0/3] Add ppsspp 2020-06-30 21:31 ` [bug#41778] " Leo Prikler @ 2020-07-01 10:15 ` Nicolas Goaziou 0 siblings, 0 replies; 12+ messages in thread From: Nicolas Goaziou @ 2020-07-01 10:15 UTC (permalink / raw) To: Leo Prikler; +Cc: 41778-done Hello, Leo Prikler <leo.prikler@student.tugraz.at> writes: > Thanks you! I managed to unbundle some more sources today and also > cleaned up my comments as I did so. There sure is some work involved here! I applied both patch, thank you! Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2020-07-01 10:16 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-06-09 21:40 [bug#41778] [PATCH WIP 0/2] Add ppsspp Leo Prikler 2020-06-09 21:47 ` [bug#41778] [PATCH 1/2] gnu: Add armips Leo Prikler 2020-06-09 21:47 ` [bug#41778] [PATCH 2/2] gnu: Add ppsspp Leo Prikler 2020-06-29 10:02 ` [bug#41778] [PATCH 0/3] " Leo Prikler 2020-06-29 10:06 ` [bug#41778] [PATCH 1/3] gnu: Add armips Leo Prikler 2020-06-29 10:06 ` [bug#41778] [PATCH 2/3] gnu: add spirv-cross Leo Prikler 2020-06-29 10:06 ` [bug#41778] [PATCH 3/3] gnu: Add ppsspp Leo Prikler 2020-06-29 22:02 ` [bug#41778] [PATCH 0/3] " Nicolas Goaziou 2020-06-29 23:33 ` Leo Prikler 2020-06-30 15:08 ` bug#41778: " Nicolas Goaziou 2020-06-30 21:31 ` [bug#41778] " Leo Prikler 2020-07-01 10:15 ` Nicolas Goaziou
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.