Description
A package manager or package management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer's operating system in a consistent manner.
A package manager deals with packages, distributions of software and data in archive files. Packages contain metadata, such as the software's name, description of its purpose, version number, vendor, checksum, and a list of dependencies necessary for the software to run properly. Upon installation, metadata is stored in a local package database. Package managers typically maintain a database of software dependencies and version information to prevent software mismatches and missing prerequisites. They work closely with software repositories, binary repository managers, and app stores.
Source: package manager
Remote package management roadmap:
- detect tools and environment and wrap them
- git
- curl
- wget
- unzip/tar/7z/gzip
- ping (test speed)
Extractor wrapper- tar
- unzip
- gzip
- 7z
Cache managementsemver- parse
- satisfies
- select
Multi language- asm/c/c++
- objc/c++
- swift
- rust
- dlang
Multi platform- linux
- macOS
- windows
- git
- downloader (http[s], ftp ..)
- extractor (zip, tar.gz, 7z .. )
Command line tools- require task
- install
- parse require info
- parse and load packages from repositories
- download package
- optimization: select the fastest url if exists multiple urls
- extract package
- build package
- xmake.lua
- linux/macos
- windows
- makefile
- linux/macos
- windows
- configure/make
- linux/macos
- cmakelists.txt
- linux/macos
- windows (in progress ..)
- *.vcproj
- windows
- install package
- install basic dependent tools (git, curl, unzip ...)
- search
- clear
- remove
- list
- repo task
- add repository
- remove repository
- list all repositories
- clear all repositories and cache
- global or local repositories
xmake lua apiadd_requires
: add package require infoadd_repositories
: add repository urladd_packages
: add package dependencies to targetpackage
: package definitionset_urls
add_versions
set_homepage
set_description
add_deps
[on|before|after]_load
: custom load script[on|before|after]_install
: custom install script[on|before|after]_test
: custom test scriptadd_patches
add_links
add_defines
add_includedirs
Activity
uael commentedon Apr 10, 2017
References :
There is many other but they are good one
waruqi commentedon Apr 10, 2017
Great! I have finished the
xmake repo
plugin task to manage repositories.for example:
Or use global
add_repositories
api in xmake.lua:And the
xmake-repo
is the default repository, we need not add it manually.waruqi commentedon Apr 10, 2017
And we can add requires and add package dependencies (developing ..)
Add requires:
Add package dependencies:
If you run
xmake require
orxmake require --install
, xmake will install and update all required packages to local project repository directory.uael commentedon Apr 10, 2017
It's all great 👍
Actually this repo implementation is really nice and consistent. Even if I'm afraid about the future size of the
xmake-repo
.A remaining task will be to automate packaging and publication on user repos.
I'm looking for semantic versioner, this is the yarn/npm one, and lua implementations.
uael commentedon Apr 10, 2017
How did you plan to handle that case?
ghost commentedon Apr 10, 2017
Excuse me, I'm wondering what's the advantage of
xmake repo
thatgit submodule
doesn't have.waruqi commentedon Apr 11, 2017
@uael I just place xmake.lua and other some text files (.e.g *.patch) in
xmake-repo
and I did not intend to place the binary file in this repository.And you can create yourself private repository to place some packages and binary files for each archs and platforms.So it will not be too large.
add_requires("https://github.com/tboox/tbox.git@tboox.tbox >=1.5.1")
add_requires
can process it directly If this project has complete tags like 1.2.1 or v1.x.x and it will define a package namedtboox.tbox
. We can useadd_packages("tboox.tbox")
to add package denpence to target.If this git project has not tags, we can set a branch name, for example:
add_requires("https://github.com/tboox/tbox.git@tboox.tbox master")
Or you can directly define
package("tboox.tbox")
to describe custem rules inxmake.lua
if cannot get git tags, for example:We also use
package("xxx")
to describe every package inxmake-repo
or other private repositories.waruqi commentedon Apr 11, 2017
@titansnow
git submodule
is great, butxmake repo
andxmake require
will provide more convenient cross-platform package management.Some advantages:
.tar.gz
or.zip
package if the dependent package does not have a git repo, butgit submodule
need it.In most cases, you only need to add two lines in
xmake.lua
to link dependent package automatically which exists inxmake-repo
.Then run:
And it will show tips when the version of package dependences have been changed in
xmake.lua
waruqi commentedon Apr 11, 2017
@uael
semver.lua
is great 👍. I will consider using it.ghost commentedon Apr 11, 2017
Sounds like fun. Like it:heart:. May it be hard work?
uael commentedon Apr 11, 2017
@titansnow actually the following isn't possible with git submodule:
foo
depends onbar
;foo
depends onbaz
;bar
depends onbaz
;then with package management the
foo
vendor dir look like:uael commentedon Apr 11, 2017
In the case of provided binary files i just dunno how to handle it properly, wondering what's your feeling about it
93 remaining items