Skip to content

Commit

Permalink
Create Windows compile script
Browse files Browse the repository at this point in the history
  • Loading branch information
corbindavenport committed Sep 4, 2021
1 parent 8ea5656 commit 51d4d93
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Nexus Tools is an installer for the [Android SDK Platform Tools](https://developer.android.com/studio/releases/platform-tools) package, which includes [ADB](https://developer.android.com/studio/command-line/adb.html), Fastboot, and other applications. Nexus Tools is writen in Dart, and can run on Linux, macOS, Windows, Windows Subsystem for Linux, and Chrome OS.

Nexus Tools downloads the latest Platform tools package directly from Google's servers (so you're always getting the latest version), saves them to `~/.nexustools`, and adds the directory to your system's path. On Windows, Nexus Tools can optionally install [Koush's Universal ADB Driver](https://github.com/koush/UniversalAdbDriver).
Nexus Tools downloads the latest Platform tools package directly from Google's servers (so you're always getting the latest version), saves them to `~/.nexustools` (`$Home\NexusTools` on Windows), and adds the directory to your system's path. On Windows, Nexus Tools can optionally install [Koush's Universal ADB Driver](https://github.com/koush/UniversalAdbDriver).

Once Nexus Tools is finished, you can run `adb`, `fastboot`, and other commands straight from the terminal. **You need to open a new terminal/command line window for changes to take effect.** To update, just run Nexus Tools again.
Once Nexus Tools is finished, you can run `adb`, `fastboot`, and other commands with no problems. **You need to open a new terminal/command line window after installation for changes to take effect.** The SDK Platform Tools can be updated by running `nexustools -i`, or you can uninstall everything by running `nexustools -r`.

### How to use on Linux, macOS, and Chrome OS

Expand All @@ -14,19 +14,17 @@ Paste this command into the Terminal app:
bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.sh)
```

To uninstall, run this command:

```
bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/uninstall.sh)
```

You can also download the Mac and Linux versions from the [latest release page](https://github.com/corbindavenport/nexus-tools/releases/), un-zip the file, and run it from the Terminal.

### How to use on Windows

Download the Windows application from the [latest release page](https://github.com/corbindavenport/nexus-tools/releases/), and un-zip the file somewhere. Then run the executable in CMD.EXE or PowerShell.
Open Windows PowerShell from the Start Menu and paste this command:

```
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/corbindavenport/nexus-tools/main/install.ps1'))
```

Once Nexus Tools is finished, you can run `adb`, `fastboot`, and other commands straight from the terminal. **You may need to open a new terminal window for changes to take effect.** To update, just run the installer again.
You can also download the Windows version from the [latest release page](https://github.com/corbindavenport/nexus-tools/releases/), un-zip the file, and run it from Windows PowerShell or the Command Prompt.

### Compatibility

Expand Down
13 changes: 13 additions & 0 deletions compile.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
$FileName = "nexustools-windows-x64"

# Make the new directory
$dirCheck = Test-Path dist
if ($dirCheck) {
# Do nothing
} else {
New-Item -Name "dist" -ItemType Directory
}

dart compile exe "./bin/main.dart" -o "./dist/nexustools.exe"
Compress-Archive -Path "./dist/nexustools.exe" -DestinationPath "./dist/$FileName.zip"
del "./dist/nexustools.exe"

0 comments on commit 51d4d93

Please sign in to comment.