From 422792c92ddace5d4d63022b427ae288fe67ccec Mon Sep 17 00:00:00 2001 From: danieleteti Date: Sun, 19 Jun 2016 13:15:05 +0200 Subject: [PATCH] Removed some old Lua files --- CHANGES.TXT | 4 + samples/BasicDemo/BasicDemo.dproj | 440 +++++++++- samples/BasicDemo/Win32/Debug/BasicDemo.drc | 2 +- samples/angularjs/SAMPLETODO.FDB | Bin 2670592 -> 2670592 bytes samples/articles_crud/articles_crud.dproj | 617 ++++++++------ .../Win32/Debug/AuthenticateAuthorize.drc | 2 +- samples/data/ORDERSMANAGER.FDB | Bin 2998272 -> 2998272 bytes samples/winecellar/WINES.FDB | Bin 2670592 -> 2670592 bytes samples/winecellar/Win32/Debug/Lua/boot.lua | 18 - .../Win32/Debug/Lua/delphi/datasets.lua | 29 - .../Win32/Debug/Lua/delphi/delphiobjects.lua | 42 - samples/winecellar/Win32/Debug/Lua/dkjson.lua | 803 ------------------ samples/winecellar/Win32/Debug/Lua/dumper.lua | 233 ----- .../Win32/Debug/Lua/helper/view.lua | 5 - .../winecellar/Win32/Debug/Lua/html/form.lua | 5 - .../winecellar/Win32/Debug/Lua/html/test.lua | 2 - .../winecellar/Win32/Debug/Lua/inspect.lua | 243 ------ samples/winecellar/Win32/Debug/Lua/logger.lua | 2 - .../winecellar/Win32/Debug/Lua/logging.lua | 189 ----- .../Win32/Debug/Lua/logging/console.lua | 22 - .../Win32/Debug/Lua/logging/email.lua | 44 - .../Win32/Debug/Lua/logging/file.lua | 55 -- .../Win32/Debug/Lua/logging/rolling_file.lua | 81 -- .../Win32/Debug/Lua/logging/socket.lua | 35 - .../Win32/Debug/Lua/logging/sql.lua | 64 -- .../Win32/Debug/Lua/userlib/commons.lua | 149 ---- samples/winecellar/WineCellarServer.dproj | 618 ++++++++------ .../Win32/Debug/Lua/boot.lua | 18 - .../Win32/Debug/Lua/delphi/datasets.lua | 29 - .../Win32/Debug/Lua/delphi/delphiobjects.lua | 42 - .../Win32/Debug/Lua/dkjson.lua | 803 ------------------ .../Win32/Debug/Lua/dumper.lua | 233 ----- .../Win32/Debug/Lua/helper/view.lua | 5 - .../Win32/Debug/Lua/html/form.lua | 5 - .../Win32/Debug/Lua/html/test.lua | 2 - .../Win32/Debug/Lua/inspect.lua | 243 ------ .../Win32/Debug/Lua/logger.lua | 2 - .../Win32/Debug/Lua/logging.lua | 189 ----- .../Win32/Debug/Lua/logging/console.lua | 22 - .../Win32/Debug/Lua/logging/email.lua | 44 - .../Win32/Debug/Lua/logging/file.lua | 55 -- .../Win32/Debug/Lua/logging/rolling_file.lua | 81 -- .../Win32/Debug/Lua/logging/socket.lua | 35 - .../Win32/Debug/Lua/logging/sql.lua | 64 -- .../Win32/Debug/Lua/userlib/commons.lua | 149 ---- samples/winecellarclient/MainFormU.dfm | 8 + .../winecellarclient/WineCellarClient.dproj | 403 ++++++++- samples/winecellarclient/WineCellarClient.res | Bin 58716 -> 59012 bytes 48 files changed, 1580 insertions(+), 4556 deletions(-) delete mode 100644 samples/winecellar/Win32/Debug/Lua/boot.lua delete mode 100644 samples/winecellar/Win32/Debug/Lua/delphi/datasets.lua delete mode 100644 samples/winecellar/Win32/Debug/Lua/delphi/delphiobjects.lua delete mode 100644 samples/winecellar/Win32/Debug/Lua/dkjson.lua delete mode 100644 samples/winecellar/Win32/Debug/Lua/dumper.lua delete mode 100644 samples/winecellar/Win32/Debug/Lua/helper/view.lua delete mode 100644 samples/winecellar/Win32/Debug/Lua/html/form.lua delete mode 100644 samples/winecellar/Win32/Debug/Lua/html/test.lua delete mode 100644 samples/winecellar/Win32/Debug/Lua/inspect.lua delete mode 100644 samples/winecellar/Win32/Debug/Lua/logger.lua delete mode 100644 samples/winecellar/Win32/Debug/Lua/logging.lua delete mode 100644 samples/winecellar/Win32/Debug/Lua/logging/console.lua delete mode 100644 samples/winecellar/Win32/Debug/Lua/logging/email.lua delete mode 100644 samples/winecellar/Win32/Debug/Lua/logging/file.lua delete mode 100644 samples/winecellar/Win32/Debug/Lua/logging/rolling_file.lua delete mode 100644 samples/winecellar/Win32/Debug/Lua/logging/socket.lua delete mode 100644 samples/winecellar/Win32/Debug/Lua/logging/sql.lua delete mode 100644 samples/winecellar/Win32/Debug/Lua/userlib/commons.lua delete mode 100644 samples/winecellarWITHDORM/Win32/Debug/Lua/boot.lua delete mode 100644 samples/winecellarWITHDORM/Win32/Debug/Lua/delphi/datasets.lua delete mode 100644 samples/winecellarWITHDORM/Win32/Debug/Lua/delphi/delphiobjects.lua delete mode 100644 samples/winecellarWITHDORM/Win32/Debug/Lua/dkjson.lua delete mode 100644 samples/winecellarWITHDORM/Win32/Debug/Lua/dumper.lua delete mode 100644 samples/winecellarWITHDORM/Win32/Debug/Lua/helper/view.lua delete mode 100644 samples/winecellarWITHDORM/Win32/Debug/Lua/html/form.lua delete mode 100644 samples/winecellarWITHDORM/Win32/Debug/Lua/html/test.lua delete mode 100644 samples/winecellarWITHDORM/Win32/Debug/Lua/inspect.lua delete mode 100644 samples/winecellarWITHDORM/Win32/Debug/Lua/logger.lua delete mode 100644 samples/winecellarWITHDORM/Win32/Debug/Lua/logging.lua delete mode 100644 samples/winecellarWITHDORM/Win32/Debug/Lua/logging/console.lua delete mode 100644 samples/winecellarWITHDORM/Win32/Debug/Lua/logging/email.lua delete mode 100644 samples/winecellarWITHDORM/Win32/Debug/Lua/logging/file.lua delete mode 100644 samples/winecellarWITHDORM/Win32/Debug/Lua/logging/rolling_file.lua delete mode 100644 samples/winecellarWITHDORM/Win32/Debug/Lua/logging/socket.lua delete mode 100644 samples/winecellarWITHDORM/Win32/Debug/Lua/logging/sql.lua delete mode 100644 samples/winecellarWITHDORM/Win32/Debug/Lua/userlib/commons.lua diff --git a/CHANGES.TXT b/CHANGES.TXT index d1ea94bc..3a92966e 100644 --- a/CHANGES.TXT +++ b/CHANGES.TXT @@ -12,3 +12,7 @@ - some minor bug fixes in the objectsmappers - added new build system based on a python script - added more unit tests + + +- added support for JWT +- added auth middleware based on JWT \ No newline at end of file diff --git a/samples/BasicDemo/BasicDemo.dproj b/samples/BasicDemo/BasicDemo.dproj index 9e662068..451affa1 100644 --- a/samples/BasicDemo/BasicDemo.dproj +++ b/samples/BasicDemo/BasicDemo.dproj @@ -1,7 +1,7 @@  {7B54055A-5749-4136-9FE2-35FDBEEA874C} - 15.4 + 18.1 VCL BasicDemo.dpr True @@ -13,6 +13,26 @@ true + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + true Base @@ -40,6 +60,7 @@ true + $(BDS)\bin\delphi_PROJECTICNS.icns BasicDemo ..\..\lib\delphistompclient;$(DCC_UnitSearchPath) CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= @@ -55,6 +76,85 @@ false false + + true + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png + $(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png + true + true + true + true + true + $(BDS)\bin\Artwork\Android\FM_SplashImage_640x480.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png + true + $(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png + $(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png + Debug + android-support-v4.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services.dex.jar + true + true + true + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey= + + + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + true + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(MSBuildProjectName) + iPhoneAndiPad + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;FMLocalNotificationPermission=false;UIBackgroundModes= + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + Debug + + + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + true + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(MSBuildProjectName) + iPhoneAndiPad + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;FMLocalNotificationPermission=false;UIBackgroundModes= + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + Debug + + + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + true + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;FMLocalNotificationPermission=false;UIBackgroundModes= + iPhoneAndiPad + ..\..\lib\fastmm;..\..\sources;..\..\lib\LuaDelphiBinding;..\..\lib\objectmapper;..\..\lib\iocpdelphiframework;..\..\lib\iocpdelphiframework\base;$(DCC_UnitSearchPath) Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) @@ -155,8 +255,343 @@ Microsoft Office XP Sample Automation Server Wrapper Components - + + + + 0 + .dll;.bpl + + + 1 + .dylib + + + + + Contents\Resources + 1 + + + + + classes + 1 + + + + + Contents\MacOS + 0 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + res\drawable-xxhdpi + 1 + + + + + library\lib\mips + 1 + + + + + 1 + + + 1 + + + 0 + + + 1 + + + 1 + + + library\lib\armeabi-v7a + 1 + + + 1 + + + + + 0 + + + 1 + .framework + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + 1 + + + 1 + + + 1 + + + + + + library\lib\armeabi + 1 + + + + + 0 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + res\drawable-normal + 1 + + + + + res\drawable-xhdpi + 1 + + + + + res\drawable-large + 1 + + + + + 1 + + + 1 + + + 1 + + + + + + res\drawable-hdpi + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + + + 1 + + + 1 + + + 1 + + + + + res\values + 1 + + + + + res\drawable-small + 1 + + + + + res\drawable + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + + + res\drawable + 1 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + library\lib\armeabi-v7a + 1 + + + + + 0 + .bpl + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-xlarge + 1 + + + + + res\drawable-ldpi + 1 + + + + + + + + + + + + + False + False + False + False + False True False @@ -165,4 +600,5 @@ + diff --git a/samples/BasicDemo/Win32/Debug/BasicDemo.drc b/samples/BasicDemo/Win32/Debug/BasicDemo.drc index 7ffbe5af..b06b3b96 100644 --- a/samples/BasicDemo/Win32/Debug/BasicDemo.drc +++ b/samples/BasicDemo/Win32/Debug/BasicDemo.drc @@ -1672,4 +1672,4 @@ END /* D:\DEV\dmvcframework\samples\BasicDemo\WebModuleUnit1.dfm */ /* D:\DEV\dmvcframework\samples\BasicDemo\BasicDemo.res */ -/* C:\Users\Daniele\AppData\Local\Temp\dtfAB0.tmp */ +/* D:\DEV\dmvcframework\samples\BasicDemo\BasicDemo.drf */ diff --git a/samples/angularjs/SAMPLETODO.FDB b/samples/angularjs/SAMPLETODO.FDB index bd753796d815956f45f8589fed9daaf051044155..608a53affa01915b63e5049fa692ae5a99fe496e 100644 GIT binary patch delta 374 zcmX|-ze_@K6vgjX-?NumYMPc>YELU@$>Jal8OnAj8A(GJK37hMy5&3^Rg^5MzWf$_O(ej3{G_ zG0uoF;x#1hvm#v1MXb1y*l2`J_er*7ChF#dVv1%()mLll`c<}M=yfA0N2zkoZ+#R! ziWR*{>Nb&Svy=qf9 WT56lb>7i9fNhT#z4XZG{v-}Ipvu9cW delta 325 zcmXxfyG{aO6a?V&v%6fpA#za!WO2bur^UqBuxM+c=nL3TSlE!*;#!Q@849wt##$2+ zk=8fx3DnXU3$Y_H5PxHwlP{;4W<2jkd77nUbM32T5bfC&{IyU8u$CBQPa;p7M {41237016-48D9-45F1-8FFC-66D1B61A206B} - 17.2 + 18.1 VCL articles_crud.dpr True @@ -13,6 +13,26 @@ true + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + true Base @@ -56,6 +76,85 @@ false false + + $(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png + $(BDS)\bin\Artwork\Android\FM_SplashImage_640x480.png + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey= + true + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png + true + $(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png + true + true + true + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png + true + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png + android-support-v4.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services.dex.jar + true + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png + Debug + true + $(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png + true + true + + + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + iPhoneAndiPad + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + true + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(MSBuildProjectName) + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + Debug + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;FMLocalNotificationPermission=false;UIBackgroundModes= + + + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + iPhoneAndiPad + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + true + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(MSBuildProjectName) + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + Debug + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;FMLocalNotificationPermission=false;UIBackgroundModes= + + + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + iPhoneAndiPad + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + true + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;FMLocalNotificationPermission=false;UIBackgroundModes= + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + ..\..\lib\iocpdelphiframework\Base;..\..\lib\delphistompclient;..\..\lib\luadelphibinding;$(DCC_UnitSearchPath) bin @@ -157,51 +256,97 @@ Microsoft Office XP Sample Automation Server Wrapper Components - - - + + + + + Contents\Resources 1 - .dylib + + + + classes + 1 + + + + + res\drawable-xxhdpi + 1 + + + + Contents\MacOS 0 - .bpl 1 - .dylib + + + + library\lib\mips + 1 + + + 1 - .dylib - - 1 - .dylib - - - - - 1 - .dylib - - - 0 - .dll;.bpl - - - 1 - - 1 - 1 - + + + 1 + + + 1 + + + 0 + + + 1 + + + 1 + + + library\lib\armeabi-v7a + 1 + + + 1 + + + + + 0 + + + 1 + .framework + + + + + 1 + + + 1 + + + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF @@ -212,256 +357,90 @@ 1 + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + + library\lib\armeabi + 1 + + + + + 0 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + res\drawable-normal 1 - - - library\lib\x86 - 1 - - - - - 1 - - - 1 - - - 1 - - - - - - library\lib\armeabi-v7a - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable-xlarge - 1 - - res\drawable-xhdpi 1 - - - 1 - - - 1 - - - 1 - - - - - res\drawable-xxhdpi - 1 - - - - - library\lib\mips - 1 - - - - - res\drawable - 1 - - - - - 1 - - - 1 - - - 0 - - - - - 1 - .framework - - - 0 - - - - - res\drawable-small - 1 - - - - - - 1 - - - Contents\MacOS - 0 - - - - - classes - 1 - - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable - 1 - - - - - Contents\Resources - 1 - - - - - - 1 - - - 1 - - - 1 - - - - - library\lib\armeabi-v7a - 1 - - - 1 - - - 0 - - - 1 - - - 1 - - - 1 - - - - - library\lib\armeabi - 1 - - res\drawable-large 1 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - + 1 - + 1 1 - + + - res\drawable-ldpi - 1 - - - - - res\values - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable-mdpi + library\lib\armeabi-v7a 1 @@ -471,20 +450,150 @@ 1 + + + + + 1 + + + 1 + + + 1 + + + + + res\values + 1 + + + + + res\drawable-small + 1 + + + + + res\drawable + 1 + + + + + 1 + + + 1 + + + 1 + + 1 + + + res\drawable + 1 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + library\lib\armeabi-v7a + 1 + + + + + 0 + .bpl + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-xlarge + 1 + + + + + res\drawable-ldpi + 1 + + + + + 0 + .dll;.bpl + + + 1 + .dylib + + - - - - + + + + + + False + False + False + False + False True False diff --git a/samples/authenticationauthorization/Win32/Debug/AuthenticateAuthorize.drc b/samples/authenticationauthorization/Win32/Debug/AuthenticateAuthorize.drc index 2257f1cd..64abf861 100644 --- a/samples/authenticationauthorization/Win32/Debug/AuthenticateAuthorize.drc +++ b/samples/authenticationauthorization/Win32/Debug/AuthenticateAuthorize.drc @@ -1672,4 +1672,4 @@ END /* D:\DEV\dmvcframework\samples\authenticationauthorization\WebModuleUnit1.dfm */ /* D:\DEV\dmvcframework\samples\authenticationauthorization\AuthenticateAuthorize.res */ -/* C:\Users\Daniele\AppData\Local\Temp\dtf15A.tmp */ +/* C:\Users\Daniele\AppData\Local\Temp\dtf6722.tmp */ diff --git a/samples/data/ORDERSMANAGER.FDB b/samples/data/ORDERSMANAGER.FDB index 665f617242204ec28085267bf5724edd456f4b3f..dd0c2887b8bd667f78245d575f571c07bc2b1a0a 100644 GIT binary patch delta 402 zcmYk&y)Q#i7{~GF+}^8IwCbf^tL?3Nmyq-~hHaKmWmij`~$rmepn>LK*Uso ze*kx_zrdu6%^(H|ledsKi13_zrsw3FljAt9ax_cH(7?*B6%8$zqQ_A0*COx77vbkT z2t^o#hcF3?C?mXtk0>YnLWF$GOf(RUL=(|Wv=FUCglHq8 zM2v`^!M@C?Mb~odHnlfC?sF4)`)YKfXm1n~=f!rjn3()}*S~S3N>1ZrvNbj&(mo>9 z_ORROB)8+nyt#jPl8og7l`@rGUs_wuu4iNESx5fPy$l{0zcE9URZ`_oo)3A;t6P0- z`uh`p_DVgzim{{KM42CAc_f`qJ&4~Yb2FLDL@bs1t2%Ngs^&Kv6df)rDesH=>fUTF Y7m`|s)~R)A-CB>e2oKRf z7=%eQ5>14cXeN9_3(-pWi8i902oOP{gRqEBB1D9V2+>7!6Fo#P(MLpyeqw+aBx09{ z-{jT2YdZ0Mu%^>PahqY5B~KlnzgAUp{2X=2|ARJh-y8vHsh$IY<8L zO>eaPPtz$EKf$8vep1hmwef1FK1HSe|5q=sqPD-pY>?@?*W2plUG{d$wq`_=(2Q!v PG~=42CgtvwCk~?DJGp4_ diff --git a/samples/winecellar/WINES.FDB b/samples/winecellar/WINES.FDB index 56b871464e1877adcefdd6293300ba331701a33f..34529840469b509896c5f83d7ca37cd1d7f7d4f6 100644 GIT binary patch delta 268 zcmYMqPfo%>6vy$IDYas)1qFrrzkqJtl8|&xK++Xkuiy%F7(qJyd^yxDa|D{9Y{iO~20&mS-N%bwne(@o`g5QTkDEhex zl37G${+=!C?6uA$6g;%x;{X8;(Z&%%93#RBVsy~ODbCPCALqEh07E3W#1*b_gInC; kzN)h{&~jV(CVlbNTKh6C^VQ6{)Vh&%W9uf?Jy`en1Gy|*vj6}9 delta 262 zcmYMqISK+n5QX9H8Fk#oecv6o)Kn1069`78UcnnQh^=@H4+>T=B0(O4+}(XRmPx@0PS)LcG@x@pQfq4PnunFi56$ud9o{3;aXi zOIWZGK@>4Kh$Dd{Qb@x^23h2gM*&5YP(}q+)KEtQO|;NP2VL~gzX!hOEadSXRo>RV Uu1<4pJZ%Qr47C|)GuCGE0ZGwY0ssI2 diff --git a/samples/winecellar/Win32/Debug/Lua/boot.lua b/samples/winecellar/Win32/Debug/Lua/boot.lua deleted file mode 100644 index adda0a8b..00000000 --- a/samples/winecellar/Win32/Debug/Lua/boot.lua +++ /dev/null @@ -1,18 +0,0 @@ -require "Lua.helper.view" ---[[require "Lua.delphi.datasets"]] -dump = require "Lua.inspect" -json = require "dkjson" - -function htmlize(s) - s = s:gsub('&', '&') - s = s:gsub('<', '<') - s = s:gsub('>', '>') - if s == ' ' then - s = ' ' - end - return s -end - -function dumppre(value) - return '
' .. htmlize(dump(value)) .. '
' -end \ No newline at end of file diff --git a/samples/winecellar/Win32/Debug/Lua/delphi/datasets.lua b/samples/winecellar/Win32/Debug/Lua/delphi/datasets.lua deleted file mode 100644 index e6ed954c..00000000 --- a/samples/winecellar/Win32/Debug/Lua/delphi/datasets.lua +++ /dev/null @@ -1,29 +0,0 @@ -function open_dataset(ud) - _dataset_open(ud); - m = { - pointer = ud, - eof = function() - return _dataset_eof(ud) - end, - movenext = function() - _dataset_move_next(ud) - end, - get = function(fieldname) - return _dataset_field_by_name(ud, fieldname) - end, - close = function() - _dataset_close(ud) - end, - first = function() - _dataset_first(ud) - end, - is_open = function() - return _dataset_is_open(ud) - end, - open = function() - _dataset_open(ud) - end - }; - - return m; -end \ No newline at end of file diff --git a/samples/winecellar/Win32/Debug/Lua/delphi/delphiobjects.lua b/samples/winecellar/Win32/Debug/Lua/delphi/delphiobjects.lua deleted file mode 100644 index a33fb9a7..00000000 --- a/samples/winecellar/Win32/Debug/Lua/delphi/delphiobjects.lua +++ /dev/null @@ -1,42 +0,0 @@ -function connect_to_delphi_object(ud) - m = { - pointer = ud, - }; - - meta = { - __index = function (self, name) - if _delphi_is_a_property(ud, name) then - return _delphi_call_method(ud,name,{maxindex = -1}) - else - return function(...) - local parent_table = self - local method_name = name - local methodargs = {} - local index = 0 - for k,v in ipairs(arg) do - methodargs['_'..tostring(index)] = v - index = index + 1 - end - methodargs['maxindex'] = index - 1 - logger:debug("Ecco i parametri:") - logger:debug(methodargs) - return _delphi_call_method(ud,method_name,methodargs) - end - end - end, - - __newindex = function (self, key, value) - logger:debug("setting "..key.." to "..tostring(value)) - return _delphi_set_property(ud, key, value) - end - } - - setmetatable(m, meta); - - return m; -end - -function create_delphi_object(ClassName, ...) - return connect_to_delphi_object(_delphi_create_object(ClassName, ...)) -end - diff --git a/samples/winecellar/Win32/Debug/Lua/dkjson.lua b/samples/winecellar/Win32/Debug/Lua/dkjson.lua deleted file mode 100644 index 4e1dd040..00000000 --- a/samples/winecellar/Win32/Debug/Lua/dkjson.lua +++ /dev/null @@ -1,803 +0,0 @@ - -- Module options: - local always_try_using_lpeg = false - local register_global_module_table = false - local global_module_name = 'json' - - --[==[ - -David Kolf's JSON module for Lua 5.1/5.2 -======================================== - -*Version 2.3* - -In the default configuration this module writes no global values, not even -the module table. Import it using - - json = require ("dkjson") - -In environments where `require` or a similiar function are not available -and you cannot receive the return value of the module, you can set the -option `register_global_module_table` to `true`. The module table will -then be saved in the global variable with the name given by the option -`global_module_name`. - -Exported functions and values: - -`json.encode (object [, state])` --------------------------------- - -Create a string representing the object. `Object` can be a table, -a string, a number, a boolean, `nil`, `json.null` or any object with -a function `__tojson` in its metatable. A table can only use strings -and numbers as keys and its values have to be valid objects as -well. It raises an error for any invalid data types or reference -cycles. - -`state` is an optional table with the following fields: - - - `indent` - When `indent` (a boolean) is set, the created string will contain - newlines and indentations. Otherwise it will be one long line. - - `keyorder` - `keyorder` is an array to specify the ordering of keys in the - encoded output. If an object has keys which are not in this array - they are written after the sorted keys. - - `level` - This is the initial level of indentation used when `indent` is - set. For each level two spaces are added. When absent it is set - to 0. - - `buffer` - `buffer` is an array to store the strings for the result so they - can be concatenated at once. When it isn't given, the encode - function will create it temporary and will return the - concatenated result. - - `bufferlen` - When `bufferlen` is set, it has to be the index of the last - element of `buffer`. - - `tables` - `tables` is a set to detect reference cycles. It is created - temporary when absent. Every table that is currently processed - is used as key, the value is `true`. - -When `state.buffer` was set, the return value will be `true` on -success. Without `state.buffer` the return value will be a string. - -`json.decode (string [, position [, null]])` --------------------------------------------- - -Decode `string` starting at `position` or at 1 if `position` was -omitted. - -`null` is an optional value to be returned for null values. The -default is `nil`, but you could set it to `json.null` or any other -value. - -The return values are the object or `nil`, the position of the next -character that doesn't belong to the object, and in case of errors -an error message. - -Two metatables are created. Every array or object that is decoded gets -a metatable with the `__jsontype` field set to either `array` or -`object`. If you want to provide your own metatables use the syntax - - json.decode (string, position, null, objectmeta, arraymeta) - -To prevent the assigning of metatables pass `nil`: - - json.decode (string, position, null, nil) - -`.__jsonorder` -------------------------- - -`__jsonorder` can overwrite the `keyorder` for a specific table. - -`.__jsontype` ------------------------- - -`__jsontype` can be either `"array"` or `"object"`. This value is only -checked for empty tables. (The default for empty tables is `"array"`). - -`.__tojson (self, state)` ------------------------------------- - -You can provide your own `__tojson` function in a metatable. In this -function you can either add directly to the buffer and return true, -or you can return a string. On errors nil and a message should be -returned. - -`json.null` ------------ - -You can use this value for setting explicit `null` values. - -`json.version` --------------- - -Set to `"dkjson 2.3"`. - -`json.quotestring (string)` ---------------------------- - -Quote a UTF-8 string and escape critical characters using JSON -escape sequences. This function is only necessary when you build -your own `__tojson` functions. - -`json.addnewline (state)` -------------------------- - -When `state.indent` is set, add a newline to `state.buffer` and spaces -according to `state.level`. - -LPeg support ------------- - -When the local configuration variable `always_try_using_lpeg` is set, -this module tries to load LPeg to replace the `decode` function. The -speed increase is significant. You can get the LPeg module at - . -When LPeg couldn't be loaded, the pure Lua functions stay active. - -In case you don't want this module to require LPeg on its own, -disable the option `always_try_using_lpeg` in the options section at -the top of the module. - -In this case you can later load LPeg support using - -### `json.use_lpeg ()` - -Require the LPeg module and replace the functions `quotestring` and -and `decode` with functions that use LPeg patterns. -This function returns the module table, so you can load the module -using: - - json = require "dkjson".use_lpeg() - -Alternatively you can use `pcall` so the JSON module still works when -LPeg isn't found. - - json = require "dkjson" - pcall (json.use_lpeg) - -### `json.using_lpeg` - -This variable is set to `true` when LPeg was loaded successfully. - ---------------------------------------------------------------------- - -Contact -------- - -You can contact the author by sending an e-mail to 'david' at the -domain 'dkolf.de'. - ---------------------------------------------------------------------- - -*Copyright (C) 2010-2013 David Heiko Kolf* - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - - diff --git a/samples/winecellar/Win32/Debug/Lua/dumper.lua b/samples/winecellar/Win32/Debug/Lua/dumper.lua deleted file mode 100644 index cc18b862..00000000 --- a/samples/winecellar/Win32/Debug/Lua/dumper.lua +++ /dev/null @@ -1,233 +0,0 @@ ---[[ DataDumper.lua -Copyright (c) 2007 Olivetti-Engineering SA - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. -]] - -local dumplua_closure = [[ -local closures = {} -local function closure(t) - closures[#closures+1] = t - t[1] = assert(loadstring(t[1])) - return t[1] -end - -for _,t in pairs(closures) do - for i = 2,#t do - debug.setupvalue(t[1], i-1, t[i]) - end -end -]] - -local lua_reserved_keywords = { - 'and', 'break', 'do', 'else', 'elseif', 'end', 'false', 'for', - 'function', 'if', 'in', 'local', 'nil', 'not', 'or', 'repeat', - 'return', 'then', 'true', 'until', 'while' } - -local function keys(t) - local res = {} - local oktypes = { stringstring = true, numbernumber = true } - local function cmpfct(a,b) - if oktypes[type(a)..type(b)] then - return a < b - else - return type(a) < type(b) - end - end - for k in pairs(t) do - res[#res+1] = k - end - table.sort(res, cmpfct) - return res -end - -local c_functions = {} -for _,lib in pairs{'_G', 'string', 'table', 'math', - 'io', 'os', 'coroutine', 'package', 'debug'} do - local t = _G[lib] or {} - lib = lib .. "." - if lib == "_G." then lib = "" end - for k,v in pairs(t) do - if type(v) == 'function' and not pcall(string.dump, v) then - c_functions[v] = lib..k - end - end -end - -function DataDumper(value, varname, fastmode, ident) - local defined, dumplua = {} - -- Local variables for speed optimization - local string_format, type, string_dump, string_rep = - string.format, type, string.dump, string.rep - local tostring, pairs, table_concat = - tostring, pairs, table.concat - local keycache, strvalcache, out, closure_cnt = {}, {}, {}, 0 - setmetatable(strvalcache, {__index = function(t,value) - local res = string_format('%q', value) - t[value] = res - return res - end}) - local fcts = { - string = function(value) return strvalcache[value] end, - number = function(value) return value end, - boolean = function(value) return tostring(value) end, - ['nil'] = function(value) return 'nil' end, - ['function'] = function(value) - return string_format("loadstring(%q)", string_dump(value)) - end, - userdata = function() error("Cannot dump userdata") end, - thread = function() error("Cannot dump threads") end, - } - local function test_defined(value, path) - if defined[value] then - if path:match("^getmetatable.*%)$") then - out[#out+1] = string_format("s%s, %s)\n", path:sub(2,-2), defined[value]) - else - out[#out+1] = path .. " = " .. defined[value] .. "\n" - end - return true - end - defined[value] = path - end - local function make_key(t, key) - local s - if type(key) == 'string' and key:match('^[_%a][_%w]*$') then - s = key .. "=" - else - s = "[" .. dumplua(key, 0) .. "]=" - end - t[key] = s - return s - end - for _,k in ipairs(lua_reserved_keywords) do - keycache[k] = '["'..k..'"] = ' - end - if fastmode then - fcts.table = function (value) - -- Table value - local numidx = 1 - out[#out+1] = "{" - for key,val in pairs(value) do - if key == numidx then - numidx = numidx + 1 - else - out[#out+1] = keycache[key] - end - local str = dumplua(val) - out[#out+1] = str.."," - end - if string.sub(out[#out], -1) == "," then - out[#out] = string.sub(out[#out], 1, -2); - end - out[#out+1] = "}" - return "" - end - else - fcts.table = function (value, ident, path) - if test_defined(value, path) then return "nil" end - -- Table value - local sep, str, numidx, totallen = " ", {}, 1, 0 - local meta, metastr = (debug or getfenv()).getmetatable(value) - if meta then - ident = ident + 1 - metastr = dumplua(meta, ident, "getmetatable("..path..")") - totallen = totallen + #metastr + 16 - end - for _,key in pairs(keys(value)) do - local val = value[key] - local s = "" - local subpath = path - if key == numidx then - subpath = subpath .. "[" .. numidx .. "]" - numidx = numidx + 1 - else - s = keycache[key] - if not s:match "^%[" then subpath = subpath .. "." end - subpath = subpath .. s:gsub("%s*=%s*$","") - end - s = s .. dumplua(val, ident+1, subpath) - str[#str+1] = s - totallen = totallen + #s + 2 - end - if totallen > 80 then - sep = "\n" .. string_rep(" ", ident+1) - end - str = "{"..sep..table_concat(str, ","..sep).." "..sep:sub(1,-3).."}" - if meta then - sep = sep:sub(1,-3) - return "setmetatable("..sep..str..","..sep..metastr..sep:sub(1,-3)..")" - end - return str - end - fcts['function'] = function (value, ident, path) - if test_defined(value, path) then return "nil" end - if c_functions[value] then - return c_functions[value] - elseif debug == nil or debug.getupvalue(value, 1) == nil then - return string_format("loadstring(%q)", string_dump(value)) - end - closure_cnt = closure_cnt + 1 - local res = {string.dump(value)} - for i = 1,math.huge do - local name, v = debug.getupvalue(value,i) - if name == nil then break end - res[i+1] = v - end - return "closure " .. dumplua(res, ident, "closures["..closure_cnt.."]") - end - end - function dumplua(value, ident, path) - return fcts[type(value)](value, ident, path) - end - if varname == nil then - varname = "return " - elseif varname:match("^[%a_][%w_]*$") then - varname = varname .. " = " - end - if fastmode then - setmetatable(keycache, {__index = make_key }) - out[1] = varname - table.insert(out,dumplua(value, 0)) - return table.concat(out) - else - setmetatable(keycache, {__index = make_key }) - local items = {} - for i=1,10 do items[i] = '' end - items[3] = dumplua(value, ident or 0, "t") - if closure_cnt > 0 then - items[1], items[6] = dumplua_closure:match("(.*\n)\n(.*)") - out[#out+1] = "" - end - if #out > 0 then - items[2], items[4] = "local t = ", "\n" - items[5] = table.concat(out) - items[7] = varname .. "t" - else - items[2] = varname - end - return table.concat(items) - end -end - -function dump(value) - return '
'..DataDumper(value)..'
' -end \ No newline at end of file diff --git a/samples/winecellar/Win32/Debug/Lua/helper/view.lua b/samples/winecellar/Win32/Debug/Lua/helper/view.lua deleted file mode 100644 index 6d3e7835..00000000 --- a/samples/winecellar/Win32/Debug/Lua/helper/view.lua +++ /dev/null @@ -1,5 +0,0 @@ -require "Lua.logger" - -function _out(value) - response:out(tostring(value)) -end diff --git a/samples/winecellar/Win32/Debug/Lua/html/form.lua b/samples/winecellar/Win32/Debug/Lua/html/form.lua deleted file mode 100644 index d2240f42..00000000 --- a/samples/winecellar/Win32/Debug/Lua/html/form.lua +++ /dev/null @@ -1,5 +0,0 @@ -html = {} - -function html:input(type, value) - return string.format('', type, value) -end \ No newline at end of file diff --git a/samples/winecellar/Win32/Debug/Lua/html/test.lua b/samples/winecellar/Win32/Debug/Lua/html/test.lua deleted file mode 100644 index 1d3a7e0c..00000000 --- a/samples/winecellar/Win32/Debug/Lua/html/test.lua +++ /dev/null @@ -1,2 +0,0 @@ -require "..\\helper\\view" -require "form" diff --git a/samples/winecellar/Win32/Debug/Lua/inspect.lua b/samples/winecellar/Win32/Debug/Lua/inspect.lua deleted file mode 100644 index 6320f916..00000000 --- a/samples/winecellar/Win32/Debug/Lua/inspect.lua +++ /dev/null @@ -1,243 +0,0 @@ ------------------------------------------------------------------------------------------------------------------------ --- inspect.lua - v1.2.1 (2013-01) --- Enrique García Cota - enrique.garcia.cota [AT] gmail [DOT] com --- human-readable representations of tables. --- inspired by http://lua-users.org/wiki/TableSerialization ------------------------------------------------------------------------------------------------------------------------ - -local inspect ={} -inspect.__VERSION = '1.2.0' - --- Apostrophizes the string if it has quotes, but not aphostrophes --- Otherwise, it returns a regular quoted string -local function smartQuote(str) - if string.match( string.gsub(str,"[^'\"]",""), '^"+$' ) then - return "'" .. str .. "'" - end - return string.format("%q", str ) -end - -local controlCharsTranslation = { - ["\a"] = "\\a", ["\b"] = "\\b", ["\f"] = "\\f", ["\n"] = "\\n", - ["\r"] = "\\r", ["\t"] = "\\t", ["\v"] = "\\v", ["\\"] = "\\\\" -} - -local function unescapeChar(c) return controlCharsTranslation[c] end - -local function unescape(str) - local result, _ = string.gsub( str, "(%c)", unescapeChar ) - return result -end - -local function isIdentifier(str) - return type(str) == 'string' and str:match( "^[_%a][_%a%d]*$" ) -end - -local function isArrayKey(k, length) - return type(k)=='number' and 1 <= k and k <= length -end - -local function isDictionaryKey(k, length) - return not isArrayKey(k, length) -end - -local sortOrdersByType = { - ['number'] = 1, ['boolean'] = 2, ['string'] = 3, ['table'] = 4, - ['function'] = 5, ['userdata'] = 6, ['thread'] = 7 -} - -local function sortKeys(a,b) - local ta, tb = type(a), type(b) - if ta ~= tb then return sortOrdersByType[ta] < sortOrdersByType[tb] end - if ta == 'string' or ta == 'number' then return a < b end - return false -end - -local function getDictionaryKeys(t) - local length = #t - local keys = {} - for k,_ in pairs(t) do - if isDictionaryKey(k, length) then table.insert(keys,k) end - end - table.sort(keys, sortKeys) - return keys -end - -local function getToStringResultSafely(t, mt) - local __tostring = type(mt) == 'table' and rawget(mt, '__tostring') - local string, status - if type(__tostring) == 'function' then - status, string = pcall(__tostring, t) - string = status and string or 'error: ' .. tostring(string) - end - return string -end - -local Inspector = {} - -function Inspector:new(t, depth) - local inspector = { - buffer = {}, - depth = depth, - level = 0, - maxIds = { - ['function'] = 0, - ['userdata'] = 0, - ['thread'] = 0, - ['table'] = 0 - }, - ids = { - ['function'] = setmetatable({}, {__mode = "kv"}), - ['userdata'] = setmetatable({}, {__mode = "kv"}), - ['thread'] = setmetatable({}, {__mode = "kv"}), - ['table'] = setmetatable({}, {__mode = "kv"}) - }, - tableAppearances = setmetatable({}, {__mode = "k"}) - } - - setmetatable(inspector, {__index = Inspector}) - - inspector:countTableAppearances(t) - - return inspector:putValue(t) -end - -function Inspector:countTableAppearances(t) - if type(t) == 'table' then - if not self.tableAppearances[t] then - self.tableAppearances[t] = 1 - for k,v in pairs(t) do - self:countTableAppearances(k) - self:countTableAppearances(v) - end - self:countTableAppearances(getmetatable(t)) - else - self.tableAppearances[t] = self.tableAppearances[t] + 1 - end - end -end - -function Inspector:tabify() - self:puts("\n", string.rep(" ", self.level)) - return self -end - -function Inspector:up() - self.level = self.level - 1 -end - -function Inspector:down() - self.level = self.level + 1 -end - -function Inspector:puts(...) - local args = {...} - local len = #self.buffer - for i=1, #args do - len = len + 1 - self.buffer[len] = tostring(args[i]) - end - return self -end - -function Inspector:commaControl(comma) - if comma then self:puts(',') end - return true -end - -function Inspector:putTable(t) - if self:alreadyVisited(t) then - self:puts('') - elseif self.depth and self.level >= self.depth then - self:puts('{...}') - else - if self.tableAppearances[t] > 1 then - self:puts('<',self:getId(t),'>') - end - self:puts('{') - self:down() - - local length = #t - local mt = getmetatable(t) - - local string = getToStringResultSafely(t, mt) - if type(string) == 'string' and #string > 0 then - self:puts(' -- ', unescape(string)) - if length >= 1 then self:tabify() end -- tabify the array values - end - - local comma = false - for i=1, length do - comma = self:commaControl(comma) - self:puts(' '):putValue(t[i]) - end - - local dictKeys = getDictionaryKeys(t) - - for _,k in ipairs(dictKeys) do - comma = self:commaControl(comma) - self:tabify():putKey(k):puts(' = '):putValue(t[k]) - end - - if mt then - comma = self:commaControl(comma) - self:tabify():puts(' = '):putValue(mt) - end - - self:up() - - if #dictKeys > 0 or mt then -- dictionary table. Justify closing } - self:tabify() - elseif length > 0 then -- array tables have one extra space before closing } - self:puts(' ') - end - self:puts('}') - end - return self -end - -function Inspector:alreadyVisited(v) - return self.ids[type(v)][v] ~= nil -end - -function Inspector:getId(v) - local tv = type(v) - local id = self.ids[tv][v] - if not id then - id = self.maxIds[tv] + 1 - self.maxIds[tv] = id - self.ids[tv][v] = id - end - return id -end - -function Inspector:putValue(v) - local tv = type(v) - - if tv == 'string' then - self:puts(smartQuote(unescape(v))) - elseif tv == 'number' or tv == 'boolean' or tv == 'nil' then - self:puts(tostring(v)) - elseif tv == 'table' then - self:putTable(v) - else - self:puts('<',tv,' ',self:getId(v),'>') - end - return self -end - -function Inspector:putKey(k) - if isIdentifier(k) then return self:puts(k) end - return self:puts( "[" ):putValue(k):puts("]") -end - -function Inspector:tostring() - return table.concat(self.buffer) -end - -setmetatable(inspect, { __call = function(_,t,depth) - return Inspector:new(t, depth):tostring() -end }) - -return inspect - diff --git a/samples/winecellar/Win32/Debug/Lua/logger.lua b/samples/winecellar/Win32/Debug/Lua/logger.lua deleted file mode 100644 index 3565f75d..00000000 --- a/samples/winecellar/Win32/Debug/Lua/logger.lua +++ /dev/null @@ -1,2 +0,0 @@ -require "Lua.logging.file" -logger = logging.file(__log_file, "%Y-%m-%d") \ No newline at end of file diff --git a/samples/winecellar/Win32/Debug/Lua/logging.lua b/samples/winecellar/Win32/Debug/Lua/logging.lua deleted file mode 100644 index 04a86cb6..00000000 --- a/samples/winecellar/Win32/Debug/Lua/logging.lua +++ /dev/null @@ -1,189 +0,0 @@ -------------------------------------------------------------------------------- --- includes a new tostring function that handles tables recursively --- --- @author Danilo Tuler (tuler@ideais.com.br) --- @author Andre Carregal (info@keplerproject.org) --- @author Thiago Costa Ponte (thiago@ideais.com.br) --- --- @copyright 2004-2011 Kepler Project -------------------------------------------------------------------------------- - -local type, table, string, _tostring, tonumber = type, table, string, tostring, tonumber -local select = select -local error = error -local format = string.format - -module("logging") - --- Meta information -_COPYRIGHT = "Copyright (C) 2004-2011 Kepler Project" -_DESCRIPTION = "A simple API to use logging features in Lua" -_VERSION = "LuaLogging 1.1.4" - --- The DEBUG Level designates fine-grained instring.formational events that are most --- useful to debug an application -DEBUG = "DEBUG" - --- The INFO level designates instring.formational messages that highlight the --- progress of the application at coarse-grained level -INFO = "INFO" - --- The WARN level designates potentially harmful situations -WARN = "WARN" - --- The ERROR level designates error events that might still allow the --- application to continue running -ERROR = "ERROR" - --- The FATAL level designates very severe error events that will presumably --- lead the application to abort -FATAL = "FATAL" - -local LEVEL = {"DEBUG", "INFO", "WARN", "ERROR", "FATAL"} -local MAX_LEVELS = #LEVEL --- make level names to order -for i=1,MAX_LEVELS do - LEVEL[LEVEL[i]] = i -end - --- private log function, with support for formating a complex log message. -local function LOG_MSG(self, level, fmt, ...) - local f_type = type(fmt) - if f_type == 'string' then - if select('#', ...) > 0 then - return self:append(level, format(fmt, ...)) - else - -- only a single string, no formating needed. - return self:append(level, fmt) - end - elseif f_type == 'function' then - -- fmt should be a callable function which returns the message to log - return self:append(level, fmt(...)) - end - -- fmt is not a string and not a function, just call tostring() on it. - return self:append(level, tostring(fmt)) -end - --- create the proxy functions for each log level. -local LEVEL_FUNCS = {} -for i=1,MAX_LEVELS do - local level = LEVEL[i] - LEVEL_FUNCS[i] = function(self, ...) - -- no level checking needed here, this function will only be called if it's level is active. - return LOG_MSG(self, level, ...) - end -end - --- do nothing function for disabled levels. -local function disable_level() end - --- improved assertion funciton. -local function assert(exp, ...) - -- if exp is true, we are finished so don't do any processing of the parameters - if exp then return exp, ... end - -- assertion failed, raise error - error(format(...), 2) -end - -------------------------------------------------------------------------------- --- Creates a new logger object --- @param append Function used by the logger to append a message with a --- log-level to the log stream. --- @return Table representing the new logger object. -------------------------------------------------------------------------------- -function new(append) - - if type(append) ~= "function" then - return nil, "Appender must be a function." - end - - local logger = {} - logger.append = append - - logger.setLevel = function (self, level) - local order = LEVEL[level] - assert(order, "undefined level `%s'", _tostring(level)) - self.level = level - self.level_order = order - -- enable/disable levels - for i=1,MAX_LEVELS do - local name = LEVEL[i]:lower() - if i >= order then - self[name] = LEVEL_FUNCS[i] - else - self[name] = disable_level - end - end - end - - -- generic log function. - logger.log = function (self, level, ...) - local order = LEVEL[level] - assert(order, "undefined level `%s'", _tostring(level)) - if order < self.level_order then - return - end - return LOG_MSG(self, level, ...) - end - - -- initialize log level. - logger:setLevel(DEBUG) - return logger -end - - -------------------------------------------------------------------------------- --- Prepares the log message -------------------------------------------------------------------------------- -function prepareLogMsg(pattern, dt, level, message) - - local logMsg = pattern or "%date %level %message\n" - message = string.gsub(message, "%%", "%%%%") - logMsg = string.gsub(logMsg, "%%date", dt) - logMsg = string.gsub(logMsg, "%%level", level) - logMsg = string.gsub(logMsg, "%%message", message) - return logMsg -end - - -------------------------------------------------------------------------------- --- Converts a Lua value to a string --- --- Converts Table fields in alphabetical order -------------------------------------------------------------------------------- -function tostring(value) - local str = '' - - if (type(value) ~= 'table') then - if (type(value) == 'string') then - str = string.format("%q", value) - else - str = _tostring(value) - end - else - local auxTable = {} - table.foreach(value, function(i, v) - if (tonumber(i) ~= i) then - table.insert(auxTable, i) - else - table.insert(auxTable, tostring(i)) - end - end) - table.sort(auxTable) - - str = str..'{' - local separator = "" - local entry = "" - table.foreachi (auxTable, function (i, fieldName) - if ((tonumber(fieldName)) and (tonumber(fieldName) > 0)) then - entry = tostring(value[tonumber(fieldName)]) - else - entry = fieldName.." = "..tostring(value[fieldName]) - end - str = str..separator..entry - separator = ", " - end) - str = str..'}' - end - return str -end diff --git a/samples/winecellar/Win32/Debug/Lua/logging/console.lua b/samples/winecellar/Win32/Debug/Lua/logging/console.lua deleted file mode 100644 index eb4a841e..00000000 --- a/samples/winecellar/Win32/Debug/Lua/logging/console.lua +++ /dev/null @@ -1,22 +0,0 @@ -------------------------------------------------------------------------------- --- Prints logging information to console --- --- @author Thiago Costa Ponte (thiago@ideais.com.br) --- --- @copyright 2004-2011 Kepler Project --- -------------------------------------------------------------------------------- - -require"logging" - -function logging.console(logPattern) - - return logging.new( function(self, level, message) - io.stdout:write(logging.prepareLogMsg(logPattern, os.date(), level, message)) - return true - end - ) -end - -return logging.console - diff --git a/samples/winecellar/Win32/Debug/Lua/logging/email.lua b/samples/winecellar/Win32/Debug/Lua/logging/email.lua deleted file mode 100644 index ce1c8348..00000000 --- a/samples/winecellar/Win32/Debug/Lua/logging/email.lua +++ /dev/null @@ -1,44 +0,0 @@ -------------------------------------------------------------------------------- --- Emails logging information to the given recipient --- --- @author Thiago Costa Ponte (thiago@ideais.com.br) --- --- @copyright 2004-2011 Kepler Project --- -------------------------------------------------------------------------------- - -require"logging" -local smtp = require"socket.smtp" - -function logging.email(params) - - params = params or {} - params.headers = params.headers or {} - - if params.from == nil then - return nil, "'from' parameter is required" - end - if params.rcpt == nil then - return nil, "'rcpt' parameter is required" - end - - return logging.new( function(self, level, message) - local s = logging.prepareLogMsg(params.logPattern, os.date(), level, message) - if params.headers.subject then - params.headers.subject = logging.prepareLogMsg(params.headers.subject, os.date(), level, message) - end - local msg = { headers = params.headers, body = s } - params.source = smtp.message(msg) - - local r, e = smtp.send(params) - if not r then - return nil, e - end - - return true - end - ) -end - -return logging.email - diff --git a/samples/winecellar/Win32/Debug/Lua/logging/file.lua b/samples/winecellar/Win32/Debug/Lua/logging/file.lua deleted file mode 100644 index 30e1fdfc..00000000 --- a/samples/winecellar/Win32/Debug/Lua/logging/file.lua +++ /dev/null @@ -1,55 +0,0 @@ -------------------------------------------------------------------------------- --- Saves logging information in a file --- --- @author Thiago Costa Ponte (thiago@ideais.com.br) --- --- @copyright 2004-2011 Kepler Project --- -------------------------------------------------------------------------------- - -require"logging" - -local lastFileNameDatePattern -local lastFileHandler - -local openFileLogger = function (filename, datePattern) - - local filename = string.format(filename, os.date(datePattern)) - if (lastFileNameDatePattern ~= filename) then - - local f = io.open(filename, "a") - if (f) then - f:setvbuf ("line") - lastFileNameDatePattern = filename - lastFileHandler = f - return f - else - return nil, string.format("file `%s' could not be opened for writing", filename) - end - else - return lastFileHandler - end - -end - -function logging.file(filename, datePattern, logPattern) - - if type(filename) ~= "string" then - filename = "lualogging.log" - end - - return logging.new( function(self, level, message) - - local f, msg = openFileLogger(filename, datePattern) - if not f then - return nil, msg - end - local s = logging.prepareLogMsg(logPattern, os.date(), level, message) - f:write(s) - return true - end - ) -end - -return logging.file - diff --git a/samples/winecellar/Win32/Debug/Lua/logging/rolling_file.lua b/samples/winecellar/Win32/Debug/Lua/logging/rolling_file.lua deleted file mode 100644 index 08bb21ca..00000000 --- a/samples/winecellar/Win32/Debug/Lua/logging/rolling_file.lua +++ /dev/null @@ -1,81 +0,0 @@ ---------------------------------------------------------------------------- --- RollingFileAppender is a FileAppender that rolls over the logfile --- once it has reached a certain size limit. It also mantains a --- maximum number of log files. --- --- @author Tiago Cesar Katcipis (tiagokatcipis@gmail.com) --- --- @copyright 2004-2007 Kepler Project ---------------------------------------------------------------------------- - -require"logging" - - -local function openFile(self) - self.file = io.open(self.filename, "a") - if not self.file then - return nil, string.format("file `%s' could not be opened for writing", self.filename) - end - self.file:setvbuf ("line") - return self.file -end - -local rollOver = function (self) - - for i = self.maxIndex - 1, 1, -1 do - -- files may not exist yet, lets ignore the possible errors. - os.rename(self.filename.."."..i, self.filename.."."..i+1) - end - - self.file:close() - self.file = nil - - local _, msg = os.rename(self.filename, self.filename..".".."1") - - if msg then - return nil, string.format("error %s on log rollover", msg) - end - - return openFile(self) -end - - -local openRollingFileLogger = function (self) - - if not self.file then - return openFile(self) - end - - local filesize = self.file:seek("end", 0) - - if (filesize < self.maxSize) then - return self.file - end - - return rollOver(self) -end - - -function logging.rolling_file(filename, maxFileSize, maxBackupIndex, logPattern) - - if type(filename) ~= "string" then - filename = "lualogging.log" - end - - local obj = { filename = filename, - maxSize = maxFileSize, - maxIndex = maxBackupIndex or 1 - } - - return logging.new( function(self, level, message) - - local f, msg = openRollingFileLogger(obj) - if not f then - return nil, msg - end - local s = logging.prepareLogMsg(logPattern, os.date(), level, message) - f:write(s) - return true - end - ) -end diff --git a/samples/winecellar/Win32/Debug/Lua/logging/socket.lua b/samples/winecellar/Win32/Debug/Lua/logging/socket.lua deleted file mode 100644 index 95531693..00000000 --- a/samples/winecellar/Win32/Debug/Lua/logging/socket.lua +++ /dev/null @@ -1,35 +0,0 @@ -------------------------------------------------------------------------------- --- Sends the logging information through a socket using luasocket --- --- @author Thiago Costa Ponte (thiago@ideais.com.br) --- --- @copyright 2004-2011 Kepler Project --- -------------------------------------------------------------------------------- - -require"logging" -local socket = require"socket" - -function logging.socket(address, port, logPattern) - - return logging.new( function(self, level, message) - local s = logging.prepareLogMsg(logPattern, os.date(), level, message) - - local socket, err = socket.connect(address, port) - if not socket then - return nil, err - end - - local cond, err = socket:send(s) - if not cond then - return nil, err - end - socket:close() - - return true - end - ) -end - -return logging.socket - diff --git a/samples/winecellar/Win32/Debug/Lua/logging/sql.lua b/samples/winecellar/Win32/Debug/Lua/logging/sql.lua deleted file mode 100644 index 06a3745a..00000000 --- a/samples/winecellar/Win32/Debug/Lua/logging/sql.lua +++ /dev/null @@ -1,64 +0,0 @@ -------------------------------------------------------------------------------- --- Saves the logging information in a table using luasql --- --- @author Thiago Costa Ponte (thiago@ideais.com.br) --- --- @copyright 2004-2011 Kepler Project --- -------------------------------------------------------------------------------- - -require"logging" - -function logging.sql(params) - - params = params or {} - params.tablename = params.tablename or "LogTable" - params.logdatefield = params.logdatefield or "LogDate" - params.loglevelfield = params.loglevelfield or "LogLevel" - params.logmessagefield = params.logmessagefield or "LogMessage" - - if params.connectionfactory == nil or type(params.connectionfactory) ~= "function" then - return nil, "No specified connection factory function" - end - - local con, err - if params.keepalive then - con, err = params.connectionfactory() - end - - return logging.new( function(self, level, message) - if (not params.keepalive) or (con == nil) then - con, err = params.connectionfactory() - if not con then - return nil, err - end - end - - local logDate = os.date("%Y-%m-%d %H:%M:%S") - local insert = string.format("INSERT INTO %s (%s, %s, %s) VALUES ('%s', '%s', '%s')", - params.tablename, params.logdatefield, params.loglevelfield, - params.logmessagefield, logDate, level, string.gsub(message, "'", "''")) - - local ret, err = pcall(con.execute, con, insert) - if not ret then - con, err = params.connectionfactory() - if not con then - return nil, err - end - ret, err = con:execute(insert) - if not ret then - return nil, err - end - end - - if not params.keepalive then - con:close() - end - - return true - end - ) -end - -return logging.sql - diff --git a/samples/winecellar/Win32/Debug/Lua/userlib/commons.lua b/samples/winecellar/Win32/Debug/Lua/userlib/commons.lua deleted file mode 100644 index c98fed44..00000000 --- a/samples/winecellar/Win32/Debug/Lua/userlib/commons.lua +++ /dev/null @@ -1,149 +0,0 @@ -function comma_value(amount) - local formatted = amount - while true do - formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') - if (k==0) then - break - end - end - return formatted -end - -function htmltable_row(tt) - local s = '' - for k,v in pairs(tt) do - s = s ..'' - end - return s .. '' -end - -function keys(t) - local tt = {} - for k,v in pairs(t) do - table.insert(tt, k) - end - return tt -end - -function round(val, decimal) - if (decimal) then - return math.floor( (val * 10^decimal) + 0.5) / (10^decimal) - else - return math.floor(val+0.5) - end -end - -function format_num(amount, decimal, prefix, neg_prefix) - local str_amount, formatted, famount, remain - - decimal = decimal or 2 -- default 2 decimal places - neg_prefix = neg_prefix or "-" -- default negative sign - - famount = math.abs(round(amount,decimal)) - famount = math.floor(famount) - - remain = round(math.abs(amount) - famount, decimal) - - -- comma to separate the thousands - formatted = comma_value(famount) - - -- attach the decimal portion - if (decimal > 0) then - remain = string.sub(tostring(remain),3) - formatted = formatted .. "." .. remain .. - string.rep("0", decimal - string.len(remain)) - end - - -- attach prefix string e.g '$' - formatted = (prefix or "") .. formatted - - -- if value is negative then format accordingly - if (amount<0) then - if (neg_prefix=="()") then - formatted = "("..formatted ..")" - else - formatted = neg_prefix .. formatted - end - end - - return formatted -end - - -function table_size(t) - local c = 0 - for i in pairs(t) do - c=c+1 - end - return c -end - -function html_table(t, headers, celldumpers, table_attributes) - local headers = headers or {} - local celldumpers = celldumpers or {} - local html = {} - - if table_size(headers) == 0 then --[[doesn't work]] - local firstobj = t[1] - for k in pairs(firstobj) do - headers[k] = k - end - end - - --[[calculate table attributes]] - local table_attributes = table_attributes or {cellpadding="2", cellspacing="10"} - local attrs = "" - for k,v in pairs(table_attributes) do - attrs = attrs .. tostring(k) .. '="' .. tostring(v) .. '" ' - end - - table.insert(html, '
' .. htmlize(tostring(v)) .. '
') - - for k,v in ipairs(headers) do - table.insert(html, '') - end - - table.insert(html, '') - local cell - for k, a in pairs(t) do - table.insert(html, "") - for idx, obj in ipairs(headers) do - if celldumpers[obj.fieldname] then - cell = tostring(celldumpers[obj.fieldname](obj.fieldname, a)) - else - if obj.fieldname == nil then - cell = ' ' - else - cell = tostring(a[obj.fieldname]) - end - end - table.insert(html, "") - end - table.insert(html, "") - end - table.insert(html, '
'..v.coltitle..'
".. cell .."
') - return table.concat(html) -end - -function lookup(fieldvalue, lookuptable, keyfield, descfield) - for k,v in pairs(lookuptable) do - if fieldvalue == v[keyfield] then - return v[descfield] - end - end - return ' ' -end - -function fmtfloat(n) - return string.format("%2.2f", n) -end - - ---- Pads str to length len with char from left -string.lpad = function(str, len, char) - if char == nil then - char = ' ' - end - return string.rep(char, len - #str) .. str -end - diff --git a/samples/winecellar/WineCellarServer.dproj b/samples/winecellar/WineCellarServer.dproj index 779add09..25fa0324 100644 --- a/samples/winecellar/WineCellarServer.dproj +++ b/samples/winecellar/WineCellarServer.dproj @@ -1,7 +1,7 @@  {D87A49D2-D936-4F0E-BC4F-38702084A156} - 17.2 + 18.1 VCL WineCellarServer.dpr True @@ -13,6 +13,26 @@ true + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + true Base @@ -40,6 +60,7 @@ true + $(BDS)\bin\delphi_PROJECTICNS.icns WineCellarServer None ..\..\;$(DCC_UnitSearchPath) @@ -55,6 +76,85 @@ false false + + true + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png + $(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png + true + true + true + true + true + $(BDS)\bin\Artwork\Android\FM_SplashImage_640x480.png + $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png + true + $(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png + $(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png + Debug + android-support-v4.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services.dex.jar + true + true + true + package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey= + + + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + true + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(MSBuildProjectName) + iPhoneAndiPad + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;FMLocalNotificationPermission=false;UIBackgroundModes= + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + Debug + + + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + true + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(MSBuildProjectName) + iPhoneAndiPad + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;FMLocalNotificationPermission=false;UIBackgroundModes= + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + Debug + + + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_1536x2048.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_1024x768.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImagePortrait_768x1024.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png + $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png + true + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png + $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png + $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png + $(BDS)\bin\Artwork\iOS\iPad\FM_LaunchImageLandscape_2048x1536.png + CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user;FMLocalNotificationPermission=false;UIBackgroundModes= + iPhoneAndiPad + true ..\..\lib\fastmm;..\..\sources;..\..\lib\LuaDelphiBinding;..\..\lib\iocpdelphiframework;..\..\lib\delphistompclient;..\..\lib\iocpdelphiframework\Base;$(DCC_UnitSearchPath) @@ -160,51 +260,97 @@ Microsoft Office XP Sample Automation Server Wrapper Components - - - + + + + + Contents\Resources 1 - .dylib + + + + classes + 1 + + + + + res\drawable-xxhdpi + 1 + + + + Contents\MacOS 0 - .bpl 1 - .dylib + + + + library\lib\mips + 1 + + + 1 - .dylib - - 1 - .dylib - - - - - 1 - .dylib - - - 0 - .dll;.bpl - - - 1 - - 1 - 1 - + + + 1 + + + 1 + + + 0 + + + 1 + + + 1 + + + library\lib\armeabi-v7a + 1 + + + 1 + + + + + 0 + + + 1 + .framework + + + + + 1 + + + 1 + + + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF @@ -215,256 +361,90 @@ 1 + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + + library\lib\armeabi + 1 + + + + + 0 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + res\drawable-normal 1 - - - library\lib\x86 - 1 - - - - - 1 - - - 1 - - - 1 - - - - - - library\lib\armeabi-v7a - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable-xlarge - 1 - - res\drawable-xhdpi 1 - - - 1 - - - 1 - - - 1 - - - - - res\drawable-xxhdpi - 1 - - - - - library\lib\mips - 1 - - - - - res\drawable - 1 - - - - - 1 - - - 1 - - - 0 - - - - - 1 - .framework - - - 0 - - - - - res\drawable-small - 1 - - - - - - 1 - - - Contents\MacOS - 0 - - - - - classes - 1 - - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable - 1 - - - - - Contents\Resources - 1 - - - - - - 1 - - - 1 - - - 1 - - - - - library\lib\armeabi-v7a - 1 - - - 1 - - - 0 - - - 1 - - - 1 - - - 1 - - - - - library\lib\armeabi - 1 - - res\drawable-large 1 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - + 1 - + 1 1 - + + - res\drawable-ldpi - 1 - - - - - res\values - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable-mdpi + library\lib\armeabi-v7a 1 @@ -474,20 +454,150 @@ 1 + + + + + 1 + + + 1 + + + 1 + + + + + res\values + 1 + + + + + res\drawable-small + 1 + + + + + res\drawable + 1 + + + + + 1 + + + 1 + + + 1 + + 1 + + + res\drawable + 1 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + library\lib\armeabi-v7a + 1 + + + + + 0 + .bpl + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-xlarge + 1 + + + + + res\drawable-ldpi + 1 + + + + + 0 + .dll;.bpl + + + 1 + .dylib + + - - - - + + + + + + False + False + False + False + False True False diff --git a/samples/winecellarWITHDORM/Win32/Debug/Lua/boot.lua b/samples/winecellarWITHDORM/Win32/Debug/Lua/boot.lua deleted file mode 100644 index adda0a8b..00000000 --- a/samples/winecellarWITHDORM/Win32/Debug/Lua/boot.lua +++ /dev/null @@ -1,18 +0,0 @@ -require "Lua.helper.view" ---[[require "Lua.delphi.datasets"]] -dump = require "Lua.inspect" -json = require "dkjson" - -function htmlize(s) - s = s:gsub('&', '&') - s = s:gsub('<', '<') - s = s:gsub('>', '>') - if s == ' ' then - s = ' ' - end - return s -end - -function dumppre(value) - return '
' .. htmlize(dump(value)) .. '
' -end \ No newline at end of file diff --git a/samples/winecellarWITHDORM/Win32/Debug/Lua/delphi/datasets.lua b/samples/winecellarWITHDORM/Win32/Debug/Lua/delphi/datasets.lua deleted file mode 100644 index e6ed954c..00000000 --- a/samples/winecellarWITHDORM/Win32/Debug/Lua/delphi/datasets.lua +++ /dev/null @@ -1,29 +0,0 @@ -function open_dataset(ud) - _dataset_open(ud); - m = { - pointer = ud, - eof = function() - return _dataset_eof(ud) - end, - movenext = function() - _dataset_move_next(ud) - end, - get = function(fieldname) - return _dataset_field_by_name(ud, fieldname) - end, - close = function() - _dataset_close(ud) - end, - first = function() - _dataset_first(ud) - end, - is_open = function() - return _dataset_is_open(ud) - end, - open = function() - _dataset_open(ud) - end - }; - - return m; -end \ No newline at end of file diff --git a/samples/winecellarWITHDORM/Win32/Debug/Lua/delphi/delphiobjects.lua b/samples/winecellarWITHDORM/Win32/Debug/Lua/delphi/delphiobjects.lua deleted file mode 100644 index a33fb9a7..00000000 --- a/samples/winecellarWITHDORM/Win32/Debug/Lua/delphi/delphiobjects.lua +++ /dev/null @@ -1,42 +0,0 @@ -function connect_to_delphi_object(ud) - m = { - pointer = ud, - }; - - meta = { - __index = function (self, name) - if _delphi_is_a_property(ud, name) then - return _delphi_call_method(ud,name,{maxindex = -1}) - else - return function(...) - local parent_table = self - local method_name = name - local methodargs = {} - local index = 0 - for k,v in ipairs(arg) do - methodargs['_'..tostring(index)] = v - index = index + 1 - end - methodargs['maxindex'] = index - 1 - logger:debug("Ecco i parametri:") - logger:debug(methodargs) - return _delphi_call_method(ud,method_name,methodargs) - end - end - end, - - __newindex = function (self, key, value) - logger:debug("setting "..key.." to "..tostring(value)) - return _delphi_set_property(ud, key, value) - end - } - - setmetatable(m, meta); - - return m; -end - -function create_delphi_object(ClassName, ...) - return connect_to_delphi_object(_delphi_create_object(ClassName, ...)) -end - diff --git a/samples/winecellarWITHDORM/Win32/Debug/Lua/dkjson.lua b/samples/winecellarWITHDORM/Win32/Debug/Lua/dkjson.lua deleted file mode 100644 index 4e1dd040..00000000 --- a/samples/winecellarWITHDORM/Win32/Debug/Lua/dkjson.lua +++ /dev/null @@ -1,803 +0,0 @@ - -- Module options: - local always_try_using_lpeg = false - local register_global_module_table = false - local global_module_name = 'json' - - --[==[ - -David Kolf's JSON module for Lua 5.1/5.2 -======================================== - -*Version 2.3* - -In the default configuration this module writes no global values, not even -the module table. Import it using - - json = require ("dkjson") - -In environments where `require` or a similiar function are not available -and you cannot receive the return value of the module, you can set the -option `register_global_module_table` to `true`. The module table will -then be saved in the global variable with the name given by the option -`global_module_name`. - -Exported functions and values: - -`json.encode (object [, state])` --------------------------------- - -Create a string representing the object. `Object` can be a table, -a string, a number, a boolean, `nil`, `json.null` or any object with -a function `__tojson` in its metatable. A table can only use strings -and numbers as keys and its values have to be valid objects as -well. It raises an error for any invalid data types or reference -cycles. - -`state` is an optional table with the following fields: - - - `indent` - When `indent` (a boolean) is set, the created string will contain - newlines and indentations. Otherwise it will be one long line. - - `keyorder` - `keyorder` is an array to specify the ordering of keys in the - encoded output. If an object has keys which are not in this array - they are written after the sorted keys. - - `level` - This is the initial level of indentation used when `indent` is - set. For each level two spaces are added. When absent it is set - to 0. - - `buffer` - `buffer` is an array to store the strings for the result so they - can be concatenated at once. When it isn't given, the encode - function will create it temporary and will return the - concatenated result. - - `bufferlen` - When `bufferlen` is set, it has to be the index of the last - element of `buffer`. - - `tables` - `tables` is a set to detect reference cycles. It is created - temporary when absent. Every table that is currently processed - is used as key, the value is `true`. - -When `state.buffer` was set, the return value will be `true` on -success. Without `state.buffer` the return value will be a string. - -`json.decode (string [, position [, null]])` --------------------------------------------- - -Decode `string` starting at `position` or at 1 if `position` was -omitted. - -`null` is an optional value to be returned for null values. The -default is `nil`, but you could set it to `json.null` or any other -value. - -The return values are the object or `nil`, the position of the next -character that doesn't belong to the object, and in case of errors -an error message. - -Two metatables are created. Every array or object that is decoded gets -a metatable with the `__jsontype` field set to either `array` or -`object`. If you want to provide your own metatables use the syntax - - json.decode (string, position, null, objectmeta, arraymeta) - -To prevent the assigning of metatables pass `nil`: - - json.decode (string, position, null, nil) - -`.__jsonorder` -------------------------- - -`__jsonorder` can overwrite the `keyorder` for a specific table. - -`.__jsontype` ------------------------- - -`__jsontype` can be either `"array"` or `"object"`. This value is only -checked for empty tables. (The default for empty tables is `"array"`). - -`.__tojson (self, state)` ------------------------------------- - -You can provide your own `__tojson` function in a metatable. In this -function you can either add directly to the buffer and return true, -or you can return a string. On errors nil and a message should be -returned. - -`json.null` ------------ - -You can use this value for setting explicit `null` values. - -`json.version` --------------- - -Set to `"dkjson 2.3"`. - -`json.quotestring (string)` ---------------------------- - -Quote a UTF-8 string and escape critical characters using JSON -escape sequences. This function is only necessary when you build -your own `__tojson` functions. - -`json.addnewline (state)` -------------------------- - -When `state.indent` is set, add a newline to `state.buffer` and spaces -according to `state.level`. - -LPeg support ------------- - -When the local configuration variable `always_try_using_lpeg` is set, -this module tries to load LPeg to replace the `decode` function. The -speed increase is significant. You can get the LPeg module at - . -When LPeg couldn't be loaded, the pure Lua functions stay active. - -In case you don't want this module to require LPeg on its own, -disable the option `always_try_using_lpeg` in the options section at -the top of the module. - -In this case you can later load LPeg support using - -### `json.use_lpeg ()` - -Require the LPeg module and replace the functions `quotestring` and -and `decode` with functions that use LPeg patterns. -This function returns the module table, so you can load the module -using: - - json = require "dkjson".use_lpeg() - -Alternatively you can use `pcall` so the JSON module still works when -LPeg isn't found. - - json = require "dkjson" - pcall (json.use_lpeg) - -### `json.using_lpeg` - -This variable is set to `true` when LPeg was loaded successfully. - ---------------------------------------------------------------------- - -Contact -------- - -You can contact the author by sending an e-mail to 'david' at the -domain 'dkolf.de'. - ---------------------------------------------------------------------- - -*Copyright (C) 2010-2013 David Heiko Kolf* - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - - diff --git a/samples/winecellarWITHDORM/Win32/Debug/Lua/dumper.lua b/samples/winecellarWITHDORM/Win32/Debug/Lua/dumper.lua deleted file mode 100644 index cc18b862..00000000 --- a/samples/winecellarWITHDORM/Win32/Debug/Lua/dumper.lua +++ /dev/null @@ -1,233 +0,0 @@ ---[[ DataDumper.lua -Copyright (c) 2007 Olivetti-Engineering SA - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. -]] - -local dumplua_closure = [[ -local closures = {} -local function closure(t) - closures[#closures+1] = t - t[1] = assert(loadstring(t[1])) - return t[1] -end - -for _,t in pairs(closures) do - for i = 2,#t do - debug.setupvalue(t[1], i-1, t[i]) - end -end -]] - -local lua_reserved_keywords = { - 'and', 'break', 'do', 'else', 'elseif', 'end', 'false', 'for', - 'function', 'if', 'in', 'local', 'nil', 'not', 'or', 'repeat', - 'return', 'then', 'true', 'until', 'while' } - -local function keys(t) - local res = {} - local oktypes = { stringstring = true, numbernumber = true } - local function cmpfct(a,b) - if oktypes[type(a)..type(b)] then - return a < b - else - return type(a) < type(b) - end - end - for k in pairs(t) do - res[#res+1] = k - end - table.sort(res, cmpfct) - return res -end - -local c_functions = {} -for _,lib in pairs{'_G', 'string', 'table', 'math', - 'io', 'os', 'coroutine', 'package', 'debug'} do - local t = _G[lib] or {} - lib = lib .. "." - if lib == "_G." then lib = "" end - for k,v in pairs(t) do - if type(v) == 'function' and not pcall(string.dump, v) then - c_functions[v] = lib..k - end - end -end - -function DataDumper(value, varname, fastmode, ident) - local defined, dumplua = {} - -- Local variables for speed optimization - local string_format, type, string_dump, string_rep = - string.format, type, string.dump, string.rep - local tostring, pairs, table_concat = - tostring, pairs, table.concat - local keycache, strvalcache, out, closure_cnt = {}, {}, {}, 0 - setmetatable(strvalcache, {__index = function(t,value) - local res = string_format('%q', value) - t[value] = res - return res - end}) - local fcts = { - string = function(value) return strvalcache[value] end, - number = function(value) return value end, - boolean = function(value) return tostring(value) end, - ['nil'] = function(value) return 'nil' end, - ['function'] = function(value) - return string_format("loadstring(%q)", string_dump(value)) - end, - userdata = function() error("Cannot dump userdata") end, - thread = function() error("Cannot dump threads") end, - } - local function test_defined(value, path) - if defined[value] then - if path:match("^getmetatable.*%)$") then - out[#out+1] = string_format("s%s, %s)\n", path:sub(2,-2), defined[value]) - else - out[#out+1] = path .. " = " .. defined[value] .. "\n" - end - return true - end - defined[value] = path - end - local function make_key(t, key) - local s - if type(key) == 'string' and key:match('^[_%a][_%w]*$') then - s = key .. "=" - else - s = "[" .. dumplua(key, 0) .. "]=" - end - t[key] = s - return s - end - for _,k in ipairs(lua_reserved_keywords) do - keycache[k] = '["'..k..'"] = ' - end - if fastmode then - fcts.table = function (value) - -- Table value - local numidx = 1 - out[#out+1] = "{" - for key,val in pairs(value) do - if key == numidx then - numidx = numidx + 1 - else - out[#out+1] = keycache[key] - end - local str = dumplua(val) - out[#out+1] = str.."," - end - if string.sub(out[#out], -1) == "," then - out[#out] = string.sub(out[#out], 1, -2); - end - out[#out+1] = "}" - return "" - end - else - fcts.table = function (value, ident, path) - if test_defined(value, path) then return "nil" end - -- Table value - local sep, str, numidx, totallen = " ", {}, 1, 0 - local meta, metastr = (debug or getfenv()).getmetatable(value) - if meta then - ident = ident + 1 - metastr = dumplua(meta, ident, "getmetatable("..path..")") - totallen = totallen + #metastr + 16 - end - for _,key in pairs(keys(value)) do - local val = value[key] - local s = "" - local subpath = path - if key == numidx then - subpath = subpath .. "[" .. numidx .. "]" - numidx = numidx + 1 - else - s = keycache[key] - if not s:match "^%[" then subpath = subpath .. "." end - subpath = subpath .. s:gsub("%s*=%s*$","") - end - s = s .. dumplua(val, ident+1, subpath) - str[#str+1] = s - totallen = totallen + #s + 2 - end - if totallen > 80 then - sep = "\n" .. string_rep(" ", ident+1) - end - str = "{"..sep..table_concat(str, ","..sep).." "..sep:sub(1,-3).."}" - if meta then - sep = sep:sub(1,-3) - return "setmetatable("..sep..str..","..sep..metastr..sep:sub(1,-3)..")" - end - return str - end - fcts['function'] = function (value, ident, path) - if test_defined(value, path) then return "nil" end - if c_functions[value] then - return c_functions[value] - elseif debug == nil or debug.getupvalue(value, 1) == nil then - return string_format("loadstring(%q)", string_dump(value)) - end - closure_cnt = closure_cnt + 1 - local res = {string.dump(value)} - for i = 1,math.huge do - local name, v = debug.getupvalue(value,i) - if name == nil then break end - res[i+1] = v - end - return "closure " .. dumplua(res, ident, "closures["..closure_cnt.."]") - end - end - function dumplua(value, ident, path) - return fcts[type(value)](value, ident, path) - end - if varname == nil then - varname = "return " - elseif varname:match("^[%a_][%w_]*$") then - varname = varname .. " = " - end - if fastmode then - setmetatable(keycache, {__index = make_key }) - out[1] = varname - table.insert(out,dumplua(value, 0)) - return table.concat(out) - else - setmetatable(keycache, {__index = make_key }) - local items = {} - for i=1,10 do items[i] = '' end - items[3] = dumplua(value, ident or 0, "t") - if closure_cnt > 0 then - items[1], items[6] = dumplua_closure:match("(.*\n)\n(.*)") - out[#out+1] = "" - end - if #out > 0 then - items[2], items[4] = "local t = ", "\n" - items[5] = table.concat(out) - items[7] = varname .. "t" - else - items[2] = varname - end - return table.concat(items) - end -end - -function dump(value) - return '
'..DataDumper(value)..'
' -end \ No newline at end of file diff --git a/samples/winecellarWITHDORM/Win32/Debug/Lua/helper/view.lua b/samples/winecellarWITHDORM/Win32/Debug/Lua/helper/view.lua deleted file mode 100644 index 6d3e7835..00000000 --- a/samples/winecellarWITHDORM/Win32/Debug/Lua/helper/view.lua +++ /dev/null @@ -1,5 +0,0 @@ -require "Lua.logger" - -function _out(value) - response:out(tostring(value)) -end diff --git a/samples/winecellarWITHDORM/Win32/Debug/Lua/html/form.lua b/samples/winecellarWITHDORM/Win32/Debug/Lua/html/form.lua deleted file mode 100644 index d2240f42..00000000 --- a/samples/winecellarWITHDORM/Win32/Debug/Lua/html/form.lua +++ /dev/null @@ -1,5 +0,0 @@ -html = {} - -function html:input(type, value) - return string.format('', type, value) -end \ No newline at end of file diff --git a/samples/winecellarWITHDORM/Win32/Debug/Lua/html/test.lua b/samples/winecellarWITHDORM/Win32/Debug/Lua/html/test.lua deleted file mode 100644 index 1d3a7e0c..00000000 --- a/samples/winecellarWITHDORM/Win32/Debug/Lua/html/test.lua +++ /dev/null @@ -1,2 +0,0 @@ -require "..\\helper\\view" -require "form" diff --git a/samples/winecellarWITHDORM/Win32/Debug/Lua/inspect.lua b/samples/winecellarWITHDORM/Win32/Debug/Lua/inspect.lua deleted file mode 100644 index 6320f916..00000000 --- a/samples/winecellarWITHDORM/Win32/Debug/Lua/inspect.lua +++ /dev/null @@ -1,243 +0,0 @@ ------------------------------------------------------------------------------------------------------------------------ --- inspect.lua - v1.2.1 (2013-01) --- Enrique García Cota - enrique.garcia.cota [AT] gmail [DOT] com --- human-readable representations of tables. --- inspired by http://lua-users.org/wiki/TableSerialization ------------------------------------------------------------------------------------------------------------------------ - -local inspect ={} -inspect.__VERSION = '1.2.0' - --- Apostrophizes the string if it has quotes, but not aphostrophes --- Otherwise, it returns a regular quoted string -local function smartQuote(str) - if string.match( string.gsub(str,"[^'\"]",""), '^"+$' ) then - return "'" .. str .. "'" - end - return string.format("%q", str ) -end - -local controlCharsTranslation = { - ["\a"] = "\\a", ["\b"] = "\\b", ["\f"] = "\\f", ["\n"] = "\\n", - ["\r"] = "\\r", ["\t"] = "\\t", ["\v"] = "\\v", ["\\"] = "\\\\" -} - -local function unescapeChar(c) return controlCharsTranslation[c] end - -local function unescape(str) - local result, _ = string.gsub( str, "(%c)", unescapeChar ) - return result -end - -local function isIdentifier(str) - return type(str) == 'string' and str:match( "^[_%a][_%a%d]*$" ) -end - -local function isArrayKey(k, length) - return type(k)=='number' and 1 <= k and k <= length -end - -local function isDictionaryKey(k, length) - return not isArrayKey(k, length) -end - -local sortOrdersByType = { - ['number'] = 1, ['boolean'] = 2, ['string'] = 3, ['table'] = 4, - ['function'] = 5, ['userdata'] = 6, ['thread'] = 7 -} - -local function sortKeys(a,b) - local ta, tb = type(a), type(b) - if ta ~= tb then return sortOrdersByType[ta] < sortOrdersByType[tb] end - if ta == 'string' or ta == 'number' then return a < b end - return false -end - -local function getDictionaryKeys(t) - local length = #t - local keys = {} - for k,_ in pairs(t) do - if isDictionaryKey(k, length) then table.insert(keys,k) end - end - table.sort(keys, sortKeys) - return keys -end - -local function getToStringResultSafely(t, mt) - local __tostring = type(mt) == 'table' and rawget(mt, '__tostring') - local string, status - if type(__tostring) == 'function' then - status, string = pcall(__tostring, t) - string = status and string or 'error: ' .. tostring(string) - end - return string -end - -local Inspector = {} - -function Inspector:new(t, depth) - local inspector = { - buffer = {}, - depth = depth, - level = 0, - maxIds = { - ['function'] = 0, - ['userdata'] = 0, - ['thread'] = 0, - ['table'] = 0 - }, - ids = { - ['function'] = setmetatable({}, {__mode = "kv"}), - ['userdata'] = setmetatable({}, {__mode = "kv"}), - ['thread'] = setmetatable({}, {__mode = "kv"}), - ['table'] = setmetatable({}, {__mode = "kv"}) - }, - tableAppearances = setmetatable({}, {__mode = "k"}) - } - - setmetatable(inspector, {__index = Inspector}) - - inspector:countTableAppearances(t) - - return inspector:putValue(t) -end - -function Inspector:countTableAppearances(t) - if type(t) == 'table' then - if not self.tableAppearances[t] then - self.tableAppearances[t] = 1 - for k,v in pairs(t) do - self:countTableAppearances(k) - self:countTableAppearances(v) - end - self:countTableAppearances(getmetatable(t)) - else - self.tableAppearances[t] = self.tableAppearances[t] + 1 - end - end -end - -function Inspector:tabify() - self:puts("\n", string.rep(" ", self.level)) - return self -end - -function Inspector:up() - self.level = self.level - 1 -end - -function Inspector:down() - self.level = self.level + 1 -end - -function Inspector:puts(...) - local args = {...} - local len = #self.buffer - for i=1, #args do - len = len + 1 - self.buffer[len] = tostring(args[i]) - end - return self -end - -function Inspector:commaControl(comma) - if comma then self:puts(',') end - return true -end - -function Inspector:putTable(t) - if self:alreadyVisited(t) then - self:puts('') - elseif self.depth and self.level >= self.depth then - self:puts('{...}') - else - if self.tableAppearances[t] > 1 then - self:puts('<',self:getId(t),'>') - end - self:puts('{') - self:down() - - local length = #t - local mt = getmetatable(t) - - local string = getToStringResultSafely(t, mt) - if type(string) == 'string' and #string > 0 then - self:puts(' -- ', unescape(string)) - if length >= 1 then self:tabify() end -- tabify the array values - end - - local comma = false - for i=1, length do - comma = self:commaControl(comma) - self:puts(' '):putValue(t[i]) - end - - local dictKeys = getDictionaryKeys(t) - - for _,k in ipairs(dictKeys) do - comma = self:commaControl(comma) - self:tabify():putKey(k):puts(' = '):putValue(t[k]) - end - - if mt then - comma = self:commaControl(comma) - self:tabify():puts(' = '):putValue(mt) - end - - self:up() - - if #dictKeys > 0 or mt then -- dictionary table. Justify closing } - self:tabify() - elseif length > 0 then -- array tables have one extra space before closing } - self:puts(' ') - end - self:puts('}') - end - return self -end - -function Inspector:alreadyVisited(v) - return self.ids[type(v)][v] ~= nil -end - -function Inspector:getId(v) - local tv = type(v) - local id = self.ids[tv][v] - if not id then - id = self.maxIds[tv] + 1 - self.maxIds[tv] = id - self.ids[tv][v] = id - end - return id -end - -function Inspector:putValue(v) - local tv = type(v) - - if tv == 'string' then - self:puts(smartQuote(unescape(v))) - elseif tv == 'number' or tv == 'boolean' or tv == 'nil' then - self:puts(tostring(v)) - elseif tv == 'table' then - self:putTable(v) - else - self:puts('<',tv,' ',self:getId(v),'>') - end - return self -end - -function Inspector:putKey(k) - if isIdentifier(k) then return self:puts(k) end - return self:puts( "[" ):putValue(k):puts("]") -end - -function Inspector:tostring() - return table.concat(self.buffer) -end - -setmetatable(inspect, { __call = function(_,t,depth) - return Inspector:new(t, depth):tostring() -end }) - -return inspect - diff --git a/samples/winecellarWITHDORM/Win32/Debug/Lua/logger.lua b/samples/winecellarWITHDORM/Win32/Debug/Lua/logger.lua deleted file mode 100644 index 3565f75d..00000000 --- a/samples/winecellarWITHDORM/Win32/Debug/Lua/logger.lua +++ /dev/null @@ -1,2 +0,0 @@ -require "Lua.logging.file" -logger = logging.file(__log_file, "%Y-%m-%d") \ No newline at end of file diff --git a/samples/winecellarWITHDORM/Win32/Debug/Lua/logging.lua b/samples/winecellarWITHDORM/Win32/Debug/Lua/logging.lua deleted file mode 100644 index 04a86cb6..00000000 --- a/samples/winecellarWITHDORM/Win32/Debug/Lua/logging.lua +++ /dev/null @@ -1,189 +0,0 @@ -------------------------------------------------------------------------------- --- includes a new tostring function that handles tables recursively --- --- @author Danilo Tuler (tuler@ideais.com.br) --- @author Andre Carregal (info@keplerproject.org) --- @author Thiago Costa Ponte (thiago@ideais.com.br) --- --- @copyright 2004-2011 Kepler Project -------------------------------------------------------------------------------- - -local type, table, string, _tostring, tonumber = type, table, string, tostring, tonumber -local select = select -local error = error -local format = string.format - -module("logging") - --- Meta information -_COPYRIGHT = "Copyright (C) 2004-2011 Kepler Project" -_DESCRIPTION = "A simple API to use logging features in Lua" -_VERSION = "LuaLogging 1.1.4" - --- The DEBUG Level designates fine-grained instring.formational events that are most --- useful to debug an application -DEBUG = "DEBUG" - --- The INFO level designates instring.formational messages that highlight the --- progress of the application at coarse-grained level -INFO = "INFO" - --- The WARN level designates potentially harmful situations -WARN = "WARN" - --- The ERROR level designates error events that might still allow the --- application to continue running -ERROR = "ERROR" - --- The FATAL level designates very severe error events that will presumably --- lead the application to abort -FATAL = "FATAL" - -local LEVEL = {"DEBUG", "INFO", "WARN", "ERROR", "FATAL"} -local MAX_LEVELS = #LEVEL --- make level names to order -for i=1,MAX_LEVELS do - LEVEL[LEVEL[i]] = i -end - --- private log function, with support for formating a complex log message. -local function LOG_MSG(self, level, fmt, ...) - local f_type = type(fmt) - if f_type == 'string' then - if select('#', ...) > 0 then - return self:append(level, format(fmt, ...)) - else - -- only a single string, no formating needed. - return self:append(level, fmt) - end - elseif f_type == 'function' then - -- fmt should be a callable function which returns the message to log - return self:append(level, fmt(...)) - end - -- fmt is not a string and not a function, just call tostring() on it. - return self:append(level, tostring(fmt)) -end - --- create the proxy functions for each log level. -local LEVEL_FUNCS = {} -for i=1,MAX_LEVELS do - local level = LEVEL[i] - LEVEL_FUNCS[i] = function(self, ...) - -- no level checking needed here, this function will only be called if it's level is active. - return LOG_MSG(self, level, ...) - end -end - --- do nothing function for disabled levels. -local function disable_level() end - --- improved assertion funciton. -local function assert(exp, ...) - -- if exp is true, we are finished so don't do any processing of the parameters - if exp then return exp, ... end - -- assertion failed, raise error - error(format(...), 2) -end - -------------------------------------------------------------------------------- --- Creates a new logger object --- @param append Function used by the logger to append a message with a --- log-level to the log stream. --- @return Table representing the new logger object. -------------------------------------------------------------------------------- -function new(append) - - if type(append) ~= "function" then - return nil, "Appender must be a function." - end - - local logger = {} - logger.append = append - - logger.setLevel = function (self, level) - local order = LEVEL[level] - assert(order, "undefined level `%s'", _tostring(level)) - self.level = level - self.level_order = order - -- enable/disable levels - for i=1,MAX_LEVELS do - local name = LEVEL[i]:lower() - if i >= order then - self[name] = LEVEL_FUNCS[i] - else - self[name] = disable_level - end - end - end - - -- generic log function. - logger.log = function (self, level, ...) - local order = LEVEL[level] - assert(order, "undefined level `%s'", _tostring(level)) - if order < self.level_order then - return - end - return LOG_MSG(self, level, ...) - end - - -- initialize log level. - logger:setLevel(DEBUG) - return logger -end - - -------------------------------------------------------------------------------- --- Prepares the log message -------------------------------------------------------------------------------- -function prepareLogMsg(pattern, dt, level, message) - - local logMsg = pattern or "%date %level %message\n" - message = string.gsub(message, "%%", "%%%%") - logMsg = string.gsub(logMsg, "%%date", dt) - logMsg = string.gsub(logMsg, "%%level", level) - logMsg = string.gsub(logMsg, "%%message", message) - return logMsg -end - - -------------------------------------------------------------------------------- --- Converts a Lua value to a string --- --- Converts Table fields in alphabetical order -------------------------------------------------------------------------------- -function tostring(value) - local str = '' - - if (type(value) ~= 'table') then - if (type(value) == 'string') then - str = string.format("%q", value) - else - str = _tostring(value) - end - else - local auxTable = {} - table.foreach(value, function(i, v) - if (tonumber(i) ~= i) then - table.insert(auxTable, i) - else - table.insert(auxTable, tostring(i)) - end - end) - table.sort(auxTable) - - str = str..'{' - local separator = "" - local entry = "" - table.foreachi (auxTable, function (i, fieldName) - if ((tonumber(fieldName)) and (tonumber(fieldName) > 0)) then - entry = tostring(value[tonumber(fieldName)]) - else - entry = fieldName.." = "..tostring(value[fieldName]) - end - str = str..separator..entry - separator = ", " - end) - str = str..'}' - end - return str -end diff --git a/samples/winecellarWITHDORM/Win32/Debug/Lua/logging/console.lua b/samples/winecellarWITHDORM/Win32/Debug/Lua/logging/console.lua deleted file mode 100644 index eb4a841e..00000000 --- a/samples/winecellarWITHDORM/Win32/Debug/Lua/logging/console.lua +++ /dev/null @@ -1,22 +0,0 @@ -------------------------------------------------------------------------------- --- Prints logging information to console --- --- @author Thiago Costa Ponte (thiago@ideais.com.br) --- --- @copyright 2004-2011 Kepler Project --- -------------------------------------------------------------------------------- - -require"logging" - -function logging.console(logPattern) - - return logging.new( function(self, level, message) - io.stdout:write(logging.prepareLogMsg(logPattern, os.date(), level, message)) - return true - end - ) -end - -return logging.console - diff --git a/samples/winecellarWITHDORM/Win32/Debug/Lua/logging/email.lua b/samples/winecellarWITHDORM/Win32/Debug/Lua/logging/email.lua deleted file mode 100644 index ce1c8348..00000000 --- a/samples/winecellarWITHDORM/Win32/Debug/Lua/logging/email.lua +++ /dev/null @@ -1,44 +0,0 @@ -------------------------------------------------------------------------------- --- Emails logging information to the given recipient --- --- @author Thiago Costa Ponte (thiago@ideais.com.br) --- --- @copyright 2004-2011 Kepler Project --- -------------------------------------------------------------------------------- - -require"logging" -local smtp = require"socket.smtp" - -function logging.email(params) - - params = params or {} - params.headers = params.headers or {} - - if params.from == nil then - return nil, "'from' parameter is required" - end - if params.rcpt == nil then - return nil, "'rcpt' parameter is required" - end - - return logging.new( function(self, level, message) - local s = logging.prepareLogMsg(params.logPattern, os.date(), level, message) - if params.headers.subject then - params.headers.subject = logging.prepareLogMsg(params.headers.subject, os.date(), level, message) - end - local msg = { headers = params.headers, body = s } - params.source = smtp.message(msg) - - local r, e = smtp.send(params) - if not r then - return nil, e - end - - return true - end - ) -end - -return logging.email - diff --git a/samples/winecellarWITHDORM/Win32/Debug/Lua/logging/file.lua b/samples/winecellarWITHDORM/Win32/Debug/Lua/logging/file.lua deleted file mode 100644 index 30e1fdfc..00000000 --- a/samples/winecellarWITHDORM/Win32/Debug/Lua/logging/file.lua +++ /dev/null @@ -1,55 +0,0 @@ -------------------------------------------------------------------------------- --- Saves logging information in a file --- --- @author Thiago Costa Ponte (thiago@ideais.com.br) --- --- @copyright 2004-2011 Kepler Project --- -------------------------------------------------------------------------------- - -require"logging" - -local lastFileNameDatePattern -local lastFileHandler - -local openFileLogger = function (filename, datePattern) - - local filename = string.format(filename, os.date(datePattern)) - if (lastFileNameDatePattern ~= filename) then - - local f = io.open(filename, "a") - if (f) then - f:setvbuf ("line") - lastFileNameDatePattern = filename - lastFileHandler = f - return f - else - return nil, string.format("file `%s' could not be opened for writing", filename) - end - else - return lastFileHandler - end - -end - -function logging.file(filename, datePattern, logPattern) - - if type(filename) ~= "string" then - filename = "lualogging.log" - end - - return logging.new( function(self, level, message) - - local f, msg = openFileLogger(filename, datePattern) - if not f then - return nil, msg - end - local s = logging.prepareLogMsg(logPattern, os.date(), level, message) - f:write(s) - return true - end - ) -end - -return logging.file - diff --git a/samples/winecellarWITHDORM/Win32/Debug/Lua/logging/rolling_file.lua b/samples/winecellarWITHDORM/Win32/Debug/Lua/logging/rolling_file.lua deleted file mode 100644 index 08bb21ca..00000000 --- a/samples/winecellarWITHDORM/Win32/Debug/Lua/logging/rolling_file.lua +++ /dev/null @@ -1,81 +0,0 @@ ---------------------------------------------------------------------------- --- RollingFileAppender is a FileAppender that rolls over the logfile --- once it has reached a certain size limit. It also mantains a --- maximum number of log files. --- --- @author Tiago Cesar Katcipis (tiagokatcipis@gmail.com) --- --- @copyright 2004-2007 Kepler Project ---------------------------------------------------------------------------- - -require"logging" - - -local function openFile(self) - self.file = io.open(self.filename, "a") - if not self.file then - return nil, string.format("file `%s' could not be opened for writing", self.filename) - end - self.file:setvbuf ("line") - return self.file -end - -local rollOver = function (self) - - for i = self.maxIndex - 1, 1, -1 do - -- files may not exist yet, lets ignore the possible errors. - os.rename(self.filename.."."..i, self.filename.."."..i+1) - end - - self.file:close() - self.file = nil - - local _, msg = os.rename(self.filename, self.filename..".".."1") - - if msg then - return nil, string.format("error %s on log rollover", msg) - end - - return openFile(self) -end - - -local openRollingFileLogger = function (self) - - if not self.file then - return openFile(self) - end - - local filesize = self.file:seek("end", 0) - - if (filesize < self.maxSize) then - return self.file - end - - return rollOver(self) -end - - -function logging.rolling_file(filename, maxFileSize, maxBackupIndex, logPattern) - - if type(filename) ~= "string" then - filename = "lualogging.log" - end - - local obj = { filename = filename, - maxSize = maxFileSize, - maxIndex = maxBackupIndex or 1 - } - - return logging.new( function(self, level, message) - - local f, msg = openRollingFileLogger(obj) - if not f then - return nil, msg - end - local s = logging.prepareLogMsg(logPattern, os.date(), level, message) - f:write(s) - return true - end - ) -end diff --git a/samples/winecellarWITHDORM/Win32/Debug/Lua/logging/socket.lua b/samples/winecellarWITHDORM/Win32/Debug/Lua/logging/socket.lua deleted file mode 100644 index 95531693..00000000 --- a/samples/winecellarWITHDORM/Win32/Debug/Lua/logging/socket.lua +++ /dev/null @@ -1,35 +0,0 @@ -------------------------------------------------------------------------------- --- Sends the logging information through a socket using luasocket --- --- @author Thiago Costa Ponte (thiago@ideais.com.br) --- --- @copyright 2004-2011 Kepler Project --- -------------------------------------------------------------------------------- - -require"logging" -local socket = require"socket" - -function logging.socket(address, port, logPattern) - - return logging.new( function(self, level, message) - local s = logging.prepareLogMsg(logPattern, os.date(), level, message) - - local socket, err = socket.connect(address, port) - if not socket then - return nil, err - end - - local cond, err = socket:send(s) - if not cond then - return nil, err - end - socket:close() - - return true - end - ) -end - -return logging.socket - diff --git a/samples/winecellarWITHDORM/Win32/Debug/Lua/logging/sql.lua b/samples/winecellarWITHDORM/Win32/Debug/Lua/logging/sql.lua deleted file mode 100644 index 06a3745a..00000000 --- a/samples/winecellarWITHDORM/Win32/Debug/Lua/logging/sql.lua +++ /dev/null @@ -1,64 +0,0 @@ -------------------------------------------------------------------------------- --- Saves the logging information in a table using luasql --- --- @author Thiago Costa Ponte (thiago@ideais.com.br) --- --- @copyright 2004-2011 Kepler Project --- -------------------------------------------------------------------------------- - -require"logging" - -function logging.sql(params) - - params = params or {} - params.tablename = params.tablename or "LogTable" - params.logdatefield = params.logdatefield or "LogDate" - params.loglevelfield = params.loglevelfield or "LogLevel" - params.logmessagefield = params.logmessagefield or "LogMessage" - - if params.connectionfactory == nil or type(params.connectionfactory) ~= "function" then - return nil, "No specified connection factory function" - end - - local con, err - if params.keepalive then - con, err = params.connectionfactory() - end - - return logging.new( function(self, level, message) - if (not params.keepalive) or (con == nil) then - con, err = params.connectionfactory() - if not con then - return nil, err - end - end - - local logDate = os.date("%Y-%m-%d %H:%M:%S") - local insert = string.format("INSERT INTO %s (%s, %s, %s) VALUES ('%s', '%s', '%s')", - params.tablename, params.logdatefield, params.loglevelfield, - params.logmessagefield, logDate, level, string.gsub(message, "'", "''")) - - local ret, err = pcall(con.execute, con, insert) - if not ret then - con, err = params.connectionfactory() - if not con then - return nil, err - end - ret, err = con:execute(insert) - if not ret then - return nil, err - end - end - - if not params.keepalive then - con:close() - end - - return true - end - ) -end - -return logging.sql - diff --git a/samples/winecellarWITHDORM/Win32/Debug/Lua/userlib/commons.lua b/samples/winecellarWITHDORM/Win32/Debug/Lua/userlib/commons.lua deleted file mode 100644 index c98fed44..00000000 --- a/samples/winecellarWITHDORM/Win32/Debug/Lua/userlib/commons.lua +++ /dev/null @@ -1,149 +0,0 @@ -function comma_value(amount) - local formatted = amount - while true do - formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') - if (k==0) then - break - end - end - return formatted -end - -function htmltable_row(tt) - local s = '' - for k,v in pairs(tt) do - s = s ..'' - end - return s .. '' -end - -function keys(t) - local tt = {} - for k,v in pairs(t) do - table.insert(tt, k) - end - return tt -end - -function round(val, decimal) - if (decimal) then - return math.floor( (val * 10^decimal) + 0.5) / (10^decimal) - else - return math.floor(val+0.5) - end -end - -function format_num(amount, decimal, prefix, neg_prefix) - local str_amount, formatted, famount, remain - - decimal = decimal or 2 -- default 2 decimal places - neg_prefix = neg_prefix or "-" -- default negative sign - - famount = math.abs(round(amount,decimal)) - famount = math.floor(famount) - - remain = round(math.abs(amount) - famount, decimal) - - -- comma to separate the thousands - formatted = comma_value(famount) - - -- attach the decimal portion - if (decimal > 0) then - remain = string.sub(tostring(remain),3) - formatted = formatted .. "." .. remain .. - string.rep("0", decimal - string.len(remain)) - end - - -- attach prefix string e.g '$' - formatted = (prefix or "") .. formatted - - -- if value is negative then format accordingly - if (amount<0) then - if (neg_prefix=="()") then - formatted = "("..formatted ..")" - else - formatted = neg_prefix .. formatted - end - end - - return formatted -end - - -function table_size(t) - local c = 0 - for i in pairs(t) do - c=c+1 - end - return c -end - -function html_table(t, headers, celldumpers, table_attributes) - local headers = headers or {} - local celldumpers = celldumpers or {} - local html = {} - - if table_size(headers) == 0 then --[[doesn't work]] - local firstobj = t[1] - for k in pairs(firstobj) do - headers[k] = k - end - end - - --[[calculate table attributes]] - local table_attributes = table_attributes or {cellpadding="2", cellspacing="10"} - local attrs = "" - for k,v in pairs(table_attributes) do - attrs = attrs .. tostring(k) .. '="' .. tostring(v) .. '" ' - end - - table.insert(html, '
' .. htmlize(tostring(v)) .. '
') - - for k,v in ipairs(headers) do - table.insert(html, '') - end - - table.insert(html, '') - local cell - for k, a in pairs(t) do - table.insert(html, "") - for idx, obj in ipairs(headers) do - if celldumpers[obj.fieldname] then - cell = tostring(celldumpers[obj.fieldname](obj.fieldname, a)) - else - if obj.fieldname == nil then - cell = ' ' - else - cell = tostring(a[obj.fieldname]) - end - end - table.insert(html, "") - end - table.insert(html, "") - end - table.insert(html, '
'..v.coltitle..'
".. cell .."
') - return table.concat(html) -end - -function lookup(fieldvalue, lookuptable, keyfield, descfield) - for k,v in pairs(lookuptable) do - if fieldvalue == v[keyfield] then - return v[descfield] - end - end - return ' ' -end - -function fmtfloat(n) - return string.format("%2.2f", n) -end - - ---- Pads str to length len with char from left -string.lpad = function(str, len, char) - if char == nil then - char = ' ' - end - return string.rep(char, len - #str) .. str -end - diff --git a/samples/winecellarclient/MainFormU.dfm b/samples/winecellarclient/MainFormU.dfm index 4c7367b6..fc1d1400 100644 --- a/samples/winecellarclient/MainFormU.dfm +++ b/samples/winecellarclient/MainFormU.dfm @@ -95,6 +95,10 @@ object Form5: TForm5 object TabSheet3: TTabSheet Caption = 'Wine Edit' ImageIndex = 2 + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 object Label1: TLabel Left = 16 Top = 16 @@ -201,6 +205,10 @@ object Form5: TForm5 object TabSheet2: TTabSheet Caption = 'Raw' ImageIndex = 1 + ExplicitLeft = 0 + ExplicitTop = 0 + ExplicitWidth = 0 + ExplicitHeight = 0 object Memo1: TMemo Left = 0 Top = 0 diff --git a/samples/winecellarclient/WineCellarClient.dproj b/samples/winecellarclient/WineCellarClient.dproj index de91f7e7..0434ac24 100644 --- a/samples/winecellarclient/WineCellarClient.dproj +++ b/samples/winecellarclient/WineCellarClient.dproj @@ -1,7 +1,7 @@  {FB43C995-572F-45E6-8600-AD01C440C753} - 15.4 + 18.1 VCL WineCellarClient.dpr True @@ -52,6 +52,7 @@ false + true true cxPivotGridChartRS17;JvMM;dxSkinSevenRS17;dxSkinBlueprintRS17;dxSkinHighContrastRS17;dxSkinOffice2007BlackRS17;dxCoreRS17;cxPageControldxBarPopupMenuRS17;dxSkinXmas2008BlueRS17;dxPSDBTeeChartRS17;JvCrypt;dxPSTeeChartRS17;dxSkinSummer2008RS17;dxPScxSchedulerLnkRS17;dxSkinBlueRS17;dxSkinDarkRoomRS17;DBXInterBaseDriver;DataSnapServer;DataSnapCommon;dxPScxTLLnkRS17;JvNet;JvDotNetCtrls;dxRibbonRS17;DbxCommonDriver;cxDataRS17;vclimg;dxSkinsdxBarPainterRS17;dxPSdxDBTVLnkRS17;dbxcds;DatasnapConnectorsFreePascal;NxDBGridDsgn_dxe3;JvXPCtrls;dxSkinMoneyTwinsRS17;vcldb;cxExportRS17;dxPSCoreRS17;dxBarExtItemsRS17;dxGDIPlusRS17;FMXfrx17;dxNavBarRS17;CustomIPTransport;cxLibraryRS17;cxGridRS17;dxSkinOffice2010BlackRS17;dsnap;IndyIPServer;IndyCore;dxSkinMcSkinRS17;CloudService;dxPScxCommonRS17;FmxTeeUI;frxDB17;AnyDAC_PhysDb2_D17;dxSkinsdxDLPainterRS17;dxSkiniMaginaryRS17;JvDB;JvRuntimeDesign;dxPScxVGridLnkRS17;JclDeveloperTools;dxSkinSevenClassicRS17;dxPScxExtCommonRS17;MyFrameTestPackage;dxPScxSSLnkRS17;NxGridRun_dxe3;dxSkinLilianRS17;fs17;dxPSdxLCLnkRS17;dxSkinOffice2010BlueRS17;NxCommonRun_dxe3;bindcompfmx;DataBindingsVCL170;dxSkinOffice2010SilverRS17;vcldbx;cxSchedulerGridRS17;dbrtl;bindcomp;inetdb;JvPluginSystem;dxBarRS17;DataBindings;DBXOdbcDriver;IcsCommonDXE3Run;JvCmp;dxBarDBNavRS17;dxSkinWhiteprintRS17;JvTimeFramework;xmlrtl;dxSkinsdxRibbonPainterRS17;ibxpress;dxDockingRS17;vclactnband;bindengine;soaprtl;FMXTee;dxADOServerModeRS17;bindcompvcl;dxBarExtDBItemsRS17;dxPSPrVwRibbonRS17;Jcl;vclie;dxSkinOffice2007PinkRS17;cxPageControlRS17;dxSkinscxPCPainterRS17;AnyDAC_PhysADS_D17;AnyDAC_PhysIB_D17;dxmdsRS17;dxSkinTheAsphaltWorldRS17;DBXInformixDriver;Intraweb;dxPsPrVwAdvRS17;NxInspectorRun_dxe3;dxSkinSilverRS17;dxdborRS17;dsnapcon;DBXFirebirdDriver;fsDB17;inet;dorm_runtime_xe3;JvPascalInterpreter;vclx;dxSkinStardustRS17;cxEditorsRS17;DBXSybaseASADriver;NxInspectorDsgn_dxe3;dbexpress;IndyIPClient;AnyDAC_PhysMySQL_D17;cxTreeListdxBarPopupMenuRS17;dxSkinVS2010RS17;NxGridDsgn_dxe3;dxThemeRS17;DBXSqliteDriver;dxPScxGridLnkRS17;fmx;JvDlgs;IndySystem;TeeDB;dxSkinValentineRS17;vclib;inetdbbde;DataSnapClient;dxSkinDevExpressStyleRS17;DataSnapProviderClient;DBXSybaseASEDriver;cxBarEditItemRS17;AnyDAC_PhysMSAcc_D17;dxServerModeRS17;cxPivotGridOLAPRS17;cxSchedulerRS17;MetropolisUILiveTile;AnyDAC_PhysSQLITE_D17;dxPSLnksRS17;dxSkinPumpkinRS17;dxPSdxDBOCLnkRS17;cxVerticalGridRS17;dxSkinSpringTimeRS17;vcldsnap;dxSkinDevExpressDarkStyleRS17;DBXDb2Driver;AnyDAC_ComI_D17;DBXOracleDriver;AnyDAC_PhysMSSQL_D17;JvCore;NxDBGridRun_dxe3;vclribbon;AnyDAC_Comp_D17;cxSpreadSheetRS17;dxSkinLiquidSkyRS17;AnyDAC_PhysODBC_D17;fmxase;vcl;dxSkinOffice2007SilverRS17;AnyDAC_PhysPg_D17;IndyIPCommon;DBXMSSQLDriver;CodeSiteExpressPkg;dxPSdxOCLnkRS17;dcldxSkinsCoreRS17;JvAppFrm;AnyDAC_PhysASA_D17;inetdbxpress;webdsnap;NxCollectionRun_dxe3;AnyDAC_PhysOracle_D17;dxSkinCoffeeRS17;JvDocking;adortl;dxSkinscxSchedulerPainterRS17;JvWizards;NxCollectionDsgn_dxe3;frx17;NxCommonDsgn_dxe3;dxtrmdRS17;dxPScxPCProdRS17;AnyDAC_GUIxForms_D17;JvBands;rtl;DbxClientDriver;AnyDAC_PhysTDBX_D17;dxTabbedMDIRS17;dxComnRS17;dxSkinSharpPlusRS17;dxSkinsCoreRS17;dxSkinLondonLiquidSkyRS17;dxdbtrRS17;Tee;JclContainers;NxAddonsRun_dxe3;CPortLibDXE;JvSystem;dxorgcRS17;svnui;dxSkinBlackRS17;JvControls;NxSheetRun_dxe3;IndyProtocols;DBXMySQLDriver;dxLayoutControlRS17;bindcompdbx;TeeUI;JvJans;JvPrintPreview;JvPageComps;JvStdCtrls;JvCustom;dxSkinOffice2007BlueRS17;dxPScxPivotGridLnkRS17;dxSpellCheckerRS17;vcltouch;dxSkinOffice2007GreenRS17;dxSkinSharpRS17;websnap;dxSkinFoggyRS17;dxTileControlRS17;VclSmp;FMXfrxDB17;dxSkinDarkSideRS17;cxPivotGridRS17;DataSnapConnectors;AnyDAC_Phys_D17;fmxobj;SynEdit_RXE3;JclVcl;cxTreeListRS17;dxPSdxFCLnkRS17;dxSkinGlassOceansRS17;frxe17;svn;dxFlowChartRS17;fmxdae;dxSkinsdxNavBarPainterRS17;bdertl;VirtualTreesR;DataSnapIndy10ServerTransport;dxDBXServerModeRS17;dxSkinCaramelRS17;$(DCC_UsePackage) 1033 @@ -71,6 +72,9 @@ true + true + true + 1033 false @@ -143,8 +147,402 @@ WineCellarClient.dpr + + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + Embarcadero C++Builder Office 2000 Servers Package + Embarcadero C++Builder Office XP Servers Package + - + + + + 0 + .dll;.bpl + + + 1 + .dylib + + + Contents\MacOS + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + + + Contents\Resources + 1 + + + + + classes + 1 + + + + + Contents\MacOS + 0 + + + 1 + + + Contents\MacOS + 1 + + + + + 1 + + + 1 + + + 1 + + + + + res\drawable-xxhdpi + 1 + + + + + library\lib\mips + 1 + + + + + 1 + + + 1 + + + 0 + + + 1 + + + Contents\MacOS + 1 + + + library\lib\armeabi-v7a + 1 + + + 1 + + + + + 0 + + + Contents\MacOS + 1 + .framework + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + 1 + + + 1 + + + + + library\lib\armeabi + 1 + + + + + 0 + + + 1 + + + Contents\MacOS + 1 + + + + + 1 + + + 1 + + + 1 + + + + + res\drawable-normal + 1 + + + + + res\drawable-xhdpi + 1 + + + + + res\drawable-large + 1 + + + + + 1 + + + 1 + + + 1 + + + + + ..\ + 1 + + + ..\ + 1 + + + + + res\drawable-hdpi + 1 + + + + + library\lib\armeabi-v7a + 1 + + + + + Contents + 1 + + + + + ..\ + 1 + + + + + 1 + + + 1 + + + 1 + + + + + res\values + 1 + + + + + res\drawable-small + 1 + + + + + res\drawable + 1 + + + + + 1 + + + 1 + + + 1 + + + + + 1 + + + + + res\drawable + 1 + + + + + 0 + + + 0 + + + Contents\Resources\StartUp\ + 0 + + + 0 + + + 0 + + + 0 + + + + + library\lib\armeabi-v7a + 1 + + + + + 0 + .bpl + + + 1 + .dylib + + + Contents\MacOS + 1 + .dylib + + + 1 + .dylib + + + 1 + .dylib + + + + + res\drawable-mdpi + 1 + + + + + res\drawable-xlarge + 1 + + + + + res\drawable-ldpi + 1 + + + + + 1 + + + 1 + + + + + + + + + + + True False @@ -154,4 +552,5 @@ + diff --git a/samples/winecellarclient/WineCellarClient.res b/samples/winecellarclient/WineCellarClient.res index df816d2ce26fa02a917c6273326d7ef2f3c36e93..49961f02955af7f4410053f2134beb8e80153c40 100644 GIT binary patch delta 326 zcmca}in--1^M;TIOcz)uhdsDlub^O)l3I|Omy(*7TxrLp00eM>6361=)ZC;Ts5nq2 z5h~ybR9=!W+n!P$u7?v0LXz21poj5