@@ -29,6 +29,89 @@ codegame --help
2929- Create a new game server
3030 - not implemented
3131
32+ ## Installation
33+
34+ ### Windows
35+
36+ 1 . Open the Start menu
37+ 2 . Search for ` powershell `
38+ 3 . Hit ` Run as Administrator `
39+ 4 . Paste the following commands and hit enter:
40+
41+ #### Install
42+
43+ ``` powershell
44+ Invoke-WebRequest -Uri "https://github.com/code-game-project/codegame-cli/releases/latest/download/codegame-cli-windows-amd64.zip" -OutFile "C:\Program Files\codegame-cli.zip"
45+ Expand-Archive -LiteralPath "C:\Program Files\codegame-cli.zip" -DestinationPath "C:\Program Files\codegame-cli"
46+ rm "C:\Program Files\codegame-cli.zip"
47+ Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value "$((Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path);C:\Program Files\codegame-cli"
48+ ```
49+
50+ ** IMPORTANT:** Please reboot for the installation to take effect.
51+
52+ #### Update
53+
54+ ``` powershell
55+ rm -r -fo "C:\Program Files\codegame-cli"
56+ Invoke-WebRequest -Uri "https://github.com/code-game-project/codegame-cli/releases/latest/download/codegame-cli-windows-amd64.zip" -OutFile "C:\Program Files\codegame-cli.zip"
57+ Expand-Archive -LiteralPath "C:\Program Files\codegame-cli.zip" -DestinationPath "C:\Program Files\codegame-cli"
58+ rm "C:\Program Files\codegame-cli.zip"
59+ ```
60+
61+ ### macOS
62+
63+ Open the Terminal application, paste the command for your architecture and hit enter.
64+
65+ To update, simply run the command again.
66+
67+ #### x86_64
68+
69+ ``` sh
70+ curl -L https://github.com/code-game-project/codegame-cli/releases/latest/download/codegame-cli-darwin-amd64.tar.gz | tar -xz codegame && sudo mv codegame /usr/local/bin
71+ ```
72+
73+ #### ARM64
74+
75+ ``` sh
76+ curl -L https://github.com/code-game-project/codegame-cli/releases/latest/download/codegame-cli-darwin-arm64.tar.gz | tar -xz codegame && sudo mv codegame /usr/local/bin
77+ ```
78+
79+ ### Linux
80+
81+ Open a terminal, paste the command for your architecture and hit enter.
82+
83+ To update, simply run the command again.
84+
85+ #### x86_64
86+
87+ ``` sh
88+ curl -L https://github.com/code-game-project/codegame-cli/releases/latest/download/codegame-cli-linux-amd64.tar.gz | tar -xz codegame && sudo mv codegame /usr/local/bin
89+ ```
90+
91+ #### ARM64
92+
93+ ``` sh
94+ curl -L https://github.com/code-game-project/codegame-cli/releases/latest/download/codegame-cli-linux-arm64.tar.gz | tar -xz codegame && sudo mv codegame /usr/local/bin
95+ ```
96+
97+ ### Other
98+
99+ You can download a prebuilt binary file for your operating system on the [ releases] ( https://github.com/code-game-project/codegame-cli/releases ) page.
100+
101+ You might need to make the file executable before running it.
102+
103+ ### Compiling from source
104+
105+ #### Prerequisites
106+
107+ - [ Go] ( https://go.dev/ ) 1.18+
108+
109+ ``` sh
110+ git clone https://github.com/code-game-project/codegame-cli.git
111+ cd codegame-cli
112+ go build .
113+ ```
114+
32115## License
33116
34117Copyright (c) 2022 CodeGame Contributors (https://github.com/orgs/code-game-project/people )
0 commit comments