cucumber-sp / yandex-music-linux

Linux client of Yandex Music
Other
235 stars 5 forks source link

Создание RPM - не вышло #8

Closed x09 closed 5 months ago

x09 commented 5 months ago
[user@alt-p10-wks yandex-music-linux]$ ./repack.sh Yandex_Music_x64_5.0.8.exe 

7-Zip [64] 17.04 : Copyright (c) 1999-2021 Igor Pavlov : 2017-08-28
p7zip Version 17.04 (locale=ru_RU.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs Common KVM processor (F61),ASM)

Scanning the drive for archives:
1 file, 74910528 bytes (72 MiB)

Extracting archive: Yandex_Music_x64_5.0.8.exe
--       
Path = Yandex_Music_x64_5.0.8.exe
Type = PE
Physical Size = 74910528
CPU = x86
Characteristics = Executable 32-bit NoRelocs NoLineNums NoLocalSyms
Created = 2018-12-16 03:26:14
Headers Size = 1024
Checksum = 74913208
Image Size = 2068480
Section Alignment = 4096
File Alignment = 512
Code Size = 26624
Initialized Data Size = 473088
Uninitialized Data Size = 16384
Linker Version = 6.0
OS Version = 4.0
Image Version = 6.0
Subsystem Version = 4.0
Subsystem = Windows GUI
DLL Characteristics = Relocated NX-Compatible NoSEH TerminalServerAware
Stack Reserve = 1048576
Stack Commit = 4096
Heap Reserve = 1048576
Heap Commit = 4096
Image Base = 4194304
Comment = FileVersion: 5.0.8.0
FileVersion: 5.0.8.trunk/e6263cec
ProductVersion: 5.0.8.0
ProductVersion: 5.0.8
CompanyName: Яндекс Музыка
FileDescription: Персональные рекомендации, подборки на любой случай и музыкальные новинки
LegalCopyright: Яндекс Музыка
LegalTrademarks: Яндекс Музыка
ProductName: Яндекс Музыка
----
Path = [0]
Size = 74500264
Packed Size = 74500264
Virtual Size = 74500264
Offset = 399872
--
Path = [0]
Type = Nsis
Physical Size = 74500264
Method = Deflate
Solid = -
Headers Size = 51772
Embedded Stub Size = 0
SubType = NSIS-3 Unicode

Everything is Ok

Files: 8
Size:       75118611
Compressed: 74910528

7-Zip [64] 17.04 : Copyright (c) 1999-2021 Igor Pavlov : 2017-08-28
p7zip Version 17.04 (locale=ru_RU.UTF-8,Utf16=on,HugeFiles=on,64 bits,2 CPUs Common KVM processor (F61),ASM)

Scanning the drive for archives:
1 file, 74078171 bytes (71 MiB)

Extracting archive: ./app-64.7z
--
Path = ./app-64.7z
Type = 7z
Physical Size = 74078171
Headers Size = 1167
Method = LZMA2:26 LZMA:20 BCJ2
Solid = +
Blocks = 2

Everything is Ok                       

Folders: 2
Files: 74
Size:       294860711
Compressed: 74078171
Fixing SecretKey
SecretKey replaced
Fixing Title
Title Fixed
npm WARN deprecated electron-notarize@1.2.2: Please use @electron/notarize moving forward.  There is no API change, just a package name change

added 1 package, removed 371 packages, and audited 126 packages in 4s

31 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

removed 1 package, and audited 125 packages in 1s

31 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

added 4 packages, and audited 129 packages in 1s

31 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs

added 320 packages, and audited 449 packages in 24s

71 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
✔ Checking your system
✔ Locating importable project
✔ Processing configuration and dependencies
  ✔ Installing dependencies
  ✔ Copying base template Forge configuration
  ✔ Fixing .gitignore
✔ Finalizing import

› We have attempted to convert your app to be in a format that Electron Forge understands.
  Thanks for using Electron Forge!
Writing Forge Config...
In order to build the app we'll need to update the license field in package.json. Continue? (y/n): y
Updated license field in package.json
Build for x64? (y/n): y
Build for arm64? (y/n): n
✔ Checking your system
✔ Loading configuration
✔ Resolving make targets
  › Making for the following targets: , , 
✔ Running package command
  ✔ Preparing to package application
  ✔ Running packaging hooks
    ✔ Running generateAssets hook
    ✔ Running prePackage hook
  ✔ Packaging application
    ✔ Packaging for x64 on linux [16s]
  ✔ Running postPackage hook
✔ Running preMake hook
❯ Making distributables
  ✖ Making a zip distributable for linux/x64
  ✖ Making a deb distributable for linux/x64
  ✖ Making a rpm distributable for linux/x64
    › Please upgrade to RPM 4.13 or above, which supports boolean dependencies.
      This is used to express Electron dependencies for a wide variety of RPM-using distributions.
◼ Running postMake hook

An unhandled rejection has occurred inside Forge:
Error: Please upgrade to RPM 4.13 or above, which supports boolean dependencies.
This is used to express Electron dependencies for a wide variety of RPM-using distributions.
at Object.dependenciesForElectron [as forElectron] (/home/user/yandex-music-linux/app/node_modules/electron-installer-redhat/src/dependencies.js:74:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Promise.all (index 1)
    at async RedhatInstaller.generateDefaults (/home/user/yandex-music-linux/app/node_modules/electron-installer-redhat/src/installer.js:84:29)
    at async module.exports (/home/user/yandex-music-linux/app/node_modules/electron-installer-redhat/src/installer.js:166:3)
    at async MakerRpm.make (/home/user/yandex-music-linux/app/node_modules/@electron-forge/maker-rpm/dist/MakerRpm.js:44:34)
    at async /home/user/yandex-music-linux/app/node_modules/@electron-forge/core/dist/api/make.js:187:55
    at async Task.task (/home/user/yandex-music-linux/app/node_modules/@electron-forge/tracer/dist/index.js:58:20)
    at async Task.run (/home/user/yandex-music-linux/app/node_modules/listr2/dist/index.cjs:978:11)
    at async /home/user/yandex-music-linux/app/node_modules/p-map/index.js:57:22

[user@alt-p10-wks yandex-music-linux]$ rpm --version
RPM версия 4.13.0.1

Завернуть в rpm не смогло, но сам сделаю.. файлы доступны Вопрос - чего ему не хватило?

cucumber-sp commented 5 months ago

Выглядит странно, но думаю это нужно в Electron Forge адресовать. В арче я использую просто rpm build tools

x09 commented 5 months ago

Ну так или иначе, файлы есть, на их основе создал свой rpm для ОС Альт

p.s. но заметил, что когда GUI полностью закрываешь, процессы остаются висеть в фоне

ReLoneR1 commented 5 months ago

p.s. но заметил, что когда GUI полностью закрываешь, процессы остаются висеть в фоне

на федоре тоже самое, по моему начиная с 5.0.6 перестало полностью закрываться

x09 commented 5 months ago

p.s. но заметил, что когда GUI полностью закрываешь, процессы остаются висеть в фоне

на федоре тоже самое, по моему начиная с 5.0.6 перестало полностью закрываться

Судя по всему, они закрывают окно только для Windows, нашел в коде такое

 electron_1.app.on('window-all-closed', () => {
        if (node_os_1.default.platform() === platform_js_1.Platform.WINDOWS) {
            electron_1.app.quit();
        }

Но тупой патч не помог(

cucumber-sp commented 5 months ago

p.s. но заметил, что когда GUI полностью закрываешь, процессы остаются висеть в фоне

на федоре тоже самое, по моему начиная с 5.0.6 перестало полностью закрываться

Судя по всему, они закрывают окно только для Windows, нашел в коде такое

 electron_1.app.on('window-all-closed', () => {
        if (node_os_1.default.platform() === platform_js_1.Platform.WINDOWS) {
            electron_1.app.quit();
        }

Но тупой патч не помог(

исправил в https://github.com/cucumber-sp/yandex-music-linux/commit/9f68480abb20a46ca941f7899ca5f91c1dfc6a42