-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 397d2e9
Showing
17 changed files
with
1,296 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Compiled Object files, Static and Dynamic libs (Shared Objects) | ||
*.o | ||
*.a | ||
*.so | ||
|
||
# Folders | ||
_obj | ||
_test | ||
|
||
# Architecture specific extensions/prefixes | ||
*.[568vq] | ||
[568vq].out | ||
|
||
*.cgo1.go | ||
*.cgo2.c | ||
_cgo_defun.c | ||
_cgo_gotypes.go | ||
_cgo_export.* | ||
|
||
_testmain.go | ||
|
||
*.exe | ||
*.test | ||
*.prof |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# IceCon RCON client | ||
|
||
*IceCon* is a Q3-compatible RCON client. It can connect to any server that implements RCON over a Q3-compatible network protocol (UDP) and even comes with a nice, straight minimal GUI. | ||
|
||
Specifically, this tool has been written for quick administration of modified Modern Warfare 2 ("IW4M") servers. A Windows user could easily set up shortcuts on the desktop that run `icecon.exe -gui <server:port> <password>` which gives you an instant GUI to run commands on your server. Another use case would be scripting on a Linux server by running `icecon -command "<your command here>" <server:port> <password>` to automate specific tasks. | ||
|
||
## Download | ||
|
||
### Binaries | ||
|
||
Binaries will be provided as soon as possible, both stable and snapshots! | ||
|
||
### Source code | ||
|
||
You can download the source code from GitHub, either via Git (`git clone https://github.com/icedream/icecon.git`) or as a source code archive via the "Download ZIP"/"Download TAR.GZ" button at the top right of the [GitHub project page](https://github.com/icedream/icecon). | ||
|
||
## Compiling from source code | ||
|
||
In most cases, simply installing [Go 1.6 or newer](http://golang.org) and running `go build -i -v .` will give you a single binary that contains everything you need to run *IceCon*. | ||
|
||
If you need to regenerate the UI code files (`*_ui.go`) and/or the Windows resource data (`rsrc_windows.syso`), make sure to follow these steps: | ||
|
||
- Set up a `GOPATH` as environment variable that points to an existing folder. This folder will be used by Go to store compiled libraries and installed binaries which will be needed for the next step. | ||
- Ensure you have `$GOPATH/bin` (`%GOPATH%\bin` on Windows) included in your `PATH` environment variable. | ||
- Install needed tools and dependencies via `go get -v -u github.com/lxn/walk/tools/ui2walk github.com/josephspurrier/goversioninfo/cmd/goversioninfo`. | ||
- Run `go generate -v` in the *IceCon* source code folder. | ||
|
||
You should now be able to run a normal `go build` to get your desired binary. | ||
|
||
## License | ||
|
||
This project is licensed under the **GNU General Public License Version 2 or any later version**. For more info, see the [COPYING](COPYING) text file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
//+build windows | ||
//go:generate ui2walk connectdialog.ui | ||
|
||
package main | ||
|
||
import "github.com/lxn/walk" | ||
|
||
type connectDialog struct { | ||
*walk.Dialog | ||
ui connectDialogUI | ||
} | ||
|
||
func runConnectDialog(currentAddr string, currentPw string, owner walk.Form) (result bool, addr string, pw string, err error) { | ||
dlg := new(connectDialog) | ||
|
||
if err = dlg.init(owner); err != nil { | ||
return | ||
} | ||
|
||
if err = dlg.SetDefaultButton(dlg.ui.ok); err != nil { | ||
return | ||
} | ||
dlg.ui.ok.Clicked().Attach(func() { | ||
addr = dlg.ui.rconAddress.Text() | ||
pw = dlg.ui.rconPassword.Text() | ||
dlg.Accept() | ||
}) | ||
|
||
if err = dlg.SetCancelButton(dlg.ui.cancel); err != nil { | ||
return | ||
} | ||
dlg.ui.cancel.Clicked().Attach(func() { | ||
dlg.Cancel() | ||
}) | ||
|
||
dlg.ui.rconAddress.SetText(currentAddr) | ||
dlg.ui.rconPassword.SetText(currentPw) | ||
|
||
choice := dlg.Run() | ||
|
||
result = choice == walk.DlgCmdOK | ||
|
||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>connectDialog</class> | ||
<widget class="QDialog" name="connectDialog"> | ||
<property name="windowModality"> | ||
<enum>Qt::WindowModal</enum> | ||
</property> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>400</width> | ||
<height>90</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Connect to...</string> | ||
</property> | ||
<property name="modal"> | ||
<bool>true</bool> | ||
</property> | ||
<widget class="QLabel" name="label_2"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>10</x> | ||
<y>36</y> | ||
<width>50</width> | ||
<height>16</height> | ||
</rect> | ||
</property> | ||
<property name="text"> | ||
<string>Password:</string> | ||
</property> | ||
</widget> | ||
<widget class="QLineEdit" name="rconAddress"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>104</x> | ||
<y>10</y> | ||
<width>291</width> | ||
<height>20</height> | ||
</rect> | ||
</property> | ||
</widget> | ||
<widget class="QLineEdit" name="rconPassword"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>104</x> | ||
<y>36</y> | ||
<width>291</width> | ||
<height>20</height> | ||
</rect> | ||
</property> | ||
<property name="echoMode"> | ||
<enum>QLineEdit::Password</enum> | ||
</property> | ||
</widget> | ||
<widget class="QLabel" name="label"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>10</x> | ||
<y>10</y> | ||
<width>88</width> | ||
<height>16</height> | ||
</rect> | ||
</property> | ||
<property name="text"> | ||
<string>Address (IP:Port):</string> | ||
</property> | ||
</widget> | ||
<widget class="QPushButton" name="cancel"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>239</x> | ||
<y>60</y> | ||
<width>75</width> | ||
<height>23</height> | ||
</rect> | ||
</property> | ||
<property name="text"> | ||
<string>Cancel</string> | ||
</property> | ||
</widget> | ||
<widget class="QPushButton" name="ok"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>320</x> | ||
<y>60</y> | ||
<width>75</width> | ||
<height>23</height> | ||
</rect> | ||
</property> | ||
<property name="text"> | ||
<string>OK</string> | ||
</property> | ||
<property name="default"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
<zorder></zorder> | ||
<zorder>horizontalLayoutWidget</zorder> | ||
</widget> | ||
<resources/> | ||
<connections/> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
// This file was created by ui2walk and may be regenerated. | ||
// DO NOT EDIT OR YOUR MODIFICATIONS WILL BE LOST! | ||
|
||
package main | ||
|
||
import ( | ||
"github.com/lxn/walk" | ||
) | ||
|
||
type connectDialogUI struct { | ||
label_2 *walk.Label | ||
rconAddress *walk.LineEdit | ||
rconPassword *walk.LineEdit | ||
label *walk.Label | ||
cancel *walk.PushButton | ||
ok *walk.PushButton | ||
} | ||
|
||
func (w *connectDialog) init(owner walk.Form) (err error) { | ||
if w.Dialog, err = walk.NewDialog(owner); err != nil { | ||
return err | ||
} | ||
|
||
succeeded := false | ||
defer func() { | ||
if !succeeded { | ||
w.Dispose() | ||
} | ||
}() | ||
|
||
var font *walk.Font | ||
if font == nil { | ||
font = nil | ||
} | ||
|
||
w.SetName("connectDialog") | ||
if err := w.SetClientSize(walk.Size{400, 90}); err != nil { | ||
return err | ||
} | ||
if err := w.SetTitle(`Connect to...`); err != nil { | ||
return err | ||
} | ||
|
||
// label_2 | ||
if w.ui.label_2, err = walk.NewLabel(w); err != nil { | ||
return err | ||
} | ||
w.ui.label_2.SetName("label_2") | ||
if err := w.ui.label_2.SetBounds(walk.Rectangle{10, 36, 50, 16}); err != nil { | ||
return err | ||
} | ||
if err := w.ui.label_2.SetText(`Password:`); err != nil { | ||
return err | ||
} | ||
|
||
// rconAddress | ||
if w.ui.rconAddress, err = walk.NewLineEdit(w); err != nil { | ||
return err | ||
} | ||
w.ui.rconAddress.SetName("rconAddress") | ||
if err := w.ui.rconAddress.SetBounds(walk.Rectangle{104, 10, 291, 20}); err != nil { | ||
return err | ||
} | ||
|
||
// rconPassword | ||
if w.ui.rconPassword, err = walk.NewLineEdit(w); err != nil { | ||
return err | ||
} | ||
w.ui.rconPassword.SetName("rconPassword") | ||
if err := w.ui.rconPassword.SetBounds(walk.Rectangle{104, 36, 291, 20}); err != nil { | ||
return err | ||
} | ||
w.ui.rconPassword.SetPasswordMode(true) | ||
|
||
// label | ||
if w.ui.label, err = walk.NewLabel(w); err != nil { | ||
return err | ||
} | ||
w.ui.label.SetName("label") | ||
if err := w.ui.label.SetBounds(walk.Rectangle{10, 10, 88, 16}); err != nil { | ||
return err | ||
} | ||
if err := w.ui.label.SetText(`Address (IP:Port):`); err != nil { | ||
return err | ||
} | ||
|
||
// cancel | ||
if w.ui.cancel, err = walk.NewPushButton(w); err != nil { | ||
return err | ||
} | ||
w.ui.cancel.SetName("cancel") | ||
if err := w.ui.cancel.SetBounds(walk.Rectangle{239, 60, 75, 23}); err != nil { | ||
return err | ||
} | ||
if err := w.ui.cancel.SetText(`Cancel`); err != nil { | ||
return err | ||
} | ||
|
||
// ok | ||
if w.ui.ok, err = walk.NewPushButton(w); err != nil { | ||
return err | ||
} | ||
w.ui.ok.SetName("ok") | ||
if err := w.ui.ok.SetBounds(walk.Rectangle{320, 60, 75, 23}); err != nil { | ||
return err | ||
} | ||
if err := w.ui.ok.SetText(`OK`); err != nil { | ||
return err | ||
} | ||
|
||
// Tab order | ||
|
||
succeeded = true | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//+build windows | ||
//go:generate ui2walk dialog.ui | ||
|
||
package main | ||
|
||
import ( | ||
"github.com/lxn/walk" | ||
) | ||
|
||
type mainDialog struct { | ||
*walk.MainWindow | ||
ui mainDialogUI | ||
} |
Oops, something went wrong.