Build Qt from source and install it on Windows

The major problem is its installation. 1. Doing shadow building. Configure the building in a side directory. configure -target xp -prefix the-correct-path-to-install -D _USING_V110_SDK71_ For example, the command with ssl support should be like this: configure -target xp -prefix C:/Qt/5.6.3/msvc2015_xp -D _USING_V110_SDK71_ -openssl -I C:/openssl-1.0.2s/inc32 -L C:/openssl-1.0.2s/out32 The correct install path is important, since a…

Android studio 3.0, modules and IDE symbol indexing

Long in short, after upgraded to Android Studio 3.0, symbols from aar binary modules cannot be resolved in IDE, although the building/make is successful. Clean or Rebuild project is useless.   Two steps solution: Change line compile(‘the-aar-module-name’) to implementation project(‘the-aar-module-name’) Select ‘Invalidate Caches / Restart‘ from File menu.

Selecting a correct order of API call sequences is important

In short, ffmpeg changes its API in recent versions. One of them is marking AVStream.codec as deprecated. On other side, a AVCodecParameters * AVStream.codecpar was added for codec information described in the stream. To decode data read from stream correctly, we must create a AVCodecContext through avcodec_alloc_context3(), copy codec information from AVStream.codecpar to this allocated AVCodecContext, and…

A simple shell script integrated to Xcode to generate and copy architecture adaptive dylib in

if [ “$CONFIGURATION” == “Debug” ]; then    LIBFFMPEG_DIR=”$PROJECT_DIR/../../ffmpeg/ios/universal/debug” else    LIBFFMPEG_DIR=”$PROJECT_DIR/../../ffmpeg/ios/universal/release” fi for a in $ARCHS; do     EXTRACT_ARCHS=”$EXTRACT_ARCHS -extract $a” done lipo “$LIBFFMPEG_DIR/lib/libffmpeg.dylib” $EXTRACT_ARCHS -output “$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/libffmpeg.dylib” if [ “$CODE_SIGNING_REQUIRED” == “YES” ]; then    codesign -s “$EXPANDED_CODE_SIGN_IDENTITY” “$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/libffmpeg.dylib” fi install_name_tool -change “libffmpeg.dylib” “@executable_path/libffmpeg.dylib” “$BUILT_PRODUCTS_DIR/$EXECUTABLE_PATH”

Problem again. Assembly generated by clang or written manually, using integrated assembler or not

Simply, clang has an option ‘–no-integrated-as’ so that the compiler invokes apple’s standalone ‘as’ assembler instead of using clang’s built-in. But, either has its own lost pieces. Without ‘–no-integrated-as’, clang would use its internal assembler. Unfortunately it doesn’t recognize the mnemonic ‘ldmltfd’ With ‘–no-integrated-as’, apple’s ‘as’ assembler reports an error in pesudo instruction ‘.ios_version_min’, which was apparently…

Some tricks in passing file descriptors through unix domain socket

Passing file descriptors through unix domain socket is well-known. But there still have some tricks in implementation. I spent one day to deal with it in Mac OS X by digging into xnu source. How to pass multiple file descriptors in one sendmsg() call? Simple. Put all file descriptors one by one after struct cmsghdr.…

Some license checkpoints in Reveal app.

[IBAAppDelegate applicationDidFinishLaunching:] would call [IBAAppDelegate verifyCodeSignature] to verify code signature of the app to prevent itself from modifications. [IBATrialModeReminderPresenter shouldShowTrailModeSheet] controls whether trial mode sheet, including quit after trial period expired, would be shown. [IBAMainWindowController configureTitleBarAccesoryView] will create IBATrialModeReminderTitleBarAccessoryView to shown trial information on window’s title bar. That’s all.

Make IB designed view work with iCarousel

Oddly, View designed in IB would have FlexibleWidth+FlexibleHeight set in it autoresizingMask, even if you cleared everything in auto resizing box, regardless using AutoLayout or not. The behavior causes that subviews inside item view have wrong positions after transform3D with rotations. In short, item view’s width/height in subviews position/constraints calculation would be calculated as rotated…

Just found 2 issues in apple’s assembler for arm64

1) The classic ‘@‘ comment indicator is not recognized in -arch arm64 mode. Both ‘;‘ and ‘//‘ are permitted. I remembered ‘@‘ was acceptable in armv7 age. So the world changes so fast… 2) As ARM’s instruction reference manual, the instruction ‘movi‘ has a format as MOVI Vn.<T>, #uimm8{, LSL #shift} But as reported error if…