Anduin Xue
Anduin Xue

Anduin's Tech Blog

Store


应用商店、包管理……每天都会使用的东西有什么开发难度?

现代软件开发中,应用商店和包管理是我们每天都会使用的东西。然而,这背后隐藏着许多开发难题。安装一个包可能涉及到多个依赖关系,而这些依赖关系构成了一个有向无环图。基本需求包括避免重复安装相同的依赖、包与包之间的隔离、升级和降级的允许性、查询包的来源和版本等。全局包管理器如APT、yum和pacman可以解决这些问题,但是无法解决依赖冲突和破坏性的升级降级问题。分治思想将大问题拆分成小问题,例如将应用拆分成微服务,但是会带来包的重复安装和磁盘空间占用的问题。Nix是一个函数式的包管理器,通过不可变性和平坦的包存储解决了依赖冲突和包的隔离问题。Nuget则采用动态链接的方式解决依赖冲突。其他包管理工具如winget、snap和flatpak也有各自的解决方案。然而,包管理实际上没有万能解决方案,目前主流的做法是结合Monolithic的包管理、Docker和虚拟机来解决依赖冲突问题。虽然应用商店给我们带来了便利,但是背后的复杂性是巨大的。当我们开始自己分发软件时,才会意识到这个世界并不是那么简单。--GPT 4

Store nuget apt package manager Application Nix

Install Windows store app with WinGet

This blog post demonstrates how to install a Microsoft Store app using WinGet, a Windows package manager. The process begins by obtaining the Store App ID from the Microsoft official website. Once the App ID is acquired, you can use a command to open the store page or create a PowerShell script to launch the store automatically. To install the app without a prompt, first, install WinGet using a provided script, and then run another command with the store app ID. For developers building automation, this blog post also provides a script to check if the app is already installed using the exact WinGet app name. If it's not installed, the script attempts to download and install the app. A function called Install-StoreApp is provided, making it even easier to install Microsoft Store apps with WinGet. Examples of using this function with various app IDs and WinGet app names are also included. How can you adapt these scripts for your own automation needs? And what other applications can be...--GPT 4

PowerShell Windows Winget Microsoft Store UWP Store

  • 1