Clipper On Line • Ver Tópico - Compilação mais rápida

Compilação mais rápida

Aqui você poderá oferecer suas Contribuições, Dicas e Tutoriais (Texto ou Vídeo) que sejam de interesse de todos.

Moderador: Moderadores

 

Compilação mais rápida

Mensagempor JoséQuintas » 26 Ago 2019 13:26

Pra deixar a compilação mais rápida....
Só assinar os EXEs utilizados, isso inclui o compilador C !!!!

comp1 sefaz.png


comp2 josequintas.png


comp3 integra.png


sefazclass - 10 segundos
josequintas - 36 segundos
aplicativo - 21 segundos, incluindo compactação e assinatura

   FOR EACH cFile IN { "hbmk2.exe", "gcc.exe", "harbour.exe", "upx.exe" }
      cPathFile := CheckFileOnPath( cFile )
      IF Empty( cPathFile )
         ? cFile + " not in PATH"
         Inkey(2)
      ELSEIF ! TestExeAssinado( cPathFile + cFile )
         ? cPathFile + cFile + " nao assinado"
         Inkey(2)
      ENDIF
   NEXT


Coloquei a checagem no meu programa de build, e descobri que o gcc.exe não é assinado.

Lembrando:

A checagem em um EXE acontece A CADA CHAMADA, CADA FONTE que é compilado.
Para um aplicativo com centenas de fontes... centenas de vezes.
Ao ser assinado, há redução de tempo nessa checagem, o que torna mais rápido.
harbour.exe, hbmk2.exe, gcc.exe e qualquer programa muito usado precisam ser assinados.
compilador de resource e linqueditor nem tanto, porque é usado uma única vez durante a compilação.

Quanto mais lenta a máquina, mais diferença isso faz !!!

Meu velhinho:
comp4.png
comp4.png (9.46 KiB) Visualizado 1611 vezes
José M. C. Quintas
Harbour 3.2, mingw, gtwvg, multithread, dbfcdx, ADO+MySql, PNotepad
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Avatar de usuário

JoséQuintas
Membro Master

Membro Master
 
Mensagens: 18011
Data de registro: 26 Fev 2007 11:59
Cidade/Estado: São Paulo-SP
Curtiu: 15 vezes
Mens.Curtidas: 1206 vezes

Compilação mais rápida

Mensagempor JoséQuintas » 26 Ago 2019 13:37

Acrescentando:
Antigamente eu preferia o Microsoft Visual C porque era mais rápido.
Alguns minutos com o MSVC e muuuuitos minutos com o MINGW.
Como deu pra ver, está demorando 21 segundos com MINGW para o aplicativo que mais compilo, incluindo compactação e assinatura.

Conclusão:
Porque o Microsoft Visual C era mais rápido pra compilar?
principalmente porque a Microsoft assina tudo !!!!

MINGW 8.1 é o que estou usando.
Se assinarem e continuar lento, pode ser a versão do MINGW.

No meu caso, ao trocar de pasta meu build apaga TUDO que é temporário.
A compilação foi COMPLETA, a menos que o incremental verifique pelo EXE.

Se o motivo de usarem blinker for apenas velocidade... está na hora de rever isso, e comparar com um mingw assinado.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg, multithread, dbfcdx, ADO+MySql, PNotepad
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Avatar de usuário

JoséQuintas
Membro Master

Membro Master
 
Mensagens: 18011
Data de registro: 26 Fev 2007 11:59
Cidade/Estado: São Paulo-SP
Curtiu: 15 vezes
Mens.Curtidas: 1206 vezes

Compilação mais rápida

Mensagempor JoséQuintas » 26 Ago 2019 13:41

assinei hoje....
assina1.png
José M. C. Quintas
Harbour 3.2, mingw, gtwvg, multithread, dbfcdx, ADO+MySql, PNotepad
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Avatar de usuário

JoséQuintas
Membro Master

Membro Master
 
Mensagens: 18011
Data de registro: 26 Fev 2007 11:59
Cidade/Estado: São Paulo-SP
Curtiu: 15 vezes
Mens.Curtidas: 1206 vezes

Compilação mais rápida

Mensagempor JoséQuintas » 26 Ago 2019 22:19

uso a signtool, só digitar o comando de assinar.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg, multithread, dbfcdx, ADO+MySql, PNotepad
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Avatar de usuário

JoséQuintas
Membro Master

Membro Master
 
Mensagens: 18011
Data de registro: 26 Fev 2007 11:59
Cidade/Estado: São Paulo-SP
Curtiu: 15 vezes
Mens.Curtidas: 1206 vezes

Compilação mais rápida

Mensagempor JoséQuintas » 26 Ago 2019 22:23

signtool
SignTool Error: A required parameter is missing.
Usage: signtool <command> [options]

        Valid commands:
                sign       --  Sign files using an embedded signature.
                signwizard --  Launch the signing wizard.
                timestamp  --  Timestamp previously-signed files.
                verify     --  Verify embedded or catalog signatures.
                catdb      --  Modify a catalog database.

For help on a specific command, enter "signtool <command> /?"


signtool sign /?
Usage: signtool sign [options] <filename(s)>

Use the "sign" command to sign files using embedded signatures. Signing
protects a file from tampering, and allows users to verify the signer (you)
based on a signing certificate. The options below allow you to specify signing
parameters and to select the signing certificate you wish to use.

Certificate selection options:
/a          Select the best signing cert automatically. SignTool will find all
            valid certs that satisfy all specified conditions and select the
            one that is valid for the longest. If this option is not present,
            SignTool will expect to find only one valid signing cert.
/ac <file>  Add an additional certificate, from <file>, to the signature block.
/c <name>   Specify the Certificate Template Name (Microsoft extension) of the
            signing cert.
/f <file>   Specify the signing cert in a file. If this file is a PFX with
            a password, the password may be supplied with the "/p" option.
            If the file does not contain private keys, use the "/csp" and "/k"
            options to specify the CSP and container name of the private key.
/i <name>   Specify the Issuer of the signing cert, or a substring.
/j <dll>    Name of the DLL that provides attributes of the signature.
/jp <param> Parameter to be passed to the DLL.
/n <name>   Specify the Subject Name of the signing cert, or a substring.
/p <pass.>  Specify a password to use when opening the PFX file.
/r <name>   Specify the Subject Name of a Root cert that the signing cert must
            chain to.
/s <name>   Specify the Store to open when searching for the cert. The default
            is the "MY" Store.
/sm         Open a Machine store instead of a User store.
/sha1 <h>   Specify the SHA1 hash of the signing cert.
/u <usage>  Specify the Enhanced Key Usage that must be present in the cert.
            The parameter may be specified by OID or by string. The default
            usage is "Code Signing" (1.3.6.1.5.5.7.3.3).
/uw         Specify usage of "Windows System Component Verification"
            (1.3.6.1.4.1.311.10.3.6).

Private Key selection options:
/csp <name> Specify the CSP containing the Private Key Container.
/kc <name>  Specify the Key Container Name of the Private Key.
/snk <file>    Specify the SNK file containing the SN Private Key.
/sncsp <name>  Specify the CSP containing the SN Private Key Container.
/snkc <name>   Specify the Key Container Name of the SN Private Key.
/snks <1 | 2>  Specify the SN Private Key to be used (1 = AT_KEYEXCHANGE,
               2 = AT_SIGNATURE, default is AT_SIGNATURE).

Signing parameter options:
/d <desc.>  Provide a description of the signed content.
/du <URL>   Provide a URL with more information about the signed content.
/t <URL>    Specify the timestamp server's URL. If this option is not present,
            the signed file will not be timestamped. A warning is generated if
            timestamping fails.

Other options:
/ph         Generate page hashes for executable files if supported.
/nph        Suppress page hashes for executable files if supported.
            The default is determined by the SIGNTOOL_PAGE_HASHES
            environment variable and by the wintrust.dll version.
/q          No output on success and minimal output on failure. As always,
            SignTool returns 0 on success, 1 on failure, and 2 on warning.
/v          Print verbose success and status messages. This may also provide
            slightly more information on error.

José M. C. Quintas
Harbour 3.2, mingw, gtwvg, multithread, dbfcdx, ADO+MySql, PNotepad
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Avatar de usuário

JoséQuintas
Membro Master

Membro Master
 
Mensagens: 18011
Data de registro: 26 Fev 2007 11:59
Cidade/Estado: São Paulo-SP
Curtiu: 15 vezes
Mens.Curtidas: 1206 vezes




Retornar para Contribuições, Dicas e Tutoriais

Quem está online

Usuários vendo este fórum: Nenhum usuário registrado online e 17 visitantes


Ola Amigo, espero que meu site e forum tem lhe beneficiado, com exemplos e dicas de programacao.
Entao divulgue o link da Doacao abaixo para seus amigos e redes sociais ou faça uma doacao para o site forum...
MUITO OBRIGADO PELA SUA DOACAO!
Faça uma doação para o forum
cron
v
Olá visitante, seja bem-vindo ao Fórum Clipper On Line!
Efetue o seu login ou faça o seu Registro