Jump to content


Popular Content

Showing content with the highest reputation on 01/16/23 in all areas

  1. loki5100

    Integrate AAR SDK in FMX Android app

    I have just made the AndroidMerger Tool: Integrate AAR SDK in FMX Android app An Android library, also called as Android Archive, includes everything you need to build an app like source files, resource files, manifest etc. This is the reason why AARs are different from JARs. AARs can contain resource files as well other than compiled byte code. Adding such library to Delphi project is long and convoluted process consisting of extracting resources from library, manually adding them to Delphi deployment files, compiling R.Java class, checking dependancies, etc. With AndroidMerger all of the above can now be done automatically in a single command line. In brief AndroidMerger will: Use graddle or internal implementation to list all dependencies. Download libraries and dependancies from local or central maven repository. Merge the resources of all AARs inside a single directory. Merge the AndroidManifest files of all AARs inside AndroidManifest.template.xml. Merge google-services.json in the resources of the project. Create the R.jar with all resource IDs using aapt or aapt2. Update the project file (.dproj) to include all resources. Generate the Delphi native bridge file from the Java libraries. Everything is here (source code included) : https://github.com/MagicFoundation/Alcinoe/tree/master/Tools/AndroidMerger
  2. chmichael

    JSON text validation...

    @Lars FosdalDunno, I didn't post this so i am changing the password to be sure!
  3. Every time I've tried asking ChatGPT how to do something using ICS components it answers with Indy samples. Has Remy paid for promoted listings on ChatGPT, so Indy results appear above ICS? <g>
  4. programmerdelphi2k

    MSBuild - set library paths without touching IDE options

    Note: when you "build" with "Use MSBuild..." on project, you'll have a file .CMDS with all properties necessary. then, I think that it's not necessary add it on command-line. You need just have in your "output EXE/DLL" folder of course, you can create this file manually! = <<project name>>.CMDS in Project1.DPROJ is added: <DCC_UseMSBuildExternally>true</DCC_UseMSBuildExternally> <Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/> http://blog.blong.com/2017/10/delphi-buildinstall-to-android-from.html
  5. Uwe Raabe

    MSBuild - set library paths without touching IDE options

    Have you actually tried to specify DCC_UnitSearchPath on the MSBuild command? msbuild /property:DCC_UnitSearchPath="d:\mycomp\lib" myproj.dproj
  6. This is how I compile with older versions of controls.. might help you get started. The CMD file is in the project root and changes directory to Source: @ECHO OFF :: :: How to Redirect to an older Version of VCL :: Since no IDE is required this will work for NON installed versions of any VCL controls ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: :: Redirect DX, to compile with source we need to update all these ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: REM @SET DXVCL=%VCL%\DevExpress VCL\20.2.8 (26-May-2021) for PA2-R12 REM IF NOT Exist "%DXVCL%" ( REM echo."%DXVCL%", Directory does not exist REM Pause ) REM CALL :SetEnvVar "DXLibs" REM CALL :SetEnvVar "DXSources" REM SET DX REM pause :: :: Redirect UNI, to compile with source we need to update all these ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: REM @SET UNIVCL=%VCL%\UniDAC\9.0.1 (14-Sep-2021) REM IF NOT Exist "%UNIVCL%" ( REM echo."%UNIVCL%", Directory does not exist REM Pause ) REM CALL :SetEnvVar "UNILIB" REM CALL :SetEnvVar "UniSources" REM SET Uni REM pause :: :: Environmental Vars declared in the IDE must be redeclared ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @SET CompilerV=28 @SET ProductVersion=22.0 @SET IDEVER=11.0.2 :: :: Now expand those with rsVars.bat ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: call "C:\Program Files (x86)\Embarcadero\Studio\22.0\bin\rsvars.bat" :: :: Reset the rsVars.bat defaults ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @SET BDSCOMMONDIR=D:\Embarcadero Studio\22.0 :: :: Add the location of cmd.exe ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @SET PATH=%WINDIR%\System32;%PATH% cd source :: Recomended in 10.4 Release Notes.. MSBuild APP.dproj /t:clean REM TIMEOUT /T 10 MSBuild APP.dproj /t:build /v:q /p:Config=Release /p:platform=Win64 cd .. :: View any output notices pause :: ========== FUNCTIONS ========== EXIT /B :: Read a Value from Environment :: Param 1: Name of output variable. :: Param 2: SubKey. :RegQueryEnv @ECHO OFF SET KEY="HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" :: Remove the double quotes Set SUBKEY=%~2 FOR /F "skip=2 tokens=2,*" %%A IN ('reg.exe query %KEY% /v "%SUBKEY%"') DO ( set %1=%%B ) EXIT /B :: Expand any EnvVars in the Text :: Param 1: Name of output variable. :: Param 2: Text to Expand (%UNIVCL%\Lib\Delphi$(CompilerV)) :ExpandEnvVar @ECHO OFF set %1=%~2 REM echo.ExpandEnvVar=%Text% EXIT /B :: Combines RegQuery and ExpandEnvVar then uses @SET :: Param 1: SubKey. :SetEnvVar @ECHO OFF CALL :RegQueryEnv Value %1 CALL :ExpandEnvVar Value "%Value%" @SET %~1=%Value%
  7. I'd love an AI that would suggest improvements to the code that I write, instead of writing the code for me.