diff --git a/DevilBoxLauncher.dproj b/DevilBoxLauncher.dproj index 74a52f0..5a66eb7 100644 --- a/DevilBoxLauncher.dproj +++ b/DevilBoxLauncher.dproj @@ -1,12 +1,12 @@  {B2CA3E22-26B2-45BC-8BA5-A62F60C6F4C8} - 19.3 + 19.5 FMX True Debug - Win32 - 135299 + Win64 + 3 Application DevilBoxLauncher.dpr @@ -28,8 +28,8 @@ Base true - - true + + true Base true @@ -131,6 +131,8 @@ $(BDS)\bin\delphi_PROJECTICON.ico $(BDS)\bin\delphi_PROJECTICNS.icns DevilBoxLauncher + 1033 + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= DBXSqliteDriver;RESTComponents;DBXInterBaseDriver;emsclientfiredac;DataSnapFireDAC;tethering;bindcompfmx;FmxTeeUI;FireDACIBDriver;fmx;FireDACDBXDriver;dbexpress;IndyCore;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;ListViewPiaroAppearancePackage;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;IndyIPCommon;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;DataSnapNativeClient;ibxbindings;FireDACDSDriver;soapmidas;rtl;DbxClientDriver;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;DataSnapProviderClient;dsnapxml;dbrtl;IndyProtocols;$(DCC_UsePackage) @@ -208,12 +210,31 @@ $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png $(BDS)\bin\Artwork\iOS\iPad\FM_NotificationIcon_40x40.png - - .\bin\$(Platform)\$(Config) - .\dcu\$(Platform)\$(Config) - /usr/bin/xterm -e "%debuggee%" - CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);NSHighResolutionCapable=true;LSApplicationCategoryType=public.app-category.utilities;NSLocationUsageDescription=The reason for accessing the location information of the user;NSContactsUsageDescription=The reason for accessing the contacts;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSCameraUsageDescription=The reason for accessing the camera;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSMotionUsageDescription=The reason for accessing the accelerometer;NSDesktopFolderUsageDescription=The reason for accessing the Desktop folder;NSDocumentsFolderUsageDescription=The reason for accessing the Documents folder;NSDownloadsFolderUsageDescription=The reason for accessing the Downloads folder;NSNetworkVolumesUsageDescription=The reason for accessing files on a network volume;NSRemovableVolumesUsageDescription=The reason for accessing files on a removable volume;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers - (None) + + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0;CFBundleShortVersionString=1.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;NSLocationAlwaysAndWhenInUseUsageDescription=The reason for accessing the location information of the user;UIBackgroundModes=;NSContactsUsageDescription=The reason for accessing the contacts;NSPhotoLibraryUsageDescription=The reason for accessing the photo library;NSPhotoLibraryAddUsageDescription=The reason for adding to the photo library;NSCameraUsageDescription=The reason for accessing the camera;NSFaceIDUsageDescription=The reason for accessing the face id;NSMicrophoneUsageDescription=The reason for accessing the microphone;NSSiriUsageDescription=The reason for accessing Siri;ITSAppUsesNonExemptEncryption=false;NSBluetoothAlwaysUsageDescription=The reason for accessing bluetooth;NSBluetoothPeripheralUsageDescription=The reason for accessing bluetooth peripherals;NSCalendarsUsageDescription=The reason for accessing the calendar data;NSRemindersUsageDescription=The reason for accessing the reminders;NSMotionUsageDescription=The reason for accessing the accelerometer;NSSpeechRecognitionUsageDescription=The reason for requesting to send user data to Apple's speech recognition servers + iPhoneAndiPad + true + DBXSqliteDriver;RESTComponents;DBXInterBaseDriver;emsclientfiredac;DataSnapFireDAC;tethering;bindcompfmx;FmxTeeUI;FireDACIBDriver;fmx;FireDACDBXDriver;dbexpress;IndyCore;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;soapserver;bindengine;CloudService;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;IndyIPCommon;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;ibmonitor;FMXTee;soaprtl;DbxCommonDriver;ibxpress;xmlrtl;DataSnapNativeClient;ibxbindings;FireDACDSDriver;soapmidas;rtl;DbxClientDriver;CustomIPTransport;bindcomp;IndyIPClient;dbxcds;DataSnapProviderClient;dsnapxml;dbrtl;IndyProtocols;fmxase;$(DCC_UsePackage);$(DCC_UsePackage) + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_1024x1024.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_180x180.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_2x.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImageDark_2x.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImage_3x.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_LaunchImageDark_3x.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_120x120.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SettingIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SettingIcon_87x87.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_NotificationIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_NotificationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_167x167.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImage_2x.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageDark_2x.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SettingIcon_58x58.png + $(BDS)\bin\Artwork\iOS\iPad\FM_NotificationIcon_40x40.png DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXInterBaseDriver;emsclientfiredac;DataSnapFireDAC;tethering;FireDACMSSQLDriver;bindcompfmx;DBXOracleDriver;inetdb;FmxTeeUI;FireDACIBDriver;fmx;fmxdae;FireDACDBXDriver;dbexpress;IndyCore;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;soapserver;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;IndyIPCommon;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;DataSnapServer;xmlrtl;DataSnapNativeClient;ibxbindings;fmxobj;FireDACDSDriver;soapmidas;rtl;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;bindcomp;DBXInformixDriver;IndyIPClient;dbxcds;FireDACODBCDriver;DataSnapIndy10ServerTransport;DataSnapProviderClient;dsnapxml;dbrtl;FireDACMongoDBDriver;IndyProtocols;inetdbxpress;fmxase;$(DCC_UsePackage) @@ -235,22 +256,19 @@ DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXInterBaseDriver;emsclientfiredac;DataSnapFireDAC;tethering;FireDACMSSQLDriver;bindcompfmx;DBXOracleDriver;inetdb;FmxTeeUI;FireDACIBDriver;fmx;fmxdae;FireDACDBXDriver;dbexpress;IndyCore;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;soapserver;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;IndyIPCommon;IndyIPServer;IndySystem;fmxFireDAC;FireDAC;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;DataSnapServer;xmlrtl;DataSnapNativeClient;ibxbindings;fmxobj;FireDACDSDriver;soapmidas;rtl;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;bindcomp;DBXInformixDriver;IndyIPClient;dbxcds;FireDACODBCDriver;DataSnapIndy10ServerTransport;DataSnapProviderClient;dsnapxml;dbrtl;FireDACMongoDBDriver;IndyProtocols;inetdbxpress;fmxase;$(DCC_UsePackage);$(DCC_UsePackage) /usr/X11/bin/xterm -e "%debuggee%" (None) - .\bin\$(Platform)\$(Config) - .\dcu\$(Platform)\$(Config) DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;bindcompvclsmp;emsclientfiredac;DataSnapFireDAC;tethering;svnui;FireDACADSDriver;tmsxlsdXE13;DBXMSSQLDriver;NxCollection6Dsgn_d10_2;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;FireDACIBDriver;fmx;fmxdae;vcledge;vclib;NxDBGrid6Run_d10_2;NxCollection6Run_d10_2;FireDACDBXDriver;dbexpress;IndyCore;NxLayout6Dsgn_d10_2;NxGrid6Run_d10_2;vclx;Python;dsnap;DataSnapCommon;emsclient;SVGIconImageListFMX;FireDACCommon;Instructor;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;NxLayout6Run_d10_2;vclie;CEF4Delphi_FMX;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;SVGIconPackage;ListViewPiaroAppearancePackage;NxInspector6Run_d10_2;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;NxInspector6Dsgn_d10_2;inet;bindcompdbx;IndyIPCommon;tmsexdXE13;vcl;DBXSybaseASEDriver;IndyIPServer;IndySystem;FireDACDb2Driver;bindcompvclwinx;dsnapcon;madExcept_;NxGrid6Dsgn_d10_2;DXImageLabelButton;FireDACMSAccDriver;FireDACInfxDriver;fmxFireDAC;vclimg;madBasic_;TeeDB;FireDAC;emshosting;NxStandard6Dsgn_d10_2;tmsdXE13;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;ibxpress;Tee;PythonVcl;DataSnapServer;xmlrtl;DataSnapNativeClient;ibxbindings;fmxobj;FireDACDSDriver;soapmidas;rtl;emsserverresource;DbxClientDriver;vclwinx;DBXSybaseASADriver;TLogMemo;CustomIPTransport;vcldsnap;PythonFmx;madDisAsm_;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;SVGIconImageList;TeeUI;NxStandard6Run_d10_2;dbxcds;VclSmp;adortl;FireDACODBCDriver;NxDBGrid6Dsgn_d10_2;DataSnapIndy10ServerTransport;DataSnapProviderClient;dsnapxml;dbrtl;FireDACMongoDBDriver;IndyProtocols;inetdbxpress;tmswizdXE13;fmxase;$(DCC_UsePackage) Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) Debug true - CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= - 1033 $(BDS)\bin\default_app.manifest - $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png - $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png + src\images\ms-icon-70x70.png + src\images\ms-icon-150x150.png PerMonitorV2 true .\bin\$(Platform)\$(Config) + src\images\favicon.ico .\dcu\$(Platform)\$(Config) @@ -258,14 +276,13 @@ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) Debug true - CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= - 1033 $(BDS)\bin\default_app.manifest - $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png - $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png + src\images\ms-icon-144x144.png + src\images\apple-icon-152x152.png PerMonitorV2 true .\bin\$(Platform)\$(Config) + src\images\favicon.ico .\dcu\$(Platform)\$(Config) @@ -286,21 +303,19 @@ true Cfg_1 true - /usr/X11/bin/xterm -e "%debuggee%" true false true true - 1033 .\bin\$(Platform)\$(Config) .\dcu\$(Platform)\$(Config) + src\images\favicon.ico true true - 1033 false @@ -318,7 +333,6 @@ true Cfg_2 true - /usr/X11/bin/xterm -e "%debuggee%" true @@ -365,15 +379,14 @@ Microsoft Office XP Sample Automation Server Wrapper Components - - + + true - - - DevilBoxLauncher.exe + + true @@ -382,11 +395,11 @@ true - - - true - - + + + + + 1 @@ -409,16 +422,6 @@ 64 - - - classes - 1 - - - classes - 1 - - res\xml @@ -728,7 +731,7 @@ 1 .dylib - + 1 .dylib @@ -761,7 +764,7 @@ 1 .dylib - + 1 .dylib @@ -798,7 +801,7 @@ 0 - + 0 @@ -817,404 +820,418 @@ 0 - - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + + 1 + + 1 - - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 1 - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 1 - - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + + ..\ 1 - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + ..\ + 1 + + + ..\ 1 - - - ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + + + Contents 1 - - ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + + Contents + 1 + + + Contents 1 - - - ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + + + Contents\Resources 1 - - ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + + Contents\Resources + 1 + + + Contents\Resources 1 - - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + + library\lib\armeabi-v7a 1 - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + library\lib\arm64-v8a + 1 + + 1 - - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 - - - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + Contents\MacOS 1 - - - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + Contents\MacOS 1 - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + Contents\MacOS 1 + + 0 + - - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + + library\lib\armeabi-v7a 1 - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + + + 1 + + 1 - + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + - ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 1 - - ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 1 - + + + ..\ + 1 + - ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + ..\ 1 - - ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + + ..\ 1 - + + + 1 + - ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 - - ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset + 1 - + - ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset - 1 + ..\$(PROJECTNAME).launchscreen + 64 - - ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset - 1 + + ..\$(PROJECTNAME).launchscreen + 64 - + + + 1 + - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 - - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + + Assets 1 - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + Assets 1 - - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + + Assets 1 - - ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + + Assets 1 - + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 - + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - + - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 - - - - ..\ + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 + + - ..\ + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - - + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + - ..\$(PROJECTNAME).launchscreen - 64 - - - ..\$(PROJECTNAME).launchscreen - 64 + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset + 1 - - - + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - - ..\ - 1 - - - ..\ + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 - - ..\ + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 - - - Contents - 1 - - - Contents + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 - - Contents + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 - - - Contents\Resources - 1 - - - Contents\Resources + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 - - Contents\Resources + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 - - - library\lib\armeabi-v7a - 1 - - - library\lib\arm64-v8a + + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 - + + ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 1 + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - 1 - - + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - Contents\MacOS + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - Contents\MacOS + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - Contents\MacOS + + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - 0 - - - - - library\lib\armeabi-v7a + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - - Assets + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - Assets + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - - Assets + + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - Assets + + ..\$(PROJECTNAME).launchscreen\Assets\AppIcon.appiconset 1 - - - - - - + - + + + + + + + False False False - True - True - True + False + False + False + False True True diff --git a/DevilBoxLauncher.res b/DevilBoxLauncher.res index 39f9cc3..3ecc34c 100644 Binary files a/DevilBoxLauncher.res and b/DevilBoxLauncher.res differ diff --git a/README.md b/README.md index 84184d3..d96d544 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ # DevilBox Launcher Launcher for [DevilBox](https://github.com/cytopia/devilbox) -![DevilBox Launcher](/image.png) \ No newline at end of file +![Domain/Hosts editor](/screenshot-1.png) +![Main settings](/screenshot-2.png) +![Select started service](/screenshot-3.png) +![DevilBox config editor](/screenshot-4.png) \ No newline at end of file diff --git a/image.png b/image.png deleted file mode 100644 index f4ed107..0000000 Binary files a/image.png and /dev/null differ diff --git a/screenshot-1.png b/screenshot-1.png new file mode 100644 index 0000000..96204d8 Binary files /dev/null and b/screenshot-1.png differ diff --git a/screenshot-2.png b/screenshot-2.png new file mode 100644 index 0000000..80fbbdc Binary files /dev/null and b/screenshot-2.png differ diff --git a/screenshot-3.png b/screenshot-3.png new file mode 100644 index 0000000..41975f3 Binary files /dev/null and b/screenshot-3.png differ diff --git a/screenshot-4.png b/screenshot-4.png new file mode 100644 index 0000000..3be0772 Binary files /dev/null and b/screenshot-4.png differ diff --git a/src/forms/mainF.fmx b/src/forms/mainF.fmx index 9af4aee..5a9da2c 100644 --- a/src/forms/mainF.fmx +++ b/src/forms/mainF.fmx @@ -48,6 +48,7 @@ object FMain: TFMain ExplicitSize.cy = 26.000000000000000000 object lb_domains: TListBox Align = Client + PopupMenu = pm_domain Size.Width = 674.000000000000000000 Size.Height = 294.000000000000000000 Size.PlatformDefault = False @@ -79,7 +80,7 @@ object FMain: TFMain Size.Height = 23.000000000000000000 Size.PlatformDefault = False StyleLookup = 'additembutton' - TabOrder = 3 + TabOrder = 4 Text = 'Add' OnClick = btn_domain_addClick end @@ -91,25 +92,13 @@ object FMain: TFMain Size.Height = 23.000000000000000000 Size.PlatformDefault = False StyleLookup = 'deleteitembutton' - TabOrder = 2 + TabOrder = 3 Text = 'Add' OnClick = btn_domain_removeClick end - object btn_domains_open_dir: TButton - Align = Right - Position.X = 629.000000000000000000 - Position.Y = 5.000000000000000000 - Size.Width = 40.000000000000000000 - Size.Height = 23.000000000000000000 - Size.PlatformDefault = False - StyleLookup = 'searchtoolbutton' - TabOrder = 1 - Text = 'Open Dir' - OnClick = btn_domains_open_dirClick - end object btn_domains_reload: TButton Align = Right - Position.X = 589.000000000000000000 + Position.X = 392.000000000000000000 Position.Y = 5.000000000000000000 Size.Width = 40.000000000000000000 Size.Height = 23.000000000000000000 @@ -119,6 +108,30 @@ object FMain: TFMain Text = 'Reload' OnClick = btn_domains_reloadClick end + object btn_open_hosts: TButton + Align = Right + Margins.Right = 5.000000000000000000 + Position.X = 556.000000000000000000 + Position.Y = 5.000000000000000000 + Size.Width = 108.000000000000000000 + Size.Height = 23.000000000000000000 + Size.PlatformDefault = False + TabOrder = 2 + Text = 'Open HOSTS' + OnClick = btn_open_hostsClick + end + object btn_open_domain_path: TButton + Align = Right + Margins.Right = 5.000000000000000000 + Position.X = 432.000000000000000000 + Position.Y = 5.000000000000000000 + Size.Width = 119.000000000000000000 + Size.Height = 23.000000000000000000 + Size.PlatformDefault = False + TabOrder = 1 + Text = 'Open Domains Dir' + OnClick = btn_open_domain_pathClick + end end end object ti_main: TTabItem @@ -180,6 +193,11 @@ object FMain: TFMain Column = 0 Control = cb_remove_images Row = 3 + end + item + Column = 0 + Control = cb_write_hosts + Row = 2 end> RowCollection = < item @@ -243,9 +261,17 @@ object FMain: TFMain Size.Width = 326.000000000000000000 Size.Height = 19.000000000000000000 Size.PlatformDefault = False - TabOrder = 4 + TabOrder = 5 Text = 'Remove Images before Build' end + object cb_write_hosts: TCheckBox + Align = Client + Size.Width = 326.000000000000000000 + Size.Height = 19.000000000000000000 + Size.PlatformDefault = False + TabOrder = 4 + Text = 'Write domains to hosts' + end end object pnl_options: TPanel Align = Bottom @@ -261,15 +287,27 @@ object FMain: TFMain object btn_update: TButton Align = Left Margins.Right = 5.000000000000000000 - Position.X = 5.000000000000000000 + Position.X = 118.000000000000000000 Position.Y = 5.000000000000000000 Size.Width = 108.000000000000000000 Size.Height = 32.000000000000000000 Size.PlatformDefault = False - TabOrder = 0 + TabOrder = 1 Text = 'Update DevilBox' OnClick = btn_updateClick end + object btn_open_work_path: TButton + Align = Left + Margins.Right = 5.000000000000000000 + Position.X = 5.000000000000000000 + Position.Y = 5.000000000000000000 + Size.Width = 108.000000000000000000 + Size.Height = 32.000000000000000000 + Size.PlatformDefault = False + TabOrder = 0 + Text = 'Open DevilBox Dir' + OnClick = btn_open_work_pathClick + end end end object ti_modules: TTabItem @@ -285,34 +323,43 @@ object FMain: TFMain Text = 'Modules' ExplicitSize.cx = 66.000000000000000000 ExplicitSize.cy = 26.000000000000000000 - object grdpnlyt_modules: TGridPanelLayout + object vrtscrlbx_modules: TVertScrollBox Align = Client - Padding.Left = 5.000000000000000000 - Padding.Top = 10.000000000000000000 - Padding.Right = 5.000000000000000000 - Padding.Bottom = 5.000000000000000000 Size.Width = 674.000000000000000000 Size.Height = 332.000000000000000000 Size.PlatformDefault = False TabOrder = 0 - ColumnCollection = < - item - Value = 33.333333333333340000 - end - item - Value = 33.333333333333340000 - end - item - Value = 33.333333333333340000 - end> - ControlCollection = <> - RowCollection = < - item - Value = 50.000000000000000000 - end - item - Value = 50.000000000000000000 - end> + Viewport.Width = 674.000000000000000000 + Viewport.Height = 332.000000000000000000 + object grdpnlyt_modules: TGridPanelLayout + Align = Client + Padding.Left = 5.000000000000000000 + Padding.Top = 10.000000000000000000 + Padding.Right = 5.000000000000000000 + Padding.Bottom = 5.000000000000000000 + Size.Width = 674.000000000000000000 + Size.Height = 332.000000000000000000 + Size.PlatformDefault = False + TabOrder = 0 + ColumnCollection = < + item + Value = 33.333333333333340000 + end + item + Value = 33.333333333333340000 + end + item + Value = 33.333333333333340000 + end> + ControlCollection = <> + RowCollection = < + item + Value = 50.000000000000000000 + end + item + Value = 50.000000000000000000 + end> + end end end object ti_options: TTabItem @@ -328,6 +375,38 @@ object FMain: TFMain Text = 'Options' ExplicitSize.cx = 62.000000000000000000 ExplicitSize.cy = 26.000000000000000000 + object vrtscrlbx_options: TVertScrollBox + Align = Client + Size.Width = 674.000000000000000000 + Size.Height = 332.000000000000000000 + Size.PlatformDefault = False + TabOrder = 0 + Viewport.Width = 674.000000000000000000 + Viewport.Height = 332.000000000000000000 + object grdpnlyt_options: TGridPanelLayout + Align = Top + Padding.Left = 5.000000000000000000 + Padding.Top = 5.000000000000000000 + Padding.Right = 5.000000000000000000 + Size.Width = 674.000000000000000000 + Size.Height = 332.000000000000000000 + Size.PlatformDefault = False + TabOrder = 0 + ColumnCollection = < + item + Value = 50.000000000000000000 + end + item + Value = 50.000000000000000000 + end> + ControlCollection = <> + RowCollection = < + item + SizeStyle = Absolute + Value = 30.000000000000000000 + end> + end + end end object ti_debug: TTabItem CustomIcon = < @@ -389,7 +468,7 @@ object FMain: TFMain Size.Width = 85.000000000000000000 Size.Height = 32.000000000000000000 Size.PlatformDefault = False - TabOrder = 2 + TabOrder = 3 Text = 'Save' TextSettings.Font.StyleExt = {00070000000000000004000000} OnClick = btn_saveClick @@ -403,7 +482,7 @@ object FMain: TFMain Size.Width = 85.000000000000000000 Size.Height = 32.000000000000000000 Size.PlatformDefault = False - TabOrder = 4 + TabOrder = 5 Text = 'Save && Build' TextSettings.Font.StyleExt = {00070000000000000004000000} OnClick = btn_save_buildClick @@ -417,7 +496,7 @@ object FMain: TFMain Size.Width = 85.000000000000000000 Size.Height = 32.000000000000000000 Size.PlatformDefault = False - TabOrder = 3 + TabOrder = 4 Text = 'Stop' TextSettings.Font.StyleExt = {00070000000000000004000000} Visible = False @@ -425,17 +504,29 @@ object FMain: TFMain end object btn_open_panel: TButton Align = Left - Margins.Left = 5.000000000000000000 + Margins.Right = 5.000000000000000000 Position.X = 185.000000000000000000 Position.Y = 5.000000000000000000 Size.Width = 85.000000000000000000 Size.Height = 32.000000000000000000 Size.PlatformDefault = False - TabOrder = 1 + TabOrder = 2 Text = 'Open Panel' Visible = False OnClick = btn_open_panelClick end + object btn_shell: TButton + Align = Left + Margins.Right = 5.000000000000000000 + Position.X = 185.000000000000000000 + Position.Y = 5.000000000000000000 + Size.Width = 108.000000000000000000 + Size.Height = 32.000000000000000000 + Size.PlatformDefault = False + TabOrder = 1 + Text = 'Shell' + OnClick = btn_shellClick + end end object sbook: TStyleBook UseStyleManager = True @@ -465,4 +556,20 @@ object FMain: TFMain end end end + object pm_domain: TPopupMenu + Left = 485 + Top = 205 + object mni_domain_open_dir: TMenuItem + Text = 'Open Directory' + OnClick = mni_domain_open_dirClick + end + object mni_domain_shell: TMenuItem + Text = 'mni_domain_shell' + Visible = False + end + object mni_open_url: TMenuItem + Text = 'Open URL' + OnClick = mni_open_urlClick + end + end end diff --git a/src/forms/mainF.pas b/src/forms/mainF.pas index afae3d5..e655887 100644 --- a/src/forms/mainF.pas +++ b/src/forms/mainF.pas @@ -4,13 +4,18 @@ interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, - System.Generics.Collections, System.Math, System.IniFiles, + System.Generics.Collections, System.Math, System.IniFiles, System.IOUtils, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Controls.Presentation, FMX.StdCtrls, FMX.ListBox, FMX.TabControl, - FMX.Edit, FMX.Layouts, + FMX.Edit, FMX.Layouts, FMX.Objects, FMX.Memo.Types, FMX.ScrollBox, FMX.Memo, + FMX.NumberBox, - DevilBoxControl, FMX.Objects, FMX.Memo.Types, FMX.ScrollBox, FMX.Memo; + {$IFDEF MSWINDOWS} + Winapi.Windows, + {$ENDIF} + + DevilBoxControl, FMX.Menus; type TFMain = class(TForm) @@ -38,7 +43,6 @@ TFMain = class(TForm) lyt_loader: TLayout; rctngl_loader: TRectangle; ani_loader: TAniIndicator; - btn_domains_open_dir: TButton; btn_open_panel: TButton; ti_debug: TTabItem; m_debug: TMemo; @@ -46,7 +50,20 @@ TFMain = class(TForm) cb_remove_images: TCheckBox; btn_domains_reload: TButton; pnl_options: TPanel; + btn_open_work_path: TButton; + btn_open_hosts: TButton; + btn_open_domain_path: TButton; + grdpnlyt_options: TGridPanelLayout; + vrtscrlbx_modules: TVertScrollBox; + vrtscrlbx_options: TVertScrollBox; + cb_write_hosts: TCheckBox; + pm_domain: TPopupMenu; + mni_domain_open_dir: TMenuItem; + mni_domain_shell: TMenuItem; + mni_open_url: TMenuItem; + btn_shell: TButton; {} + procedure OnChangeOptionValue(Sender: TObject); procedure OnChangeModuleState(Sender: TObject); procedure OnChangeModuleVersion(Sender: TObject); {} @@ -57,7 +74,6 @@ TFMain = class(TForm) procedure e_work_pathDblClick(Sender: TObject); procedure btn_domain_addClick(Sender: TObject); procedure btn_domain_removeClick(Sender: TObject); - procedure lb_domainsDblClick(Sender: TObject); procedure e_docker_pathDblClick(Sender: TObject); {} procedure btn_closeClick(Sender: TObject); @@ -67,14 +83,21 @@ TFMain = class(TForm) procedure btn_open_panelClick(Sender: TObject); procedure btn_updateClick(Sender: TObject); procedure btn_domains_reloadClick(Sender: TObject); + procedure btn_open_hostsClick(Sender: TObject); + procedure btn_open_domain_pathClick(Sender: TObject); + procedure btn_open_work_pathClick(Sender: TObject); + procedure mni_domain_open_dirClick(Sender: TObject); + procedure lb_domainsDblClick(Sender: TObject); + procedure btn_shellClick(Sender: TObject); + procedure mni_open_urlClick(Sender: TObject); private FDevilBoxControl: TDevilBoxControl; FIsInit: Boolean; function Init: Boolean; - procedure ReadOptions; - procedure ReadDomains; + function ReadOptions: Boolean; + function ReadDomains: Boolean; public { Public declarations } end; @@ -122,25 +145,48 @@ procedure TFMain.btn_domains_reloadClick(Sender: TObject); FDevilBoxControl.ReadDomains; end; +procedure TFMain.btn_open_domain_pathClick(Sender: TObject); +begin + FDevilBoxControl.OpenDomainDir(''); +end; + +procedure TFMain.btn_open_hostsClick(Sender: TObject); +begin + FDevilBoxControl.RunCommand('open', FDevilBoxControl.GetHostsFileName, ''); +end; + procedure TFMain.btn_open_panelClick(Sender: TObject); begin FDevilBoxControl.RunCommand('open', 'http://localhost', ''); end; +procedure TFMain.btn_open_work_pathClick(Sender: TObject); +begin + FDevilBoxControl.RunCommand('open', e_work_path.Text, ''); +end; + procedure TFMain.btn_saveClick(Sender: TObject); begin - if Init then FDevilBoxControl.Build; + if Init then + begin + FDevilBoxControl.Build(cb_write_hosts.IsChecked); + end; end; procedure TFMain.btn_save_buildClick(Sender: TObject); begin if Init then begin - FDevilBoxControl.Build; + FDevilBoxControl.Build(cb_write_hosts.IsChecked); FDevilBoxControl.Run(cb_remove_images.IsChecked); end; end; +procedure TFMain.btn_shellClick(Sender: TObject); +begin + FDevilBoxControl.RunCommandAndWait({$IFDEF MSWINDOWS}'shell.bat'{$ELSE}'shell.sh'{$ENDIF}, '', FDevilBoxControl.WorkPath, nil, True); +end; + procedure TFMain.btn_stopClick(Sender: TObject); begin FDevilBoxControl.Stop; @@ -184,17 +230,33 @@ procedure TFMain.e_work_pathDblClick(Sender: TObject); end; end; -procedure TFMain.lb_domainsDblClick(Sender: TObject); +procedure TFMain.mni_domain_open_dirClick(Sender: TObject); begin if lb_domains.ItemIndex < 0 then Exit; FDevilBoxControl.OpenDomainDir(lb_domains.Selected.Text); end; +procedure TFMain.mni_open_urlClick(Sender: TObject); +begin + if lb_domains.ItemIndex < 0 then Exit; + + FDevilBoxControl.RunCommand('open', 'http://' + lb_domains.Selected.Text + '.' + FDevilBoxControl.GetOption('TLD_SUFFIX'), ''); +end; + { } +procedure TFMain.OnChangeOptionValue(Sender: TObject); +var + edit: TEdit; +begin + edit := (Sender as TEdit); + + FDevilBoxControl.SetOption(edit.TagString, edit.Text); +end; + procedure TFMain.OnChangeModuleState(Sender: TObject); var checkBox: TCheckBox; @@ -223,6 +285,9 @@ procedure TFMain.OnChangeModuleVersion(Sender: TObject); } procedure TFMain.FormClose(Sender: TObject; var Action: TCloseAction); +var + i, j: Integer; + moduleCheckBox: TCheckBox; begin {Save options} with TIniFile.Create('./launcher.ini') do @@ -230,6 +295,20 @@ procedure TFMain.FormClose(Sender: TObject; var Action: TCloseAction); WriteString('options', 'work_path', e_work_path.Text); WriteString('options', 'docker_path', e_docker_path.Text); WriteBool('options', 'remove_images', cb_remove_images.IsChecked); + WriteBool('options', 'write_hosts', cb_write_hosts.IsChecked); + + for i := 0 to grdpnlyt_modules.ControlsCount - 1 do + begin + if not (grdpnlyt_modules.Controls[i] is TLayout) then Continue; + + for j := 0 to grdpnlyt_modules.Controls[i].ControlsCount - 1 do + begin + if not (grdpnlyt_modules.Controls[i].Controls[j] is TCheckBox) then Continue; + + moduleCheckBox := grdpnlyt_modules.Controls[i].Controls[j] as TCheckBox; + WriteBool('modules', moduleCheckBox.TagString, moduleCheckBox.IsChecked); + end; + end; Free; end; @@ -239,22 +318,39 @@ procedure TFMain.FormClose(Sender: TObject; var Action: TCloseAction); end; procedure TFMain.FormCreate(Sender: TObject); +var + i, j: Integer; + moduleCheckBox: TCheckBox; begin + {} + tc_main.ActiveTab := ti_domains; + + {Init} + Init; + {Load options} with TIniFile.Create('./launcher.ini') do begin e_work_path.Text := ReadString('options', 'work_path', ''); e_docker_path.Text := ReadString('options', 'docker_path', ''); cb_remove_images.IsChecked := ReadBool('options', 'remove_images', True); + cb_write_hosts.IsChecked := ReadBool('options', 'write_hosts', True); - Free; - end; + for i := 0 to grdpnlyt_modules.ControlsCount - 1 do + begin + if not (grdpnlyt_modules.Controls[i] is TLayout) then Continue; - {} - tc_main.ActiveTab := ti_domains; + for j := 0 to grdpnlyt_modules.Controls[i].ControlsCount - 1 do + begin + if not (grdpnlyt_modules.Controls[i].Controls[j] is TCheckBox) then Continue; - {Init} - Init; + moduleCheckBox := grdpnlyt_modules.Controls[i].Controls[j] as TCheckBox; + moduleCheckBox.IsChecked := ReadBool('modules', moduleCheckBox.TagString, True); + end; + end; + + Free; + end; end; function TFMain.Init: Boolean; @@ -285,6 +381,7 @@ function TFMain.Init: Boolean; begin btn_stop.Visible := True; btn_open_panel.Visible := True; + btn_shell.Visible := True; end; {} @@ -292,6 +389,7 @@ function TFMain.Init: Boolean; begin btn_stop.Visible := False; btn_open_panel.Visible := False; + btn_shell.Visible := False; end; {Check state} @@ -308,7 +406,62 @@ function TFMain.Init: Boolean; Result := True; end; -procedure TFMain.ReadOptions; +procedure TFMain.lb_domainsDblClick(Sender: TObject); +begin + mni_domain_open_dirClick(nil); +end; + +function TFMain.ReadOptions: Boolean; + + procedure outputOptions; + var + lbl: TLabel; + edit: TEdit; + number: TNumberBox; + optionIdentify: string; + value: Variant; + rowItem: TGridPanelLayout.TRowItem; + rowIndex, insertIndex: Integer; + begin + rowIndex := 0; + insertIndex := 0; + + {} + grdpnlyt_options.RowCollection.ClearAndResetID; + + {} + for optionIdentify in FDevilBoxControl.Options.Keys do + begin + if Pos('_SERVER', optionIdentify) = (Length(optionIdentify) - Length('_SERVER') + 1) then Continue; + + {Read Option} + FDevilBoxControl.Options.TryGetValue(optionIdentify, value); + + {Add Row} + rowItem := grdpnlyt_options.RowCollection.Add; + rowItem.SizeStyle := TGridPanelLayout.TSizeStyle.Absolute; + rowItem.Value := 28; + + {Label} + lbl := TLabel.Create(grdpnlyt_options); + lbl.Parent := grdpnlyt_options; + lbl.Text := optionIdentify + ': '; + lbl.Align := TAlignLayout.Client; + + {} + edit := TEdit.Create(grdpnlyt_options); + edit.Parent := grdpnlyt_options; + edit.Align := TAlignLayout.Client; + edit.TagString := optionIdentify; + edit.Text := value; + edit.OnChange := OnChangeOptionValue; + + {} + Inc(insertIndex); + end; + + grdpnlyt_options.Height := 10 + (rowItem.Value * insertIndex); + end; procedure outputModules; var @@ -383,13 +536,19 @@ procedure TFMain.ReadOptions; begin {Read Options} - FDevilBoxControl.ReadOptions; + if not (FDevilBoxControl.ReadOptions) then Exit; {Output Modules} outputModules; + + {Output Options} + outputOptions; + + {} + Result := True; end; -procedure TFMain.ReadDomains; +function TFMain.ReadDomains: Boolean; var domain: string; begin @@ -399,6 +558,8 @@ procedure TFMain.ReadDomains; lb_domains.Clear; for domain in FDevilBoxControl.Domains do lb_domains.Items.Add(domain); end; + + Result := (FDevilBoxControl.Domains.Count > 0); end; end. diff --git a/src/images/android-icon-144x144.png b/src/images/android-icon-144x144.png new file mode 100644 index 0000000..7453fdb Binary files /dev/null and b/src/images/android-icon-144x144.png differ diff --git a/src/images/android-icon-192x192.png b/src/images/android-icon-192x192.png new file mode 100644 index 0000000..37ac290 Binary files /dev/null and b/src/images/android-icon-192x192.png differ diff --git a/src/images/android-icon-36x36.png b/src/images/android-icon-36x36.png new file mode 100644 index 0000000..1f68aa5 Binary files /dev/null and b/src/images/android-icon-36x36.png differ diff --git a/src/images/android-icon-48x48.png b/src/images/android-icon-48x48.png new file mode 100644 index 0000000..4cc59cb Binary files /dev/null and b/src/images/android-icon-48x48.png differ diff --git a/src/images/android-icon-72x72.png b/src/images/android-icon-72x72.png new file mode 100644 index 0000000..ffc3ba4 Binary files /dev/null and b/src/images/android-icon-72x72.png differ diff --git a/src/images/android-icon-96x96.png b/src/images/android-icon-96x96.png new file mode 100644 index 0000000..18992a0 Binary files /dev/null and b/src/images/android-icon-96x96.png differ diff --git a/src/images/apple-icon-114x114.png b/src/images/apple-icon-114x114.png new file mode 100644 index 0000000..797c0a2 Binary files /dev/null and b/src/images/apple-icon-114x114.png differ diff --git a/src/images/apple-icon-120x120.png b/src/images/apple-icon-120x120.png new file mode 100644 index 0000000..19024d8 Binary files /dev/null and b/src/images/apple-icon-120x120.png differ diff --git a/src/images/apple-icon-144x144.png b/src/images/apple-icon-144x144.png new file mode 100644 index 0000000..7453fdb Binary files /dev/null and b/src/images/apple-icon-144x144.png differ diff --git a/src/images/apple-icon-152x152.png b/src/images/apple-icon-152x152.png new file mode 100644 index 0000000..cd9fb5d Binary files /dev/null and b/src/images/apple-icon-152x152.png differ diff --git a/src/images/apple-icon-180x180.png b/src/images/apple-icon-180x180.png new file mode 100644 index 0000000..cc4e213 Binary files /dev/null and b/src/images/apple-icon-180x180.png differ diff --git a/src/images/apple-icon-57x57.png b/src/images/apple-icon-57x57.png new file mode 100644 index 0000000..4f23037 Binary files /dev/null and b/src/images/apple-icon-57x57.png differ diff --git a/src/images/apple-icon-60x60.png b/src/images/apple-icon-60x60.png new file mode 100644 index 0000000..c50e0ca Binary files /dev/null and b/src/images/apple-icon-60x60.png differ diff --git a/src/images/apple-icon-72x72.png b/src/images/apple-icon-72x72.png new file mode 100644 index 0000000..ffc3ba4 Binary files /dev/null and b/src/images/apple-icon-72x72.png differ diff --git a/src/images/apple-icon-76x76.png b/src/images/apple-icon-76x76.png new file mode 100644 index 0000000..762898d Binary files /dev/null and b/src/images/apple-icon-76x76.png differ diff --git a/src/images/apple-icon-precomposed.png b/src/images/apple-icon-precomposed.png new file mode 100644 index 0000000..bd3a1c0 Binary files /dev/null and b/src/images/apple-icon-precomposed.png differ diff --git a/src/images/apple-icon.png b/src/images/apple-icon.png new file mode 100644 index 0000000..bd3a1c0 Binary files /dev/null and b/src/images/apple-icon.png differ diff --git a/src/images/apple-touch-icon.png b/src/images/apple-touch-icon.png new file mode 100644 index 0000000..dfdb248 Binary files /dev/null and b/src/images/apple-touch-icon.png differ diff --git a/src/images/favicon-16x16.png b/src/images/favicon-16x16.png new file mode 100644 index 0000000..3329597 Binary files /dev/null and b/src/images/favicon-16x16.png differ diff --git a/src/images/favicon-32x32.png b/src/images/favicon-32x32.png new file mode 100644 index 0000000..8d38573 Binary files /dev/null and b/src/images/favicon-32x32.png differ diff --git a/src/images/favicon-96x96.png b/src/images/favicon-96x96.png new file mode 100644 index 0000000..18992a0 Binary files /dev/null and b/src/images/favicon-96x96.png differ diff --git a/src/images/favicon.ico b/src/images/favicon.ico new file mode 100644 index 0000000..94c0726 Binary files /dev/null and b/src/images/favicon.ico differ diff --git a/src/images/ms-icon-144x144.png b/src/images/ms-icon-144x144.png new file mode 100644 index 0000000..7453fdb Binary files /dev/null and b/src/images/ms-icon-144x144.png differ diff --git a/src/images/ms-icon-150x150.png b/src/images/ms-icon-150x150.png new file mode 100644 index 0000000..4c26ede Binary files /dev/null and b/src/images/ms-icon-150x150.png differ diff --git a/src/images/ms-icon-310x310.png b/src/images/ms-icon-310x310.png new file mode 100644 index 0000000..61aa15a Binary files /dev/null and b/src/images/ms-icon-310x310.png differ diff --git a/src/images/ms-icon-70x70.png b/src/images/ms-icon-70x70.png new file mode 100644 index 0000000..da3b2e9 Binary files /dev/null and b/src/images/ms-icon-70x70.png differ diff --git a/src/modules/DevilBoxControl.pas b/src/modules/DevilBoxControl.pas index c1ed87a..d53c061 100644 --- a/src/modules/DevilBoxControl.pas +++ b/src/modules/DevilBoxControl.pas @@ -57,6 +57,8 @@ TDevilBoxControl = class(TObject) public {Options} function ReadOptions: Boolean; + function SetOption(const name, value: string): Boolean; + function GetOption(const name: string): string; {Domains} function ReadDomains: Boolean; @@ -64,6 +66,10 @@ TDevilBoxControl = class(TObject) function RemoveDomain(const name: string): Boolean; function OpenDomainDir(const name: string): string; + {} + function GetHostsFileName: string; + function SaveHosts: Boolean; + {Modules} function SetModuleState(const module: string; const active: Boolean): Boolean; function SetModuleVersion(const module, version: string): Boolean; @@ -78,7 +84,7 @@ TDevilBoxControl = class(TObject) {} function RebuildENV: Boolean; - function Build: Boolean; + function Build(const writeHosts: Boolean = True): Boolean; procedure Run(const needRemove: Boolean = True); procedure Stop; procedure CheckRunState; @@ -159,11 +165,11 @@ constructor TDevilBoxControl.Create(const dockerPath, workPath: string); destructor TDevilBoxControl.Destroy; begin - FreeAndNil(FHTTPClient); - FreeAndNil(FModules); - FreeAndNil(FOptions); - FreeAndNil(FDomains); - FreeAndNil(FStartedModules); + try FreeAndNil(FHTTPClient); except end; + try FreeAndNil(FModules); except end; + try FreeAndNil(FOptions); except end; + try FreeAndNil(FDomains); except end; + try FreeAndNil(FStartedModules); except end; end; { @@ -177,6 +183,8 @@ function TDevilBoxControl.ReadOptions: Boolean; moduleList: TArray; envLine, envOptionName, envOptionValue, moduleName, moduleServer: string; begin + Result := False; + {Check ENV file} if not (FileExists(FWorkPath + '.env')) then begin @@ -194,7 +202,7 @@ function TDevilBoxControl.ReadOptions: Boolean; begin envOptionName := envList.Names[i].Trim; envOptionValue := envList.ValueFromIndex[i].Trim; - if (Pos('#', envOptionName) = 1) or (envOptionValue.IsEmpty) then Continue; + if (Pos('#', envOptionName) = 1) or (envOptionName.IsEmpty) then Continue; FOptions.AddOrSetValue(envOptionName, envOptionValue); end; @@ -221,6 +229,20 @@ function TDevilBoxControl.ReadOptions: Boolean; Result := True; end; +function TDevilBoxControl.SetOption(const name, value: string): Boolean; +begin + FOptions.AddOrSetValue(UpperCase(name), value); + + Result := True; +end; + +function TDevilBoxControl.GetOption(const name: string): string; +var + value: Variant; +begin + if FOptions.TryGetValue(name, value) then Result := value; +end; + function TDevilBoxControl.RebuildENV: Boolean; var i: Integer; @@ -239,7 +261,7 @@ function TDevilBoxControl.RebuildENV: Boolean; {Read file} envList := TStringList.Create; envList.StrictDelimiter := True; - envList.LoadFromFile(FWorkPath + '.env', TEncoding.UTF8); + envList.LoadFromFile(FWorkPath + '.env'); {} serverList := []; @@ -262,7 +284,9 @@ function TDevilBoxControl.RebuildENV: Boolean; for optionName in FOptions.Keys do begin - if envOptionName <> optionName then Continue; + if (envOptionName <> optionName) + or (Pos('###', envList.Names[i]) = 1) then Continue; + optionValue := FOptions.Items[optionName]; if MatchStr(envOptionName, serverList) then @@ -274,13 +298,13 @@ function TDevilBoxControl.RebuildENV: Boolean; end else begin - envList.ValueFromIndex[i] := optionValue; + envList.ValueFromIndex[i] := IfThen(optionValue.IsEmpty, ' ', optionValue); end; end; end; {Save ENV file} - envList.SaveToFile(FWorkPath + '.env', TEncoding.UTF8); + envList.SaveToFile(FWorkPath + '.env'); end; { @@ -290,14 +314,17 @@ function TDevilBoxControl.RebuildENV: Boolean; function TDevilBoxControl.ReadDomains: Boolean; var DList, FList: TStringDynArray; - directory, fileName: string; + domainDirectory, directory, fileName: string; LSearchOption: TSearchOption; begin Result := False; + domainDirectory := FWorkPath + 'data' + PathDelim + 'www'; LSearchOption := TSearchOption.soTopDirectoryOnly; + if not (DirectoryExists(domainDirectory)) then Exit; + try - DList := TDirectory.GetDirectories(FWorkPath + 'data' + PathDelim + 'www', '*', LSearchOption); + DList := TDirectory.GetDirectories(domainDirectory, '*', LSearchOption); for directory in DList do FDomains.Add(ExtractFileName(directory)); Result := True; @@ -346,6 +373,87 @@ function TDevilBoxControl.OpenDomainDir(const name: string): string; RunCommand('open', path, ''); end; +{} + +function TDevilBoxControl.GetHostsFileName: string; + + {$IFDEF MSWINDOWS} + function getSysDir: string; + var + Buffer: array[0..MAX_PATH] of Char; + begin + GetSystemDirectory(Buffer, MAX_PATH - 1); + SetLength(Result, StrLen(Buffer)); + Result := Buffer; + end; + {$ENDIF} + +begin + {$IFDEF MSWINDOWS} + Result := IncludeTrailingPathDelimiter(getSysDir) + 'drivers\etc\hosts'; + {$ELSEIF LINUX} + Result := '\etc\hosts'; + {$ENDIF} +end; + +function TDevilBoxControl.SaveHosts: Boolean; +var + fileAttributes: TFileAttributes; + hostsList: TStringList; + i, j: Integer; + hostsFileName, startLine, endLine, hostLine: string; + startLineIndex, endLineIndex: Integer; +begin + hostsFileName := GetHostsFileName; + startLine := '# Start - DevilBox'; + endLine := '## End - DevilBox'; + + fileAttributes := []; + TFile.SetAttributes(hostsFileName, fileAttributes); + + {Write to file} + hostsList := TStringList.Create; + try + hostsList.LoadFromFile(hostsFileName); + + startLineIndex := hostsList.IndexOf(startLine); + endLineIndex := hostsList.IndexOf(endLine); + + {Remove section} + if (startLineIndex >= 0) and (endLineIndex >= 0) then + begin + for i := endLineIndex downto startLineIndex do hostsList.Delete(i); + end; + + {Add start line} + hostsList.Add(startLine); + + {} + for i := 0 to FDomains.Count - 1 do + begin + hostLine := '127.0.0.1 ' + FDomains[i] + '.' + GetOption('TLD_SUFFIX'); + if hostsList.IndexOf(hostLine) = -1 then hostsList.Add(hostLine); + end; + + {Add end line} + hostsList.Add(endLine); + + {Save list} + try + hostsList.SaveToFile(hostsFileName); + except + on e: Exception do ShowMessage('Error writing "host" file:' + #13#10 + e.Message); + end; + finally + FreeAndNil(hostsList); + end; + + {} + Include(fileAttributes, TFileAttribute.faSystem); + Include(fileAttributes, TFileAttribute.faReadOnly); + TFile.SetAttributes(hostsFileName, fileAttributes); +end; + { Module } @@ -574,10 +682,13 @@ function TDevilBoxControl.CheckJSON(const JSON, key: string): Boolean; } -function TDevilBoxControl.Build: Boolean; +function TDevilBoxControl.Build(const writeHosts: Boolean): Boolean; begin {Build options} RebuildENV; + + {Save hosts} + if writeHosts then SaveHosts; end; procedure TDevilBoxControl.Run(const needRemove: Boolean);