Merge branch 'dev' into 'master'

Finally updating the readme...

See merge request zxq9/zx!10
This commit is contained in:
Craig Everett 2018-06-06 01:04:25 +00:00
commit 18d9b173f8
2 changed files with 23 additions and 66 deletions

View File

@ -1,64 +1,13 @@
ZX: The Zomp client. # ZX: The Zomp client
TLDR: If you have ZX on your system, "zx run [program name]" will launch any Erlang-based program that exists in the Zomp system.
"zx create project [foo]" will start a project for you.
Read the [docs](http://zxq9.com/projects/zomp/) for more.
Project information can be found at https://zxq9com/zx/ and https://github.com/zxq9/zx/ Zomp is a from-source code repository and distributed distribution system.
ZX is a front-end for that system that incorporates developer tools with end-user launching functionality.
## Docs
http://zxq9.com/projects/zomp/
ZX is delivered as a zip file containing: ## Code
- `zomp.tar.gz`: An archive of a current working zx/zomp installation https://gitlab.com/zxq9/zx/
- `install.escript`: The main installation script
- `install_unix` and `install_windows.cmd`: System-specific installation starters
- `README.*` files such as this one
- `LICENSE`
- `notify.vbs`: A hacky VBS script to communicate with the Windows GUI during setup
Installation
To install ZX the `install.escript` program needs to run. In order to run it requires
an Erlang environment to be envoked via the Escript interpreter. The system-specific
installation starter scripts exist to locate the Erlang installation on the local
system.
The installer will unpack the ZX client and the relevant parts of Zomp (the package
system underlying everything) to a directory in your home directory called "zomp".
Once everything is unpacked it will add a link called `zx` to your command environment
so that you can invoke zx the normal way.
For further information about installation, consult the relevant README file in this
directory.
Features
ZX has a number of features, most of them useful to developers and testers, but the
most important feature is for users of programs. To run any program from a configured
Zomp realm you run the command:
`zx run [program_name]`
If the version number of the program is omitted (the typical case) then the latest
version will always be installed and run. If a version number is provided then that
specific version will be installed and run.
ZX updates itself in the same manner it updates other installed programs. Occasionally
you may receive a message indicating that you should re-run ZX because a newer version
has been installed.
At the moment ZX only works from the command line, though desktop links to launchers
for GUI programs can be easily created.
To create a desktop launcher for a program the launcher must invoke zx the same way
you do from the command line:
`zx run [program_name]`
In the event you need to write an installer for a system you have released through a
Zomp repository all the installer needs to do is provide an icon set and create a
launcher for the program that invokes zx the same way you would from the command line.
The default Zomp realm is called "otpr". It is installed automatically and contains
only FOSS software.
ZX supports fetching and resolution of multiple realms at the same time, similar to
how Linux distribution package managers usually permit configuration of multiple
repository sources. To create and host your own, possibly private or proprietary, Zomp
realm consult the Zomp documentation directly.

View File

@ -53,13 +53,19 @@ add_launcher({win32, nt}, _ZompDir) ->
add_unix_link(ZompDir) -> add_unix_link(ZompDir) ->
Home = filename:dirname(ZompDir), Home = filename:dirname(ZompDir),
Link = filename:join(Home, "bin/zx"), Link = filename:join(Home, "bin/zx"),
LinkH = filename:join(Home, "bin/zxh"),
HomeBin = filename:dirname(Link), HomeBin = filename:dirname(Link),
Target = filename:join(ZompDir, "zx.sh"), Target = filename:join(ZompDir, "zx"),
TargetH = filename:join(ZompDir, "zxh"),
ok = filelib:ensure_dir(Link), ok = filelib:ensure_dir(Link),
LinkCommand = "env LANG=en ln -s " ++ Target ++ " " ++ Link, LinkCommand = "env LANG=en ln -s " ++ Target ++ " " ++ Link,
LinkCommandH = "env LANG=en ln -s " ++ TargetH ++ " " ++ LinkH,
ModeCommand = "env LANG=en chmod +x " ++ Target, ModeCommand = "env LANG=en chmod +x " ++ Target,
ModeCommandH = "env LANG=en chmod +x " ++ TargetH,
ok = os_cmd(LinkCommand), ok = os_cmd(LinkCommand),
ok = os_cmd(LinkCommandH),
ok = os_cmd(ModeCommand), ok = os_cmd(ModeCommand),
ok = os_cmd(ModeCommandH),
Path = os:getenv("PATH"), Path = os:getenv("PATH"),
Parts = string:lexemes(Path, ":"), Parts = string:lexemes(Path, ":"),
Message = Message =
@ -67,8 +73,9 @@ add_unix_link(ZompDir) ->
true -> true ->
"A link to ~ts has been created at ~ts.~n" "A link to ~ts has been created at ~ts.~n"
"~ts seems to be in $PATH already.~n" "~ts seems to be in $PATH already.~n"
"You should be able to run any zomp/zx program by typing `zx` " "You should be able to run any Zomp/ZX program as a normal shell "
"from anywhere in your system.~n" "command by typing `zx`, or with an Erlang shell attached by "
"typing `zxh` from anywhere in your system.~n"
"Creating launchers to the link that start specific programs may be " "Creating launchers to the link that start specific programs may be "
"conveinent.~n" "conveinent.~n"
"A desktop launcher would need to run the command:~n" "A desktop launcher would need to run the command:~n"
@ -79,7 +86,8 @@ add_unix_link(ZompDir) ->
"A link to ~ts has been created at ~ts. " "A link to ~ts has been created at ~ts. "
"~ts seems to be NOT in your $PATH. " "~ts seems to be NOT in your $PATH. "
"You will need to add that to $PATH if you want to be able to run " "You will need to add that to $PATH if you want to be able to run "
"zx by simply typing `zx` from anywhere in your system." "zx by simply typing `zx` (or zxh to attach an Erlang shell) from "
"anywhere in your system.~n"
"Creating launchers to the link that start specific programs may be " "Creating launchers to the link that start specific programs may be "
"conveinent.~n" "conveinent.~n"
"A desktop launcher would need to run the command:~n" "A desktop launcher would need to run the command:~n"
@ -108,7 +116,7 @@ os_cmd(Command) ->
zomp_dir({unix, _}) -> zomp_dir({unix, _}) ->
Home = os:getenv("HOME"), Home = os:getenv("HOME"),
filename:join(Home, "zomp"); filename:join(Home, ".zomp");
zomp_dir({win32, _}) -> zomp_dir({win32, _}) ->
Path = os:getenv("LOCALAPPDATA"), Path = os:getenv("LOCALAPPDATA"),
filename:join(Path, "zomp"); filename:join(Path, "zomp");