Что нового

Прикрепление обновлений к уже имеющемуся лаунчеру

mazix

Новичок
Сообщения
7
Репутация
0
Версия AutoIt: 3.

Описание:

В общем, хочется сделать лаунчер с авто-обновлением.

Вот код лаунчера:
Код:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <inet.au3>
#include <guibutton.au3>
#include <guitoolbar.au3>
#include <GUIConstantsEX.au3>

$Form1 = GUICreate("The Stomping Land", 637, 395, 210, 217)
$Label1 = GUICtrlCreateLabel("The Stomping Land", 85, 24, 449, 65)
GUICtrlSetFont(-1, 40, 800, 0, "Times New Roman")
$Button1 = GUICtrlCreateButton("Запустить игру", 144, 184, 329, 65)
GUICtrlSetFont(-1, 14, 400, 0, "Times New Roman")
GUICtrlSetCursor (-1, 0)
$Button2 = GUICtrlCreateButton("Создать сервер", 143, 263, 329, 65)
GUICtrlSetFont(-1, 14, 400, 0, "Times New Roman")
GUICtrlSetTip(-1, "Port 7777")
GUICtrlSetCursor (-1, 0)
$Input1 = GUICtrlCreateInput("Введите IP сервера", 156, 143, 169, 29)
GUICtrlSetFont(-1, 14, 400, 0, "Times New Roman")
GUICtrlSetCursor (-1, 4)
$Input2 = GUICtrlCreateInput("7777", 353, 143, 97, 29)
GUICtrlSetFont(-1, 14, 400, 0, "Times New Roman")
GUICtrlSetTip(-1, "Порт подключения")
GUICtrlSetCursor (-1, 4)
$Label2 = GUICtrlCreateLabel(":", 333, 135, 12, 40, $SS_CENTER)
GUICtrlSetFont(-1, 23, 800, 0, "Tahoma")
GUICtrlSetColor(-1, 0x000000)
$Label3 = GUICtrlCreateLabel("Создатель лаунчера MAZIX", 0, 0, 163, 19)
GUICtrlSetFont(-1, 10, 400, 0, "Times New Roman")
$Label4 = GUICtrlCreateLabel("vk.comthestompinglandfan", 476, 0, 153, 19)
GUICtrlSetFont(-1, 10, 400, 0, "Times New Roman")
$Input4 = GUICtrlCreateInput("Ваш ник в игре", 213, 102, 185, 29, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
GUICtrlSetFont(-1, 14, 400, 0, "Times New Roman")
GUICtrlSetCursor (-1, 5)
$Progress1 = GUICtrlCreateProgress(0, 352, 633, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            $IP = GUICtrlRead($Input1)
            $Port = GUICtrlRead($Input2)
            $Nick = GUICtrlRead($Input4)
            IniWrite("Binaries/Win32/lumaemu.ini", "Steam2Wrapper", "GameExe", "UDK.exe " & $IP & ":" & $Port)
            IniWrite("Binaries/Win32/lumaemu.ini", "Player", "PlayerName", $Nick)
            ShellExecute("Steam2WrapperLauncher.exe","","Binaries\Win32")
         Case $Button2
            ShellExecute("Creator_MAZIX.exe","","Binaries\Win32")
    EndSwitch
WEnd


Нужно допилить проверку файлов и обновление, в случае, если файлы не прошли проверку.

Примечания: Если возможно, то реализовать это через торрент (P2P).
 
Верх