• 编译Aseprite

    ·

    发布于

    修改于

    需要提前准备好skia库,并在下面的参数中指定skia库在硬盘上的路径。

    cmake -DCMAKE_BUILD_TYPE=Release -DLAF_BACKEND=skia -DSKIA_DIR=D:\Aseprite-v1.3-rc4-Source\skia -DSKIA_LIBRARY_DIR=D:\Aseprite-v1.3-rc4-Source\skia\out\Release-x64 -DSKIA_LIBRARY=D:\Aseprite-v1.3-rc4-Source\skia\out\Release-x64\skia.lib -G Ninja ..

  • 两种获取RIP的方式

    ·

    发布于

    修改于

    //只有X64可以用
    void get_rip_x64only()
    {
      void* rip;
      __asm__ __volatile__("lea 0(%%rip),%0":"=r"(rip));
    }
    //X86和X64都可以用
    void get_rip_x86andx64()
    {
      void* rip;
      __asm__ __volatile__(
      "jmp _label2\n\t"
      "_label1:\n\t"
      "jmp _getRIP\n\t"
      "_label2:\n\t"
      "call _label1\n\t"
      "_getRIP:\n\t"
      "pop %%rax\n\t"
      "movq %%rax,%0"
      :"=r"(rip)
      );    
    }

  • 编译Qt

    ·

    发布于

    修改于

    configure -prefix "C:\lib\qt\5.15.11\debug-and-release" -confirm-license -opensource -debug-and-release -static -static-runtime -platform win32-msvc -no-opengl -nomake examples -nomake tests -skip qtwebengine
    configure -prefix "C:\lib\qt\6.2.6\debug-and-release" -confirm-license -opensource -debug-and-release -static -static-runtime -platform win32-msvc -no-opengl -nomake examples -nomake tests -skip qtwebengine
    configure -prefix "C:\lib\qt\6.5.3\debug-and-release" -confirm-license -opensource -debug-and-release -static -static-runtime -platform win32-msvc -no-opengl -nomake examples -nomake tests -skip qtwebengine

  • QT 5.15 开启DPI缩放

    ·

    发布于

    修改于

    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
    //或
    QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);

  • 更新.gitignore

    ·

    发布于

    修改于

    git rm -r --cached .
    git add .
    git commit -m "update .gitignore"
    git push -u origin main

  • 用openssl生成代码签名证书

    ·

    发布于

    修改于

    需要3个证书:根证书、中间证书、用户证书。

    因为同时使用这3个证书欺骗效果更好一些,证书路径如图所示。

    (更多…)

  • openssl生成根证书

    ·

    发布于

    修改于

    #生成key
    openssl genrsa -aes256 -out root.key 4096
    #生成csr
    openssl req -new -key root.key -out root.csr -subj "/C=US/O=test organization/OU=www.test.com/CN=test CA"
    #生成v3证书需要特殊的配置文件
    openssl x509 -req -days 10950 -sha256 -extfile "D:\v3.cnf" -extensions v3_ca -extensions v3_req -signkey root.key -in root.csr -out root.crt
    #-name是友好名称
    openssl pkcs12 -export -name "test CA" -out root.pfx -inkey root.key -in root.crt
    #从pfx中分离出cer
    openssl pkcs12 -nodes -nokeys -in root.pfx -passin pass:openssl -out root.cer
    (更多…)

  • SYSTEM AppData Local目录

    ·

    发布于

    修改于

    在SYSTEM SERVICE中获取到的APPDATA目录是C:\Windows\system32\config\systemprofile\AppData\Local

    测试了Win7 64bit、Server 2019,均是如此。

    (更多…)

  • miniLZO的使用

    ·

    发布于

    修改于

    (更多…)


  • 判断是否具备绕过UAC的条件

    ·

    发布于

    修改于

    管理员用户-UAC关闭状态-直接运行
    (更多…)

最新