Skip to content

Commit

Permalink
Add instructions for system installs (which we automatically pick up)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanko committed Oct 3, 2023
1 parent d48bfd1 commit ba5ce94
Show file tree
Hide file tree
Showing 4 changed files with 227 additions and 13 deletions.
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Revision history for Perl extension Alien::xmake

{{$NEXT}}

- Minor documentation changes

0.01 2023-10-02T22:07:51Z

- It exists.
2 changes: 1 addition & 1 deletion META.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"web" : "https://github.com/sanko/Alien-xmake"
}
},
"version" : "0.01",
"version" : "0.02",
"x_authority" : "cpan:SANKO",
"x_serialization_backend" : "JSON::PP version 4.16",
"x_static_install" : 0
Expand Down
125 changes: 120 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ system Alien::xmake->exe, 'create -t qt.widgetapp test';
# DESCRIPTION

xmake is a lightweight, cross-platform build utility based on Lua. It uses a
Lua script to maintain project builds, but is driven by a dependency free core
Lua script to maintain project builds, but is driven by a dependency-free core
program written in C. Compared with Makefiles or CMake, the configuration
syntax is much concise and intuitive. As such, it's friendly to novices while
still maintaining the flexibly required in a build system. With xmake, you can
focus on your project instead of the build.
syntax is (in the opinion of the author) much more concise and intuitive. As
such, it's friendly to novices while still maintaining the flexibly required in
a build system. With xmake, you can focus on your project instead of the build.

xmake can be used to directly build source code (like with Make or Ninja), or
it can generate project source files like CMake or Meson. It also has a
Expand Down Expand Up @@ -100,7 +100,122 @@ See `xmake create --help` for a full list.
# Prerequisites

Windows simply downloads an installer but elsewhere, you gotta have git, make,
and a C compiler installed to build and install xmake.
and a C compiler installed to build and install xmake. If you'd like
Alien::xmake to use a pre-built or system install of xmake, install it yourself
first with one of the following:

- Built from source

```
$ curl -fsSL https://xmake.io/shget.text | bash
```

...or on Windows with Powershell...

```
> Invoke-Expression (Invoke-Webrequest 'https://xmake.io/psget.text' -UseBasicParsing).Content
```

...or if you want to do it all by hand, try...

```perl
$ git clone --recursive https://github.com/xmake-io/xmake.git
# xmake maintains dependencies via git submodule so --recursive is required
$ cd ./xmake
# On macOS, you may need to run: export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
$ ./configure
$ make
$ ./scripts/get.sh __local__ __install_only__
$ source ~/.xmake/profile
```
...or building from source on Windows...
```
> git clone --recursive https://github.com/xmake-io/xmake.git
> cd ./xmake/core
> xmake
```

- Windows

The easiest way might be to use the installer but you still have options.

- Installer

Download a 32- or 64-bit installer from
https://github.com/xmake-io/xmake/releases and run it.

- Via scoop

```
$ scoop install xmake
```

See https://scoop.sh/

- Via the Windows Package Manager

```
$ winget install xmake
```

See https://learn.microsoft.com/en-us/windows/package-manager/

- Msys/Mingw

```
$ pacman -Sy mingw-w64-x86_64-xmake # 64-bit

$ pacman -Sy mingw-w64-i686-xmake # 32-bit
```

- MacOS with Homebrew

```
$ brew install xmake
```

See https://brew.sh/

- Arch

```
# sudo pacman -Sy xmake
```

- Debian

```
# sudo add-apt-repository ppa:xmake-io/xmake
# sudo apt update
# sudo apt install xmake
```

- Fedora/RHEL/OpenSUSE/CentOS

```
# sudo dnf copr enable waruqi/xmake
# sudo dnf install xmake
```

- Gentoo

```
# sudo emerge -a --autounmask dev-util/xmake
```

You'll need to add GURU to your system repository first.
- FreeBSD
Build from source using gmake instead of make.
- Android (Termux)
```
$ pkg install xmake
```
# See Also
Expand Down
111 changes: 104 additions & 7 deletions lib/Alien/xmake.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package Alien::xmake 0.01 {
package Alien::xmake 0.02 {
use strict;
use warnings;
use File::Which qw[which];
Expand Down Expand Up @@ -90,11 +90,11 @@ Alien::xmake - Locate, Download, or Build and Install xmake
=head1 DESCRIPTION
xmake is a lightweight, cross-platform build utility based on Lua. It uses a
Lua script to maintain project builds, but is driven by a dependency free core
Lua script to maintain project builds, but is driven by a dependency-free core
program written in C. Compared with Makefiles or CMake, the configuration
syntax is much concise and intuitive. As such, it's friendly to novices while
still maintaining the flexibly required in a build system. With xmake, you can
focus on your project instead of the build.
syntax is (in the opinion of the author) much more concise and intuitive. As
such, it's friendly to novices while still maintaining the flexibly required in
a build system. With xmake, you can focus on your project instead of the build.
xmake can be used to directly build source code (like with Make or Ninja), or
it can generate project source files like CMake or Meson. It also has a
Expand Down Expand Up @@ -166,7 +166,104 @@ See C<xmake create --help> for a full list.
=head1 Prerequisites
Windows simply downloads an installer but elsewhere, you gotta have git, make,
and a C compiler installed to build and install xmake.
and a C compiler installed to build and install xmake. If you'd like
Alien::xmake to use a pre-built or system install of xmake, install it yourself
first with one of the following:
=over
=item Built from source
$ curl -fsSL https://xmake.io/shget.text | bash
...or on Windows with Powershell...
> Invoke-Expression (Invoke-Webrequest 'https://xmake.io/psget.text' -UseBasicParsing).Content
...or if you want to do it all by hand, try...
$ git clone --recursive https://github.com/xmake-io/xmake.git
# xmake maintains dependencies via git submodule so --recursive is required
$ cd ./xmake
# On macOS, you may need to run: export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
$ ./configure
$ make
$ ./scripts/get.sh __local__ __install_only__
$ source ~/.xmake/profile
...or building from source on Windows...
> git clone --recursive https://github.com/xmake-io/xmake.git
> cd ./xmake/core
> xmake
=item Windows
The easiest way might be to use the installer but you still have options.
=over
=item Installer
Download a 32- or 64-bit installer from
https://github.com/xmake-io/xmake/releases and run it.
=item Via scoop
$ scoop install xmake
See https://scoop.sh/
=item Via the Windows Package Manager
$ winget install xmake
See https://learn.microsoft.com/en-us/windows/package-manager/
=item Msys/Mingw
$ pacman -Sy mingw-w64-x86_64-xmake # 64-bit
$ pacman -Sy mingw-w64-i686-xmake # 32-bit
=back
=item MacOS with Homebrew
$ brew install xmake
See https://brew.sh/
=item Arch
# sudo pacman -Sy xmake
=item Debian
# sudo add-apt-repository ppa:xmake-io/xmake
# sudo apt update
# sudo apt install xmake
=item Fedora/RHEL/OpenSUSE/CentOS
# sudo dnf copr enable waruqi/xmake
# sudo dnf install xmake
=item Gentoo
# sudo emerge -a --autounmask dev-util/xmake
You'll need to add GURU to your system repository first.
=item FreeBSD
Build from source using gmake instead of make.
=item Android (Termux)
$ pkg install xmake
=back
=head1 See Also
Expand All @@ -184,6 +281,6 @@ conditions may apply to data transmitted through this module.
Sanko Robinson E<lt>sanko@cpan.orgE<gt>
=for stopwords xmake macOS wxWidgets CMake gotta
=for stopwords xmake macOS wxWidgets CMake gotta FreeBSD MacOS
=cut

0 comments on commit ba5ce94

Please sign in to comment.