ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
20.99k stars 1.4k forks source link

installing a x32 .msi from local directory [Bug] #5812

Open Cri01IT opened 7 months ago

Cri01IT commented 7 months ago

Hi, i have an issue, i created my own bucket to install a program that isn't in others buckets. instead of downloading the package from an URL, i must install it from a directory on the machine (every pc i have has the same path of the directory with the "file.msi" that i must install), so i created a bucket, i created the "file.json", i added the bucket on scoop and then i tried to install it (with the command: scoop install file); but the output is:

" ERROR 'file' doesn't support current architecture!"

so i tried to open it in powershell x86 because the application is 32 bit, but the error message is the same. i tried to use command with "-a 32bit" but i receive the same error message. i tried to modify the "file.json" adding and removing fields like "architecture" specification and nothing changed

actually my json is like that: { "version": "2.2023", "extract_dir": "C:/example/directory/file.msi", "description": "software", "maintainer": "Name", "autoupdate": false }

is there some way to install my file.msi using scoop?

P.S. all names are examples to simplify my question; my program's real name isn't file.msi obviously

HUMORCE commented 1 week ago

You should extract msi file with a script.

extract_dir: See https://github.com/ScoopInstaller/Scoop/wiki/App-Manifests#optional-properties

Cri01IT commented 3 days ago

i tried different configuration of the manifest, but nothing seems to work. to test the issue i also tried to make another manifest that points a .exe file and tries to install it; the .exe file is on my pc, i linked correctly my bucket on scoop, i pushed the final versione of the manifest on the bucket and i've updated scoop the json is like that: { "version": "1.0.0", "description": "app", "homepage": "https://www.app.com", "license": "MIT", "architecture": { "64bit": { "installer": { "script": [ "Copy-Item 'C:\directory\app_installer.exe' \"$dir\Goose.Latest.exe\"", "Start-Process \"$dir\app_installer.exe\" -ArgumentList '/S' -NoNewWindow -Wait" ] } } }, "architecture": "64bit", "shortcuts": [ [ "C:\dir_after_installation\app.exe", "app" ] ] }

but after all of this the error is always "ERROR 'goose' doesn't support current architecture!", i tried to force installation with 32 and with 64 bit, i tried to modify the json in every way i know, but the message is always the same

HUMORCE commented 3 days ago

There are multiple errors in the manifest you provided, it should be:

{
    "version": "1.0.0",
    "description": "app",
    "homepage": "https://www.app.com",
    "license": "MIT",
    "url": "https://www.app.org/#/app.html",
    "architecture": {
        "64bit": {
            "installer": {
                "script": [
                    "Copy-Item <SOURCE> <TARGET>",
                    "<EXTRACTION>",
                    "# You can use Scoop's internal extraction functions:",
                    "# https://github.com/ScoopInstaller/Scoop/blob/master/lib/decompress.ps1",
                    "# e.g.:",
                    "Expand-7zipArchive ..."
                ]
            }
        }
    }
}

If you don't quite understand how Scoop extracts files, serve files via local web server. Then you just need to create your manifest by look and edit manifest of same type of installer in main/extras buckets.

e.g. caddy file-server --browse --root C:\directory\

    "version": "1.0.0",
    "description": "app",
    "homepage": "https://www.app.com",
    "license": "MIT",
    "url": "https://localhost/installer.msi",