Compare commits
6 Commits
1.0
...
a9367763f3
Author | SHA1 | Date | |
---|---|---|---|
a9367763f3 | |||
7dd915b060 | |||
4e78277f99 | |||
ad97817e80 | |||
9a0606ce32 | |||
d4f841f8a0 |
20
README.md
20
README.md
@ -2,20 +2,16 @@
|
||||
|
||||
CLI tool for updating and launching [Project Epoch](https://www.project-epoch.net/) on Windows, Linux and macOS.
|
||||
|
||||
## Setup
|
||||
|
||||
### Windows
|
||||
|
||||
Download and extract the latest binary from the [releases](https://git.burkey.co/eburk/epochcli/releases) page or build from source yourself, then copy `epochcli.exe` to a location of your choice. To make it easy, just use the same folder as your Wow game files.
|
||||
## Installing
|
||||
|
||||
### Linux
|
||||
A `wine` prefix with `dxvk` installed is sufficient, or you can use something like Lutris or faugus-launcher and just use `epochcli` for updating.
|
||||
|
||||
Download and extract the latest binary from the [releases](https://git.burkey.co/eburk/epochcli/releases) page, build from source yourself, or use homebrew to install.
|
||||
Download and extract the latest binary from the [releases](https://git.burkey.co/eburk/epochcli/releases) page, build from source yourself, or use homebrew from the macOS instructions to install.
|
||||
|
||||
### macOS
|
||||
|
||||
For macOS, I've found the best way to run Wow is in a Parallels Win 11 VM. Kegworks, Codeweavers, etc crash when the game starts up and I have not found a good solution so far. Any suggestions would be welcome, see my contact information below.
|
||||
For macOS, I've found the best way to run Wow is in a Parallels Win 11 VM. Kegworks, Codeweavers, etc crash when the game starts up and I have not found a good solution so far. Any suggestions would be welcome, see my contact information below. I currently use a Parallels VM and run the Windows version of epochcli inside the VM as an updater and launcher.
|
||||
|
||||
You can easily install with homebrew or build from source yourself. I dont have time to setup codesigning right now so there are no binaries provided for macOS. For homebrew, do the following:
|
||||
|
||||
@ -27,10 +23,14 @@ brew install --HEAD epochcli
|
||||
brew upgrade epochcli --fetch-HEAD
|
||||
```
|
||||
|
||||
## First Run
|
||||
### Windows
|
||||
|
||||
Download and extract the latest binary from the [releases](https://git.burkey.co/eburk/epochcli/releases) page or build from source yourself, then copy `epochcli.exe` to a location of your choice. To make it easy, just use the same folder as your Wow game files.
|
||||
|
||||
## Setup
|
||||
|
||||
1. Run `epochcli`. You will be taken through a setup process that configures the program and creates a config file at `$HOME/.config/epochcli/config.toml`
|
||||
2. You can now use `epochcli` as just a standalone updater or also a launcher based on your configuration. You can always run `epochcli -c` to redo the configuration or edit the config file manually
|
||||
2. You can now use `epochcli` as a standalone updater, but it can also act as a launcher based on your configuration. You can always run `epochcli -c` to redo the configuration, or edit the config file manually
|
||||
|
||||
## Usage
|
||||
```
|
||||
@ -43,4 +43,4 @@ brew upgrade epochcli --fetch-HEAD
|
||||
|
||||
## Issues
|
||||
|
||||
If you have any issues, [email me](mailto:evan@burkey.co) or ping `Battlehammer` on the Epoch discord
|
||||
If you have any issues, [email me](mailto:epochcli@burkey.co) or send a private message to `Battlehammer` on the Epoch discord
|
88
config.go
88
config.go
@ -46,52 +46,37 @@ func setupConfig(rerun bool) (*Config, error) {
|
||||
}
|
||||
newConfig.WowDir = strings.TrimSpace(s)
|
||||
|
||||
for {
|
||||
fmt.Printf("Do you want to use epochcli to launch Wow? Select No if you plan on using a launcher tool like Lutris (y/n): ")
|
||||
_, err = fmt.Scanf("%s", &s)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to read input: %v", err)
|
||||
}
|
||||
s = strings.TrimSpace(s)
|
||||
p, err := promptYesNo(fmt.Sprintf("Do you want to use epochcli to launch Wow? Select No if you plan on using a launcher tool like Lutris (y/n): "))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if p {
|
||||
newConfig.EnableLauncher = true
|
||||
|
||||
if s == "y" || s == "Y" {
|
||||
newConfig.EnableLauncher = true
|
||||
if runtime.GOOS == "windows" {
|
||||
newConfig.LaunchCmd = path.Join(newConfig.WowDir, "Project-Epoch.exe")
|
||||
exePath, err := os.Executable()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to create desktop shortcut: %v", err)
|
||||
}
|
||||
err = makeLink(exePath, path.Join(home, "Desktop", "Project-Epoch.lnk"))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to create desktop shortcut: %v", err)
|
||||
}
|
||||
} else {
|
||||
fmt.Println("Enter your launch command to start Wow below. If you would rather configure this later in the configuration file, just press Enter")
|
||||
fmt.Printf("> ")
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
newConfig.LaunchCmd = path.Join(newConfig.WowDir, "Project-Epoch.exe")
|
||||
exePath, err := os.Executable()
|
||||
if err != nil {
|
||||
fmt.Println("unable to create desktop shortcut: ", err)
|
||||
break
|
||||
}
|
||||
err = makeLink(exePath, path.Join(home, "Desktop", "Project-Epoch.lnk"))
|
||||
if err != nil {
|
||||
fmt.Println("unable to create desktop shortcut: ", err)
|
||||
}
|
||||
break
|
||||
} else {
|
||||
fmt.Println("Enter your launch command to start Wow below. If you would rather configure this later in the configuration file, just press Enter")
|
||||
fmt.Printf("> ")
|
||||
_, err = fmt.Scanf("%s", &s)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to read input: %v", err)
|
||||
}
|
||||
s = strings.TrimSpace(s)
|
||||
|
||||
_, err = fmt.Scanf("%s", &s)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to read input: %v", err)
|
||||
}
|
||||
s = strings.TrimSpace(s)
|
||||
|
||||
if s != "" {
|
||||
newConfig.LaunchCmd = s
|
||||
}
|
||||
|
||||
break
|
||||
if s != "" {
|
||||
newConfig.LaunchCmd = s
|
||||
}
|
||||
}
|
||||
|
||||
if s == "n" || s == "N" {
|
||||
break
|
||||
}
|
||||
|
||||
fmt.Println("Please enter a valid value of either 'y' or 'n'")
|
||||
}
|
||||
|
||||
err = os.MkdirAll(filepath.Join(home, ".config", configDirName), 0755)
|
||||
@ -120,3 +105,24 @@ func setupConfig(rerun bool) (*Config, error) {
|
||||
|
||||
return &newConfig, nil
|
||||
}
|
||||
|
||||
func promptYesNo(prompt string) (bool, error) {
|
||||
var s string
|
||||
for {
|
||||
fmt.Print(prompt)
|
||||
_, err := fmt.Scanf("%s", &s)
|
||||
if err != nil {
|
||||
return false, fmt.Errorf("unable to read input: %v", err)
|
||||
}
|
||||
s := strings.TrimSpace(s)
|
||||
|
||||
if s == "y" || s == "Y" {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
if s == "n" || s == "N" {
|
||||
return false, nil
|
||||
}
|
||||
fmt.Println("Please enter a valid value of either 'y' or 'n'")
|
||||
}
|
||||
}
|
||||
|
26
release.sh
26
release.sh
@ -3,20 +3,20 @@
|
||||
set -e
|
||||
|
||||
rm -f ./*.tar.gz
|
||||
rm -rf bin
|
||||
rm -f ./*.zip
|
||||
|
||||
mkdir bin
|
||||
GOOS=linux GOARCH=amd64 go build -o epochcli
|
||||
tar czvf epochcli-linux-amd64.tar.gz epochcli
|
||||
rm ./epochcli
|
||||
|
||||
GOOS=linux GOARCH=amd64 go build -o bin/epochcli-linux-amd64
|
||||
tar czvf epochcli-linux-amd64.tar.gz bin/epochcli-linux-amd64
|
||||
GOOS=linux GOARCH=arm64 go build -o epochcli
|
||||
tar czvf epochcli-linux-arm64.tar.gz epochcli
|
||||
rm ./epochcli
|
||||
|
||||
GOOS=linux GOARCH=arm64 go build -o bin/epochcli-linux-arm64
|
||||
tar czvf epochcli-linux-arm64.tar.gz bin/epochcli-linux-arm64
|
||||
GOOS=windows GOARCH=amd64 go build -o epochcli.exe
|
||||
zip -j epochcli-windows-amd64.zip epochcli.exe
|
||||
rm ./epochcli.exe
|
||||
|
||||
GOOS=windows GOARCH=amd64 go build -o bin/epochcli-windows-amd64
|
||||
zip epochcli-windows-amd64.zip bin/epochcli-windows-amd64
|
||||
|
||||
GOOS=windows GOARCH=arm64 go build -o bin/epochcli-windows-arm64
|
||||
zip epochcli-windows-arm64.zip bin/epochcli-windows-arm64
|
||||
|
||||
rm -rf bin
|
||||
GOOS=windows GOARCH=arm64 go build -o epochcli.exe
|
||||
zip -j epochcli-windows-arm64.zip epochcli.exe
|
||||
rm ./epochcli.exe
|
||||
|
Reference in New Issue
Block a user