mirror of
https://github.com/red-prig/fpPS4.git
synced 2024-11-23 06:19:57 +00:00
third_party_gui
This commit is contained in:
parent
99fd87dad8
commit
00aa7fb6ef
75
third_party_gui/GUI/main.py
Normal file
75
third_party_gui/GUI/main.py
Normal file
@ -0,0 +1,75 @@
|
||||
import tkinter
|
||||
import tkinter.messagebox
|
||||
import tkinter.filedialog
|
||||
import os
|
||||
import os.path
|
||||
|
||||
fpps4 = ""
|
||||
game = ""
|
||||
#create open fpps4 dialog
|
||||
def open_fpps4():
|
||||
global fpps4
|
||||
file_path = tkinter.filedialog.askopenfilename(title="Select the fpps4.exe", filetypes=[("Applications", "*.exe")])
|
||||
if file_path:
|
||||
fpps4_path_label['text'] = file_path
|
||||
fpps4 = file_path
|
||||
else:
|
||||
fpps4_path_label['text'] = "No file selected"
|
||||
#create open game dialog
|
||||
def open_game():
|
||||
global game
|
||||
file_path = tkinter.filedialog.askdirectory(title="Select the games Folder")
|
||||
if file_path:
|
||||
game_path_label['text'] = file_path
|
||||
game = file_path
|
||||
else:
|
||||
game_path_label['text'] = "No file selected"
|
||||
#autodetect
|
||||
def autodetect():
|
||||
global fpps4
|
||||
for dirpath, dirnames, filenames in os.walk("../../"):
|
||||
for filename in [f for f in filenames if f.endswith(".exe")]:
|
||||
if filename == "fpPS4.exe":
|
||||
fpps4 = os.path.abspath(os.path.join(dirpath, filename))
|
||||
fpps4_path_label['text'] = fpps4
|
||||
tkinter.messagebox.showinfo(title="Found fpPS4!", message=fpps4)
|
||||
#rungame
|
||||
def rungame():
|
||||
global fpps4
|
||||
global game
|
||||
if fpps4 == "":
|
||||
autodetect()
|
||||
if game == "":
|
||||
open_game()
|
||||
if game != "" and fpps4 != "":
|
||||
print(fpps4 + " -e " + game + "/eboot.bin")
|
||||
os.system(fpps4 + " -e " + game + "/eboot.bin")
|
||||
else:
|
||||
tkinter.messagebox.showinfo(title="Error!", message="Please select a game and the fpPS4 folder!")
|
||||
|
||||
#create main window
|
||||
root = tkinter.Tk()
|
||||
root.title("fpPS4 GUI")
|
||||
#open game button
|
||||
open_game_button = tkinter.Button(root, text="Open game folder", command=open_game)
|
||||
open_game_button.grid(row=0, column=0)
|
||||
#open fpps4 button
|
||||
open_fpps4_button = tkinter.Button(root, text="Open fpps4 file", command=open_fpps4)
|
||||
open_fpps4_button.grid(row=0, column=2)
|
||||
#autodetect fpps4 button
|
||||
open_fpps4_button = tkinter.Button(root, text="Autodedect fpps4", command=autodetect)
|
||||
open_fpps4_button.grid(row=0, column=4)
|
||||
#rungame button
|
||||
open_fpps4_button = tkinter.Button(root, text="Run!", command=rungame)
|
||||
open_fpps4_button.grid(row=0, column=6)
|
||||
#print selected game path
|
||||
game_path_label = tkinter.Label(root, text="No game selected")
|
||||
game_path_label.grid(row=2, column=0, columnspan=2)
|
||||
#print selected fpps4 path
|
||||
fpps4_path_label = tkinter.Label(root, text="fpPS4 not selected")
|
||||
fpps4_path_label.grid(row=4, column=0, columnspan=2)
|
||||
#quit
|
||||
quit_button = tkinter.Button(root, text="Quit", command=root.destroy)
|
||||
quit_button.grid(row=6, column=6, columnspan=2)
|
||||
#run main loop
|
||||
root.mainloop()
|
1
third_party_gui/GUI/readme.txt
Normal file
1
third_party_gui/GUI/readme.txt
Normal file
@ -0,0 +1 @@
|
||||
Author: https://github.com/GameTec-live
|
6
third_party_gui/README.md
Normal file
6
third_party_gui/README.md
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
### Various graphical interfaces provided by other developers:
|
||||
|
||||
- frofpp4 provided SlrHui
|
||||
- GUI provided GameTec-live
|
||||
- fpPS4-Temmie-s-Launcher provided themitosan
|
BIN
third_party_gui/frofpp4/project1.ico
Normal file
BIN
third_party_gui/frofpp4/project1.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 130 KiB |
109
third_party_gui/frofpp4/project1.lpi
Normal file
109
third_party_gui/frofpp4/project1.lpi
Normal file
@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="12"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<Title Value="project1"/>
|
||||
<Scaled Value="True"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<BuildModes>
|
||||
<Item Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<UseFileFilters Value="True"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
</RunParams>
|
||||
<RequiredPackages>
|
||||
<Item>
|
||||
<PackageName Value="FCL"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<PackageName Value="LazUtils"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<PackageName Value="laz.virtualtreeview_package"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<PackageName Value="LazControls"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item>
|
||||
</RequiredPackages>
|
||||
<Units>
|
||||
<Unit>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit>
|
||||
<Unit>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
</Unit>
|
||||
<Unit>
|
||||
<Filename Value="unit2.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form2"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit2"/>
|
||||
</Unit>
|
||||
<Unit>
|
||||
<Filename Value="unit3.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form3"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit3"/>
|
||||
</Unit>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="project1"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<DebugInfoType Value="dsDwarf3"/>
|
||||
</Debugging>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions>
|
||||
<Item>
|
||||
<Name Value="EAbort"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
27
third_party_gui/frofpp4/project1.lpr
Normal file
27
third_party_gui/frofpp4/project1.lpr
Normal file
@ -0,0 +1,27 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}
|
||||
cthreads,
|
||||
{$ENDIF}
|
||||
{$IFDEF HASAMIGA}
|
||||
athreads,
|
||||
{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, Unit1, lazcontrols, Unit2, Unit3
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Scaled:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.CreateForm(TForm2, Form2);
|
||||
Application.CreateForm(TForm3, Form3);
|
||||
Application.Run;
|
||||
end.
|
||||
|
BIN
third_party_gui/frofpp4/project1.res
Normal file
BIN
third_party_gui/frofpp4/project1.res
Normal file
Binary file not shown.
1
third_party_gui/frofpp4/readme.txt
Normal file
1
third_party_gui/frofpp4/readme.txt
Normal file
@ -0,0 +1 @@
|
||||
Author: https://github.com/SlrHui
|
170
third_party_gui/frofpp4/unit1.lfm
Normal file
170
third_party_gui/frofpp4/unit1.lfm
Normal file
@ -0,0 +1,170 @@
|
||||
object Form1: TForm1
|
||||
Left = 359
|
||||
Height = 854
|
||||
Top = 308
|
||||
Width = 1217
|
||||
Caption = 'GUI'
|
||||
ClientHeight = 854
|
||||
ClientWidth = 1217
|
||||
DesignTimePPI = 120
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '2.2.2.0'
|
||||
object StatusBar1: TStatusBar
|
||||
Left = 0
|
||||
Height = 29
|
||||
Top = 825
|
||||
Width = 1217
|
||||
Panels = <>
|
||||
end
|
||||
object ToolBar1: TToolBar
|
||||
Left = 0
|
||||
Height = 49
|
||||
Top = 0
|
||||
Width = 1217
|
||||
ButtonHeight = 50
|
||||
ButtonWidth = 50
|
||||
Caption = 'ToolBar1'
|
||||
Images = ImageList1
|
||||
TabOrder = 1
|
||||
object ToolButton2: TToolButton
|
||||
Left = 1
|
||||
Hint = 'Options'
|
||||
Top = 2
|
||||
Caption = 'ToolButton2'
|
||||
ImageIndex = 1
|
||||
OnClick = ToolButton2Click
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
end
|
||||
object ToolButton3: TToolButton
|
||||
Left = 51
|
||||
Hint = 'Quit'
|
||||
Top = 2
|
||||
Caption = 'ToolButton3'
|
||||
ImageIndex = 2
|
||||
OnClick = ToolButton3Click
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 101
|
||||
Hint = 'Info'
|
||||
Top = 2
|
||||
Caption = 'ToolButton1'
|
||||
ImageIndex = 3
|
||||
OnClick = ToolButton1Click
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Height = 776
|
||||
Top = 49
|
||||
Width = 1217
|
||||
Align = alClient
|
||||
ClientHeight = 776
|
||||
ClientWidth = 1217
|
||||
TabOrder = 2
|
||||
object StringGrid1: TStringGrid
|
||||
Left = 1
|
||||
Height = 774
|
||||
Top = 1
|
||||
Width = 1215
|
||||
Align = alClient
|
||||
BorderStyle = bsNone
|
||||
ColCount = 1
|
||||
Columns = <
|
||||
item
|
||||
MaxSize = 800
|
||||
ReadOnly = True
|
||||
Title.Caption = 'Title'
|
||||
Width = 250
|
||||
end>
|
||||
FixedCols = 0
|
||||
GridLineStyle = psClear
|
||||
RowCount = 20
|
||||
TabOrder = 0
|
||||
OnDblClick = StringGrid1DblClick
|
||||
end
|
||||
end
|
||||
object ImageList1: TImageList
|
||||
Left = 191
|
||||
Top = 717
|
||||
Bitmap = {
|
||||
4C7A040000001000000010000000060700000000000078DAB5960B50945514C7
|
||||
CFB2BB8085CD62A5694349638E8E532924453A3D3495B4874E358E394DBE324A
|
||||
0DEDE523C9344D4B6B261915301F64A95398BA8802F2D65A1EF25E59160444C9
|
||||
A56D11B09087C8BF73EFB2BB2CBB1BCD58FBCD7FBE73BFEFFCCE3DF7DCC7B720
|
||||
FCE7D7DA5900ED61EDEDB9B32EF903FD71A336022F5503892DEE4547803695FB
|
||||
38A28F680B1073FC3C628EB26A5A11D3C8EDBA36C4687B9E715BA30752463BC7
|
||||
98FC3E37437722B2A409910DF0AC9A7644C6E6828A9D795A9B03FF32607E9D1B
|
||||
5D7415CD8803ADBF648F41F96CB2A61881699127F0DCA727317D63329EDF92CA
|
||||
3A8DB0C8044C59750CD3379CC494921B201DFB275973D83B916FBF5A151AF113
|
||||
6C3FBD5E6FB7131212ECB6EF6CEE3B1B5282EFF2E25B96555E613BEC7ED9D9D9
|
||||
767BEEDCB9769BBE3180D2F87EC251034A613395751A484A4A46666626B45AAD
|
||||
9D09090971F0493DDAE3E00744B379B24753A3A45F5C5C1CFCFCFC9095958531
|
||||
63C6203E3E1EF4D03C100F45C8DDFCD371AB62121D6317BFE4E4646BDFDFFD05
|
||||
FA1978EA2357DE4216EB5AE512D227C5305D6D758AA1E0BCE810B0FE69339AA9
|
||||
D9856FA44618C9089D42678D13DB21C722B5B91E211166E42BF251433568A116
|
||||
B76BB89DDA6126336AA9160632A0944A514665A8A00AD4511D441F37E80640FF
|
||||
FFD5A16A41D58FCBA5FE2D533DEC47BB6FEAA373D0DEA0679D77E2F5813BDCC6
|
||||
8B994968CA8D85B88B76F4D48138F0C250EC9F3114FB2605C0E6D35CB01F879E
|
||||
7DD02546C67B8371257E01CAA266A229FB6BB49C8D4253DE6ED4E292554DE750
|
||||
FFD322988E86DBFBE87DB5FA34C0F8E52858B411683EF5218C1DA530B615A3A2
|
||||
CB80CAD64294A312E759856B8778AC47E932251A0FBD0A53CE7A14410FE3D554
|
||||
545C4D473193A52DD92840298EBCECE7C4273C3159E62354BD5209CBB713F00B
|
||||
F291CBDE791C259F6953FCEBC8E176D537539196F086DDBF76E8517937AC269C
|
||||
7C93F9556A346CD2209D2364317196E95F596738DAD9ABC750FCFE209C890A95
|
||||
FE42BB5FF091BC7E2541BB88D59D84FA0D1AFCF1D5BD68DE3112191C278323A4
|
||||
7204E32701285CEE8FBCB7BD259BBFC2CADBC6719DAE23E36C04AA3FF643FDA6
|
||||
21306D1B2E39A114CE26E34214CE2DBB03796F293DD66FD7A4BBA15FE183CA35
|
||||
1A5C58370485DAB9484226CA560E4141843FF2DFF145F4343F8FEBA7E423C2D1
|
||||
976F47E1321F94BC3790A541D10A0DF73B50B2FBC206C9DCF74DD7B8C4487ED3
|
||||
5A93B470C2CEC9FEC85DEC85BC70B554EE5B2AC43DF380AC93F0899D451E73B0
|
||||
D9879F1D69AFF35FBEF570E7D3F7BA4937D1466DB846D75071D7713B2FF6BD38
|
||||
735AA9B5DFFDDF4DDDE8A22E88B3C4E25323256CC18977FDEDE11A3E9B148A58
|
||||
78DF9908DFC02228030AF9708DC5EB7CE8F6C72B95BBF1D06C600D6FF1437CE4
|
||||
FE700AD8C467E1B4A5C01D4F32AA494692FCD8B95E03EE3C86A55F0025955676
|
||||
CE1A20883F3BA35F01C6BD063C38EB2654E33BA018DB846D74187DFB0DFF1CC8
|
||||
E5637F267FCB6F9BC0AF837BAB0B8AE076D69FF00A6E8262F83979B6DAC63B92
|
||||
FFAFA4E400131702DDDDDD520EF606E6ADEB94CFF66BDB99374319FC9BAC89A8
|
||||
87A8D5C20DC0E24DFCFD1CEFE0AD3104DB616F07CD6964B61EAAA08B50DE7F46
|
||||
9EED4ACD092CE171DF33D5916FEF180ED6D2C3D6B2AAA00E2AC756DA2AE72774
|
||||
3EA00AB1F19C5370471FF60F662F3357C3AA64F63CAB18CB69396858017C436D
|
||||
EC4D59A779EBDA5DFAB7B2C61EB608DE0FA75979AE43EF1AF76683E6989D62A8
|
||||
83F45676DC2F508FD8832DB445AE2B512745701BEB9A13AB0CAEE33E2F38C5F0
|
||||
0ECA83F718FE2F40AB504005720E48738AE7E51AAB91E7E83AB3BFCB1A5BEB64
|
||||
6095F6B0B9F0792405EAC0F578925E442775CA3520D6A4D75813F7D7D0532747
|
||||
8DD54125CC15B074CC2641FDC06750D2DBC8A44CA7FD20D6A4D7701D73D5508D
|
||||
2D857A5C11AB90C7AA83F723A7E13D6A2F54F7AF647621B6D376B7FB58AC49A2
|
||||
189ED304A8461D846AC476A802374275EF07FC7C3E1EA32948A4447BDE9EF6BF
|
||||
58579B6933C2291C8B681156D36AA4F19F36F1BFC3650FC3599D9D9DE39A9B9B
|
||||
A3CD6673A5C964EA1412B67826DEF5F5B789EB3B807D62AF5CB9D25D5BA943F9
|
||||
99CD30A42E4155C6BBA8C9DD86FAEA3C8877C247F8F6652D164B76FDA52AE425
|
||||
2C40FEFE0094FD1088AAAC0FA484AD3FC8EDF425F8EDF20508DFDE31444CC166
|
||||
7F3F112507EE63FFE1309E9A2DFA9312B6782664D086C91882B18D57E4A53B3E
|
||||
0F05710176BFF29F27B05F9594B06DCF85441E82B1D54A8C373D7AB0938F90FE
|
||||
F0682997E73C16510F5B9D8B32362267EF30279FDA73BB50577644AAFCC8E32E
|
||||
31444D6D73A4D32E4461AFDC658E5C77DBF80DC726B9F0E2BD6D7EDDF182F937
|
||||
BCA7FCFBE36DF97BAADF3FF1BDEBE769FE2A4F2FB0F3C2F6347F9ED6CFC59283
|
||||
B86C4C9712B6A7F5E379FDBACEB9A7F57BABFBE756F6EFDFEB888C78
|
||||
}
|
||||
end
|
||||
object Process1: TProcess
|
||||
Active = False
|
||||
Options = []
|
||||
Priority = ppNormal
|
||||
StartupOptions = []
|
||||
ShowWindow = swoNone
|
||||
WindowColumns = 0
|
||||
WindowHeight = 0
|
||||
WindowLeft = 0
|
||||
WindowRows = 0
|
||||
WindowTop = 0
|
||||
WindowWidth = 0
|
||||
FillAttribute = 0
|
||||
Left = 316
|
||||
Top = 730
|
||||
end
|
||||
end
|
175
third_party_gui/frofpp4/unit1.pas
Normal file
175
third_party_gui/frofpp4/unit1.pas
Normal file
@ -0,0 +1,175 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, Menus, ExtCtrls,
|
||||
ComCtrls, Buttons, StdCtrls, ButtonPanel, Grids, Unit2,Unit3, process, INIFiles,
|
||||
FileUtil;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
ImageList1: TImageList;
|
||||
Panel1: TPanel;
|
||||
Process1: TProcess;
|
||||
StatusBar1: TStatusBar;
|
||||
StringGrid1: TStringGrid;
|
||||
ToolBar1: TToolBar;
|
||||
ToolButton1: TToolButton;
|
||||
ToolButton2: TToolButton;
|
||||
ToolButton3: TToolButton;
|
||||
procedure BitBtn1Click(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure Page1BeforeShow(ASender: TObject; ANewPage: TPage;
|
||||
ANewIndex: Integer);
|
||||
procedure SpeedButton1Click(Sender: TObject);
|
||||
procedure StringGrid1DblClick(Sender: TObject);
|
||||
procedure ToolButton1Click(Sender: TObject);
|
||||
procedure ToolButton2Click(Sender: TObject);
|
||||
procedure GetAllFiles(Path, ExtMask: String; List: TStrings;SubFolder: Boolean);
|
||||
procedure ToolButton3Click(Sender: TObject);
|
||||
private
|
||||
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
emup: String;
|
||||
gamep: String;
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.Page1BeforeShow(ASender: TObject; ANewPage: TPage;
|
||||
ANewIndex: Integer);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TForm1.SpeedButton1Click(Sender: TObject);
|
||||
begin
|
||||
Close();
|
||||
end;
|
||||
|
||||
procedure TForm1.StringGrid1DblClick(Sender: TObject);
|
||||
var
|
||||
row : integer;
|
||||
AProcess: TProcess;
|
||||
befehl,bf: String;
|
||||
pfademu: String;
|
||||
begin
|
||||
row := StringGrid1.Row;
|
||||
befehl := emup + '\fpPS4.exe';
|
||||
//befehl := emup + '\game.bat';
|
||||
AProcess := TProcess.Create(nil);
|
||||
pfademu := '-e ' + gamep + '\' + StringGrid1.Cells[0,row] + '\eboot.bin';
|
||||
bf := befehl + ' ' + pfademu;
|
||||
chDir(emup);
|
||||
AProcess.CommandLine := bf;
|
||||
|
||||
AProcess.Options := AProcess.Options + [poWaitOnExit];
|
||||
AProcess.Execute;
|
||||
AProcess.Free;
|
||||
end;
|
||||
|
||||
procedure TForm1.ToolButton1Click(Sender: TObject);
|
||||
begin
|
||||
Form3.Parent := Form1;
|
||||
Form3.Position:= poMainFormCenter;
|
||||
Form3.Show;
|
||||
end;
|
||||
|
||||
procedure TForm1.ToolButton2Click(Sender: TObject);
|
||||
begin
|
||||
Form2.Parent := Form1;
|
||||
Form2.Position:= poMainFormCenter;
|
||||
Form2.Show;
|
||||
end;
|
||||
|
||||
procedure TForm1.BitBtn1Click(Sender: TObject);
|
||||
begin
|
||||
Close();
|
||||
end;
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
Var
|
||||
INI : TINIFile;
|
||||
Dirs : Array[0..127] of pchar;
|
||||
m,n,l,I,Count : longint;
|
||||
NewDir,temp,tempo,home : String;
|
||||
sl,sg : TStringList;
|
||||
begin
|
||||
home := GetCurrentDir;
|
||||
home := home + '\Frofpp4.ini';
|
||||
INI := TIniFile.Create(home);
|
||||
sl := TStringList.Create;
|
||||
sg := TStringList.Create;
|
||||
emup := INI.ReadString('PFAD', 'path', '');
|
||||
gamep := INI.ReadString('PFAD', 'path1', '');
|
||||
|
||||
try
|
||||
|
||||
GetAllFiles(gamep,'*',sl,true);
|
||||
|
||||
finally
|
||||
|
||||
end;
|
||||
|
||||
n := 0;
|
||||
|
||||
sg.Sorted:= true;
|
||||
|
||||
for I:=0 to sl.Count-1 do begin
|
||||
NewDir := sl[i];
|
||||
l := Length(gamep);
|
||||
temp := Copy(NewDir,l+2,Length(NewDir)-l);
|
||||
m := Pos('\',temp);
|
||||
|
||||
if m <> 0 then
|
||||
begin
|
||||
|
||||
temp := Copy(temp,0,m-1);
|
||||
sg.Add(temp);
|
||||
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
StringGrid1.Clear;
|
||||
StringGrid1.RowCount:=sg.Count;
|
||||
for I := 0 to sg.Count - 1 do
|
||||
StringGrid1.Cells[0, I] := sg[I];
|
||||
sl.free;
|
||||
sg.free;
|
||||
end;
|
||||
procedure TForm1.GetAllFiles(Path, ExtMask: String; List: TStrings;
|
||||
SubFolder: Boolean);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
with TStringList.Create do
|
||||
try
|
||||
CommaText := ExtMask;
|
||||
for i := 0 to Count - 1 do
|
||||
FindAllFiles(List, Path, '*' + Strings[i], SubFolder);
|
||||
finally
|
||||
Free
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.ToolButton3Click(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
80
third_party_gui/frofpp4/unit2.lfm
Normal file
80
third_party_gui/frofpp4/unit2.lfm
Normal file
@ -0,0 +1,80 @@
|
||||
object Form2: TForm2
|
||||
Left = 874
|
||||
Height = 461
|
||||
Top = 313
|
||||
Width = 693
|
||||
Caption = 'Options'
|
||||
ClientHeight = 461
|
||||
ClientWidth = 693
|
||||
DesignTimePPI = 120
|
||||
OnActivate = FormActivate
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
LCLVersion = '2.2.2.0'
|
||||
object Button1: TButton
|
||||
Left = 60
|
||||
Height = 31
|
||||
Top = 400
|
||||
Width = 94
|
||||
Caption = 'Save'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 0
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 558
|
||||
Height = 31
|
||||
Top = 400
|
||||
Width = 94
|
||||
Caption = 'Close'
|
||||
OnClick = Button2Click
|
||||
TabOrder = 1
|
||||
end
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 24
|
||||
Height = 211
|
||||
Top = 32
|
||||
Width = 639
|
||||
Caption = 'Directories'
|
||||
ClientHeight = 186
|
||||
ClientWidth = 635
|
||||
TabOrder = 2
|
||||
object Button3: TButton
|
||||
Left = 16
|
||||
Height = 31
|
||||
Top = 24
|
||||
Width = 94
|
||||
Caption = 'Emu'
|
||||
OnClick = Button3Click
|
||||
TabOrder = 0
|
||||
end
|
||||
object Button4: TButton
|
||||
Left = 16
|
||||
Height = 31
|
||||
Top = 72
|
||||
Width = 94
|
||||
Caption = 'Games'
|
||||
OnClick = Button4Click
|
||||
TabOrder = 1
|
||||
end
|
||||
object Edit1: TEdit
|
||||
Left = 152
|
||||
Height = 28
|
||||
Top = 24
|
||||
Width = 452
|
||||
TabOrder = 2
|
||||
Text = 'Edit1'
|
||||
end
|
||||
object Edit2: TEdit
|
||||
Left = 152
|
||||
Height = 28
|
||||
Top = 72
|
||||
Width = 452
|
||||
TabOrder = 3
|
||||
Text = 'Edit2'
|
||||
end
|
||||
end
|
||||
object SelectDirectoryDialog1: TSelectDirectoryDialog
|
||||
Left = 24
|
||||
Top = 8
|
||||
end
|
||||
end
|
121
third_party_gui/frofpp4/unit2.pas
Normal file
121
third_party_gui/frofpp4/unit2.pas
Normal file
@ -0,0 +1,121 @@
|
||||
unit Unit2;
|
||||
|
||||
{$mode ObjFPC}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, ActnList,
|
||||
ExtCtrls, StdCtrls, ExtendedNotebook, INIFiles;
|
||||
|
||||
type
|
||||
|
||||
{ TForm2 }
|
||||
|
||||
TForm2 = class(TForm)
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
Button3: TButton;
|
||||
Button4: TButton;
|
||||
Edit1: TEdit;
|
||||
Edit2: TEdit;
|
||||
GroupBox1: TGroupBox;
|
||||
SelectDirectoryDialog1: TSelectDirectoryDialog;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure Button3Click(Sender: TObject);
|
||||
procedure Button4Click(Sender: TObject);
|
||||
procedure FormActivate(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
Form2: TForm2;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm2 }
|
||||
|
||||
procedure TForm2.Button2Click(Sender: TObject);
|
||||
begin
|
||||
Close();
|
||||
end;
|
||||
|
||||
procedure TForm2.Button1Click(Sender: TObject);
|
||||
var
|
||||
INI: TINIFile;
|
||||
path: string;
|
||||
path1: string;
|
||||
home: string;
|
||||
begin
|
||||
home := GetCurrentDir;
|
||||
home := home + '\Frofpp4.ini';
|
||||
INI := TIniFile.Create(home);
|
||||
path := Edit1.Text;
|
||||
path1 := Edit2.Text;
|
||||
|
||||
INI.WriteString('PFAD', 'path', path);
|
||||
INI.WriteString('PFAD', 'path1', path1);
|
||||
INI.free;
|
||||
end;
|
||||
|
||||
procedure TForm2.Button3Click(Sender: TObject);
|
||||
var
|
||||
path: string;
|
||||
begin
|
||||
if SelectDirectoryDialog1.Execute then
|
||||
begin
|
||||
path := SelectDirectoryDialog1.FileName;
|
||||
Edit1.Text := path;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm2.Button4Click(Sender: TObject);
|
||||
var path: string;
|
||||
begin
|
||||
if SelectDirectoryDialog1.Execute then
|
||||
begin
|
||||
path := SelectDirectoryDialog1.FileName;
|
||||
Edit2.Text := path;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm2.FormActivate(Sender: TObject);
|
||||
begin
|
||||
begin
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm2.FormCreate(Sender: TObject);
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TForm2.FormShow(Sender: TObject);
|
||||
var
|
||||
INI: TINIFile;
|
||||
path: string;
|
||||
path1: string;
|
||||
home: string;
|
||||
begin
|
||||
home := GetCurrentDir;
|
||||
home := home + '\Frofpp4.ini';
|
||||
INI := TIniFile.Create(home);
|
||||
|
||||
path := INI.ReadString('PFAD', 'path', '');
|
||||
path1 := INI.ReadString('PFAD', 'path1', '');
|
||||
Edit1.Text := path;
|
||||
Edit2.Text := path1;
|
||||
INI.free;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
68
third_party_gui/frofpp4/unit3.lfm
Normal file
68
third_party_gui/frofpp4/unit3.lfm
Normal file
@ -0,0 +1,68 @@
|
||||
object Form3: TForm3
|
||||
Left = 892
|
||||
Height = 368
|
||||
Top = 406
|
||||
Width = 461
|
||||
Caption = 'Info'
|
||||
ClientHeight = 368
|
||||
ClientWidth = 461
|
||||
DesignTimePPI = 120
|
||||
LCLVersion = '2.2.2.0'
|
||||
object Button1: TButton
|
||||
Left = 168
|
||||
Height = 31
|
||||
Top = 306
|
||||
Width = 94
|
||||
Caption = 'OK'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 0
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 144
|
||||
Height = 20
|
||||
Top = 40
|
||||
Width = 136
|
||||
Caption = 'Gui for Emu "fpPS4" '
|
||||
ParentColor = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 168
|
||||
Height = 20
|
||||
Top = 80
|
||||
Width = 80
|
||||
Caption = 'V 0.000001a'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 112
|
||||
Height = 20
|
||||
Top = 128
|
||||
Width = 203
|
||||
Caption = 'this program is free of charge. '
|
||||
ParentColor = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 144
|
||||
Height = 20
|
||||
Top = 160
|
||||
Width = 133
|
||||
Caption = 'use at your own risk.'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 96
|
||||
Height = 20
|
||||
Top = 200
|
||||
Width = 234
|
||||
Caption = 'no warranty of any kind is assumed.'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label6: TLabel
|
||||
Left = 144
|
||||
Height = 20
|
||||
Top = 248
|
||||
Width = 135
|
||||
Caption = 'SLRHUI 2022 Austria'
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
44
third_party_gui/frofpp4/unit3.pas
Normal file
44
third_party_gui/frofpp4/unit3.pas
Normal file
@ -0,0 +1,44 @@
|
||||
unit Unit3;
|
||||
|
||||
{$mode ObjFPC}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls;
|
||||
|
||||
type
|
||||
|
||||
{ TForm3 }
|
||||
|
||||
TForm3 = class(TForm)
|
||||
Button1: TButton;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
Label3: TLabel;
|
||||
Label4: TLabel;
|
||||
Label5: TLabel;
|
||||
Label6: TLabel;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
private
|
||||
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
Form3: TForm3;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm3 }
|
||||
|
||||
procedure TForm3.Button1Click(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user