From 3b238d76223ecbdff76e13cb292fdc416e0e0059 Mon Sep 17 00:00:00 2001 From: Craig Everett Date: Wed, 6 Jun 2018 10:01:30 +0900 Subject: [PATCH] Finally updating the readme... --- README.md | 71 +++++++------------------------------------------ install.escript | 18 +++++++++---- 2 files changed, 23 insertions(+), 66 deletions(-) diff --git a/README.md b/README.md index bb339c7..6fd1f15 100644 --- a/README.md +++ b/README.md @@ -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: -- `zomp.tar.gz`: An archive of a current working zx/zomp installation -- `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. +## Code +https://gitlab.com/zxq9/zx/ diff --git a/install.escript b/install.escript index 6793603..d15426f 100755 --- a/install.escript +++ b/install.escript @@ -53,13 +53,19 @@ add_launcher({win32, nt}, _ZompDir) -> add_unix_link(ZompDir) -> Home = filename:dirname(ZompDir), Link = filename:join(Home, "bin/zx"), + LinkH = filename:join(Home, "bin/zxh"), 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), LinkCommand = "env LANG=en ln -s " ++ Target ++ " " ++ Link, + LinkCommandH = "env LANG=en ln -s " ++ TargetH ++ " " ++ LinkH, ModeCommand = "env LANG=en chmod +x " ++ Target, + ModeCommandH = "env LANG=en chmod +x " ++ TargetH, ok = os_cmd(LinkCommand), + ok = os_cmd(LinkCommandH), ok = os_cmd(ModeCommand), + ok = os_cmd(ModeCommandH), Path = os:getenv("PATH"), Parts = string:lexemes(Path, ":"), Message = @@ -67,8 +73,9 @@ add_unix_link(ZompDir) -> true -> "A link to ~ts has been created at ~ts.~n" "~ts seems to be in $PATH already.~n" - "You should be able to run any zomp/zx program by typing `zx` " - "from anywhere in your system.~n" + "You should be able to run any Zomp/ZX program as a normal shell " + "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 " "conveinent.~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. " "~ts seems to be NOT in your $PATH. " "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 " "conveinent.~n" "A desktop launcher would need to run the command:~n" @@ -108,7 +116,7 @@ os_cmd(Command) -> zomp_dir({unix, _}) -> Home = os:getenv("HOME"), - filename:join(Home, "zomp"); + filename:join(Home, ".zomp"); zomp_dir({win32, _}) -> Path = os:getenv("LOCALAPPDATA"), filename:join(Path, "zomp");