12月 01

HW-59T - Improving performance with the Windows Performance Toolkit
refer: http://channel9.msdn.com/Events/BUILD/BUILD2011/HW-59T
Note:
- Motivation for performance analysis:
- Performance related to multiple layered impact such as : hardware, OS, other application and process impact.
- Stage of performance improvement:
- Preception –> Measurement –> Analysis.
- It will be back and forth after analysis and re-preception.
- Tool list:
- Trace Capture: Windows Performance Recorder
- Tacce Analysis: Windows Performance Analizer
- Things to look out:
- Don’t assume you know what’s wrong.
- Don’t enable too much instrumentation
- Don’t trace longer than you need.
PLAT-203T Async everywhere: creating responsive APIs & apps
refer: http://channel9.msdn.com/Events/BUILD/BUILD2011/PLAT-203T
Note:
- Async only support on some API:
- XAML, Tile on UI
- GPS and portable debice on Device
- All network and communicate
- Applifetime, Authentication, Crytography on Fundamental
- Await
- Await is a simple way to against async API.
- Await will make the async highest priority and let the compiler know here need to wait the result come back. Code will run as sequencial.
- Error handling
try {
FileOpenPicker p = new FileOpenPicker();
p.FileTypeFilter.Add(".jpg");ry
var operation = p.PickSingleFileAsync();
operation.Completed = (IAsyncOperation<StorageFile> f) =>
{
MyButton.Content = f.GetResults().FileName;
};
operation.Start();
catch(…) {}
- try catch will only cover RED one, it need refine code to cover whole scope
try {
FileOpenPicker p = new FileOpenPicker();
p.FileTypeFilter.Add(".jpg");
MyButton.Content =
(await p.PickSingleFileAsync()).FileName;
} catch(Exception e) {}
- It will separate into “RED” and “Green” one but still cover on try catch.
- 5 top tips from presenter.
- Don’t worry about the COM apartment.
- Remember to start your operation.
- File picker cancel != Async Cancel
- It will complete but return NULL.
- “use exception for exceptional things”
- Don’t worry about Dispatcher.Invoke…
- Don’t worry about the concurrency
Refer: http://blogs.msdn.com/b/ericlippert/archive/2010/10/29/asynchronous-programming-in-c-5-0-part-two-whence-await.aspx
11月 16

APP-186T - Build advanced touch apps in Windows 8
refer: http://channel9.msdn.com/Events/BUILD/BUILD2011/APP-186T
- Major point of touch app design:
- Unify pen and touch into PointerPoint
- Get mouse and pen for free
- performance performance and performance
- Touch and Gesture support in framework
- Metro app with HTML or XAML—> Gesture event
- ICoreWindow –> Using point (touch simulate mouse click)
- Windows Runtime –> PointerPoint with GestureRecognizer
- PointerPoint:
- Whole related point implement is here, HID data also can get using PointerPoint.
- GestureRecognizer:
- It just like the Win7 multiple touch support on MSFT, it support kind of gesture such as:
- Tap, Hold, rotate and Scale
- But more support on Win8 such as:
- HoldWithMouse?
- RightTap
- To simulate with right click on mouse, such your finger about right click here.
- mmmm….. it should be MSFT patent here for right click.
- For desktop developer, MSFT also support full Windows Runtime about Gesture support –> Great!
- WM_Point –> the same as usual
- InteractionContexts –> mirror GestureRecognizer. Don’t forget WM_TOUCH and WM_GESTURE still support here.
- Pointer device –> identify source device (touch panel, mouse or other.)
11月 09

It need note that Windows 8 has two version of IE (it should say, one application but two entry for different mode)
But it is very tricky, if you type “open http://Web” on desktop explorer will open “Metro IE”
When you try to use this command to open web side, please note metro browser will be default option, not desktop browser.
ShellExecute(NULL,TEXT("open"), TEXT("http://msdn.microsoft.com"), TEXT(""),NULL,SW_SHOWNORMAL);
To specific using desktop browser, it should specific command on [HKEY_CLASSES_ROOT\http\shell\open\command]
11月 03

APP-209T Build polished collection and list apps in HTML5
refer: http://channel9.msdn.com/Events/BUILD/BUILD2011/APP-209T
- Collection: A set of related user content.
- This session talking about how to write customized list view by WinJS by uing
- Data Source
- Item Render (CSS)
- Layout (WinJS.UI.GridLayout)
- It could be easy to select image list view import your data source and put basicc control on your list view.
- Multi-select already support just add one propoties on it. (selectionMode = ‘multi’)
- ListView is easy to grouping if you could provide detail data of each item, group rule and group render (to descript how to group).
- Symantic Zoom:
- It is a way to zoom out/zoom in by semantic (such of “category”, “date”). It look like “Group By”.
- ListView also provide semantic zoom.
- Easy to implement to change <div id> to “zoomOutView” and related data control.
- If app is snapped (snapped on side).
十月 26

APP-737T - Metro style apps using XAML - what you need to know
Refer: http://channel9.msdn.com/Events/BUILD/BUILD2011/APP-737T
This session talking about XAML for Metro style application implement. Focus on XAML for C/C++/C#/VB on Metro style application development.
- Consistent with WPF and silverlight
- New in Windows 8 Metro
- New look and support for touch
- Deployment by Windows Store
- Tile –> splash screen to application
- New XAML UI Control
- Build in “Grouping”
- Windows 8 look and feel and its “selection model”
- Media player on Metro Style
- Grid view and Flip view
- Application Bar: Swipe from bottom/top to display
- Manipulation and gestures: It could handle rotation on Button_Clicp event.
- Metro Style App Concept
- Diversity of display and resolution
- Layout changed
- Snapped(small one on split), Filled (big one on split) and Full Screen
- It could be tested on simulator on VS2011 CTP.
- Metro style app lifetime
- Background apps are “Suspended”
- App notified.
- App will terminated when memory is low
- App will not notified.
- Event:
- Application.Current.Suspending –> Save state when suspend
- Application.Current.Resuming –> Restore state when resume
APP-116T - Prepare your apps for Windows 8 and beyond
Refer: http://channel9.msdn.com/Events/BUILD/BUILD2011/APP-116T
This is talking about application compatibility on Windows 8.
- Windows 8 is compatible with apps that run on Windows 7
- OS version increasement
- Application should not set upper bound for version handle
- Windows 8 version is 6.2
- DWM (Desktop Windows Manager) always ON
- If application try to turn off it, it will failed silently.
- Color depth must on 32-bit (for DWM limitation) but lower could be simulated
- Startuo application changed
- Apps on “Start” should goes to “task scheduler” or “automatic maintance”
- .NET 3.5 demanded
- Default is .NET 4.5 it could enable if user install .NET 3.5 application.
- Use Windows Resource Widely
- Use RegExpandSZ for path query
- New error code add one
- Some SUCCESSED might goes to FAILED.
- Manifest your executable
- Need add DPIAWARE for your application.
- Application compatibility <compatibility xmln..>
- Starting on Win7, if no this tag treat it as Vista application.
- Metro Style Application should managed it manifest
- <OSMinVersion><OSMaxVersionTested> to manage your metro app.
Actually, Windows CTP Compatibility Cookbook provide more overview for this.
APP-123T - Enabling trials and in-app offers in your Metro style app
refer: http://channel9.msdn.com/Events/BUILD/BUILD2011/APP-123T
- Trail is really matter
- 70 times download, 10 times revenue and 10% conversion.
- In-App Offer
- 72% revenue comes from app which present “In-App offers”
- 48% comes from “In-App offers”
- Flxibility option for this.
- Use your existing commerce
- maintain relationship, subscription and consumable phuchases.
- Ad supporteds
- Choice of ad controls
- One time purchase
- Time limited trail and features differentiated trails.
- Purchase over time
- Persisent purchase and Expiring purchase.
- Implement basic
- Check License
- It could use simulate since store still no open
- Get latest listing data
- Prompt for purchase
PLAT-775T/PLAT-776T - Your Metro style app, video and audio, Part 1/Part 2
refer: http://channel9.msdn.com/Events/BUILD/BUILD2011/PLAT-775T
refer: http://channel9.msdn.com/Events/BUILD/BUILD2011/PLAT-776T
It discussion about media API and Media element:
- Using media API could easy to build up tailored user experience application with little domain knowledge.
- HTML 5 standard <audio><video>
- DXVA full support
- You can creat rich media by CSS, JS and DOM.
- Windows 8 enhancement
- 3D video (Stereo 3D)
- S3D still not work on CTP version
- Audio/Video effect and extensibility
- Zoom/Mirror
- Audio output selection
- Background audio
- DRM
- Streaming media to TV and Audio systems
- System-wide support format
- File name:
- MP4/ASF
- Video:
- H264/VC1
- Audio:
- AAC/MP3/WMA
- Simple HTML5 video player all related feature: Seeking, bookmark, play/pause, channel switching, capture feature already support on build-in API.
- Media Focus:
- When app own media focus video could be see and heard
- When suspends it will remove from active list, and app will mute
- When select second media, it will leave original focus to new one.
- Media format extensibility
- Custmize your app specific support format
- Extension are packaged and local on your app (only for your app, no share)
- Extension could be naive (C++/COM) Media Fundation component.
- Extending your custom format
- Register DLL with in App manifest on MF(Media Fundation)
- Such audio/video source filter or demux
- In your app, register custom streaming/data format with ExtensibilityManager
- Register your custom video/audio encoder/decoder
- Custom effect could be insert effect pipeline
九月 30

BPS-1006 Tools for building Metro style apps
Refer video: http://channel9.msdn.com/Events/BUILD/BUILD2011/BPS-1006
Note:
It is introduction of VC2011, here is some major demo topic as follows:
- Auto spell which is powerful with Visual Assist
- Auto spell, finding related function and method. It is easy to go.
- JS debugging:
- It is cool to have debugger for JS which also support all debugging window (variable, watch…)
- Parallel stack debugging windows:
- It has visualization debugging tab for parallel which could show currently threading and each thread dependency.
- RT XAML editor:
- During debugging you also could editing XMAL code by select on UI or select on code segment to show UI change on fly.
- Simulator debugger:
- I think it is very cool stuff for me such we don’t have multiple touch panel on hand but we need implement some related to “Share”, “Search” which need finger slip.
- It also provide “finger”, “rotate”, “zoom” and it could simulate to different resolution for Metro UI debugging.
- Asynchronous programming (await, async)
- Refer here for more detail:
- Concept:
- Will folk another thread after “await” and response on original message loop to ensure response quickly.
- It look like to cut original message thread,one back to main and another keep doing async task.
- It help us to using linear thinking to do asynchronous programming
- Sample: (from here)
async void ArchiveDocuments(List<Url> urls)
{
Task archive = null;
for(int i = 0; i < urls.Count; ++i)
{
var document = await FetchAsync(urls[i]);
if (archive != null)
await archive;
archive = ArchiveAsync(document);
}
}
BPS-1005 Platform for Metro style apps
Refer video: http://channel9.msdn.com/Events/BUILD/BUILD2011/BPS-1005
Note:
- What is major different between Metro UI application with desktop application?
- No overlay window architect (all full screen)
- No message box related API.
- Device access all using asynchronous to ensure all application could response on time.
- About “Broker” in WinRT concern as follows:
- Impact system integrity.
- Impact user data
- Impact User private
- HTML5/CSS/JS great for Metro Apps
- MSFT try to enlarge their engineer base and try to draw Web engineer’s attention to join Metro Apps development.
- Package your application:
- Application could be easily to pack and upload to MSFT with one click on VS11.
- All package need digital signature before upload to App Store
TOOL-789C Bringing existing C++ code into Metro style apps
Refer video: http://channel9.msdn.com/Events/BUILD/BUILD2011/TOOL-789C
Note:
- About Metro UI app:
- No registry, GDI, MessageBox coding.
- Here is work/not work desktop app
- Work:
- Standard C++
- Parallel pattern
- Win32 (WinRT and Win32 subset)
- ATL (ATL subset)
- Not work:
- About WinRT
- Refer: Windows Runtime(WinRT) 揭秘
- Any old DLL component could be easy to pack to WinRT component if no depends limited list as above.
- Q&A
- Two Metro UI don’t have any way to communicate for now, currently it still isolate.
- For disable API, it might change depends engineer feedback to MSFT.
- All Metro UI need component could be pack to WinRT component and package today to delivery to end-user via store.
- Shared component is not work on Metro UI, all component must be side-by-side. Because you could not use CoCreateInstance by CLSID, so there is unique CLSID on Metro world.
- Whole app on Metro UI are isolate due to security and system integrity.
12月 19

上一篇文章: http://www.evanlin.com/blog/archives/001100.html
就像我前一篇文章一樣,我已經把Buildbot裝好了,並且可以跟P4連線(不過僅僅在於periodic[定期])。但是無法正常的透過Scheudler(也就是無法偵測到有最新的CODE更改來trigger build)。
I found Buildbot could not using "Scheduler Scheduler" but work well on "Periodic scheduler". As I check in Buildbot site it maybe three known issue as follows:
- #101 Set "revision" property when using computeSourceRevision
- #127 got_revision not tracked for perforce
- #229 Build properties "revision" and "got_revision" not populated for P4
Although I already change this by the patch but it sill could not fix the "scheduler". I think I will check with Buildbot team as well.
12月 15

要轉錄請務必標示文章出處: BlogE www.evanlin.com/blog
甚麼是BuildBot?
Buildbot 是一套由Python撰寫的client-server 架構的專案source code追蹤用的伺服器。 主要可以拿來做以下的用途:
- Code quality tracing: 可以定期或是只要有新的變動就主動下載source code並且build。 可以查出來哪個變動讓程式build不過。
- Multiple platform compiler testing: 針對一份程式碼要對應到多個platform 或是多整module, Buildbot 提供了很好的方式可以幫助你確認這件事情。
- Unit testing: 使用Buildbot 可以定期幫你的程式做unit testing。(當然~ unit testing program 得是你自己有準備好的)
需要的軟體:
在這裡先介紹所有你需要的軟體,可以事先去download 下來。
以上的版本已經確定在XP SP2 可以正確安裝並且執行無誤。希望各位也去下載適當版本。必須注意如果把Python換成新的版本(2.5 or 2.6)反而可能會造成安裝失敗。
或者你也可以去以下位置下載懶人包 。
懶人包: http://www.badongo.com/cn/file/12490044
安裝流程:
接下來你還必須要設定master.cfg 才能正常的啟動。
設定Buildbot:
Create MASTER
- "buildbot create-master <master_path>" <master_path> should be a path for Buildbot using. For my case using "buildbot create-master MASTER".
- Modify master.cfg on the <master_path>. (you could refer as master.cfg as lastest of this article)
Create Slave
- buildbot create-slave bot1name bot1:8010 bot1 123(default Master port is the same with setting in Master.cfg)
- c[’slavePortnum’] = 8010 #default is 9989
Start Master
- "buildbot start MASTER"
Start SLAVE
- "buildbot start bot1"
You could connect to http://localhost:10000 to see the server status.
Master.cfg
# 'master.cfg' in your buildmaster's base directory (although the filename
# can be changed with the --basedir option to 'mktap buildbot master').
p4env = {
'port': '192.168.XX.XX:XXXX', #P4 connect port
'user': 'user',
'passwd': 'passwd',
}
# This is the dictionary that the buildmaster pays attention to. We also use
# a shorter alias to save typing.
c = BuildmasterConfig = {}
####### BUILDSLAVES
# the 'slaves' list defines the set of allowable buildslaves. Each element is
# a tuple of bot-name and bot-password. These correspond to values given to
# the buildslave's mktap invocation.
from buildbot.buildslave import BuildSlave
c['slaves'] = [BuildSlave("bot1", "123")]
# 'slavePortnum' defines the TCP port to listen on. This must match the value
# configured into the buildslaves (with their --master option)
c['slavePortnum'] = 8010
####### CHANGESOURCES
# the 'change_source' setting tells the buildmaster how it should find out
# about source code changes. Any class which implements IChangeSource can be
# put here: there are several in buildbot/changes/*.py to choose from.
from buildbot.changes.p4poller import P4Source
c['change_source'] = P4Source(
p4base='//depot/Shared/Util/P4ReleaseNote/',
p4port = p4env['port'],
p4user = p4env['user'],
p4passwd = p4env['passwd'],
pollinterval= 60,
p4bin = 'c:/p4.exe',
split_file=lambda branchfile: branchfile.split('/',1),)
#from buildbot.changes.pb import PBChangeSource
#c['change_source'] = PBChangeSource()
####### SCHEDULERS
## configure the Schedulers
#Periodic schedulerfrom buildbot.scheduler import Scheduler, Periodic
periodic = Periodic("every_1_minutes", ["main"], 60)
c[’schedulers’] = [periodic]
####### BUILDERS
from buildbot.process import factory
from buildbot.steps.source import P4 #Must include P4 library.
from buildbot.steps.shell import Configure,Compile,Test
from buildbot.steps.python_twisted import Trial
####### Builder for P4 #############
f1 = factory.BuildFactory()
f1.addStep(P4,
p4port = p4env[’port’],
p4user = p4env[’user’],
p4passwd = p4env[’passwd’],
p4client = ‘BuildBot’,
p4base = ‘//depot/Shared/Util/P4ReleaseNote/’,
mode = "copy")
b1 = {
‘name’: "main",
’slavename’: "bot1",
‘builddir’: "main",
‘factory’: f1
}
c[’builders’] = [b1]
####### STATUS TARGETS
c[’status’] = []
from buildbot.status import html
c[’status’].append(html.WebStatus(http_port=10000))
from buildbot.status import mail
c[’status’].append(mail.MailNotifier(fromaddr="evan.lin@evanlin.com",
extraRecipients=["builds@example.com"],
sendToInterestedUsers=False))
####### PROJECT IDENTITY
c[’projectName’] = "Buildbot"
c[’projectURL’] = "http://buildbot.sourceforge.net/"
c[’buildbotURL’] = "http://localhost:10000/"
後記:
總算安裝跟設定好了吧~~~但是這樣僅僅只是讓你下載而已~~關於定期build的部分~ 我會研究出來後再分享給各位。 這裡有一些東西一定要注意到的是。 Perforce client spec must sync with your buildbot path。 如果沒有一樣的話,會發生下載下來檔案在原來client space 的地方,而不會在你預先設定的位置。
Reference link (參考資料)
- Patrick: Buildbot + p4 + windows http://www.scribd.com/doc/4808056/buildbot-p4-windows
- Buildbot manual http://buildbot.net/repos/release/docs/buildbot.html
- buildbot安装配置笔记 http://blog.chinaunix.net/u2/68938/showart_1076484.html
- buildbot系统维护知识 http://blog.chinaunix.net/u2/68938/showart_1111019.html
- buildbot setup trac! (Buildbot for WIKI) http://timchen119.blogspot.com/2007/02/buildbot-setup-trac.html
- How to build Mozilla with Buildbot http://zenit.senecac.on.ca/wiki/index.php/Building_Mozilla_with_Buildbot
- User:Bhearsum:Build/Buildserver ref image https://wiki.mozilla.org/User:Bhearsum:Build/Buildserver_ref_image
- Development: Buildbot http://wiki.wxwidgets.org/Development:_Buildbot (Wiki page with full doc for buildbot)
十月 08

最近在做結婚光碟的時候,發現製作光碟的UVS(Ulead Video Studio) 一直無法正常的執行。由於我自己就是做這行的,於是直接下去看整個crash call stack。發現CRASH 在一開始~~~整個在initialized filter 的時候死在 (Quicktime.qts)。
經過許多文章裡面的尋找
這幾篇的文章都提到~ 要先將Quicktime.qts 移除,我就直接把 C:\Windows\System32\Quicktime.qts 移除
結果發現無法改善~~~~ 並且我無法順利的移除Quicktime(Uninstall Quicktime)
後來我發現~~ 因為我有裝一套Storm player 而這次有問題的Quicktime.qts 是在 那個目錄裡面的~~~~~
所以我想到正確的解法是~~~
- 尋找Quicktime.qts (Find out all Quicktime.qts)
- 將它改名字 (Rename it)
- 移除 Quicktime (uninstall quicktime)
- 重新安裝一次 (reinstall again)
這樣果然就成功了!!!!!
六月 18
本來跑好好的MT 去讀取MySQL
結果最近忽然出現
Got an error: install_driver(mysql) failed: Can’t load
‘/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/DBD/mysql/mysql\
.so’
for module DBD::mysql: libmysqlclient_r.so.12: cannot open shared object
file: No such file or directory at
/usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 229. at (eval
4) line 3 Compilation failed in require at (eval 4) line 3. Perhaps a
required shared library or dll isn’t installed where expected at
/var/www/cgi-bin/mt/lib/MT/ObjectDriver/DBI/mysql.pm line 48
我去查的RPM 結果
[root@www RPMS]# rpm -qa|grep -i mysql
php-mysql-4.3.0-2mdk
MySQL-client-4.0.11a-5mdk
MySQL-common-4.0.11a-5mdk
MySQL-bench-4.0.11a-5mdk
perl-Mysql-1.22_19-6mdk
libmysql12-4.0.11a-5mdk
MySQL-4.0.11a-5mdk
使用 CPAN 更新的時候出現 error
CPAN.pm: Going to build C/CA/CAPTTOFU/DBD-mysql-4.007.tar.gz
Can’t exec “mysql_config”: No such file or directory at Makefile.PL line 76.
Cannot find the file ‘mysql_config’! Your execution PATH doesn’t seem
後來去看文章發現以下文章有很像的問題
http://bytes.com/forum/thread78379.html
http://forums.sixapart.com/lofiversion/index.php/t20654.html
本來用CPAN 查了很久~~ 但是怎麼查都會出問題
我在查的時候 我發現我CPAN 的 DBD:mysql 忽然不見了
但是本來都有安裝的
後來安裝 DBD:mysql 的時候
發現需要 mysql_config
查詢之下 需要安裝 mysql-devel 的版本
那是要 MySQL 4.1 以上的版本才有的
不過 我的 MySQL 是4.0.11a
後來要看到網路上有人講
要找找 libmysqlclient.so.10
開始去找libmysqlclient.so.10
http://rpmfind.net/linux/rpm2html/search.php?query=libmysqlclient.so.10
裝了不少的RPM 仍然不WORK
最後找到
libmysql12 裡面也有libmysqlclient.so.10
所以強制upgrade libmysql12 就可以了
rpm -U libmysql12-4.0.11a-5mdk 即可
Recent Comments