Web browser for Windows 8

下一代視窗系統心得, 學習文件 No Comments »

It need note that Windows 8 has two version of IE (it should say, one application but two entry for different mode)

  • Desktop IE
  • Metro IE

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]

MICROSOFT WINDOWS 8 BUILD STUDY NOTE (3) About ListVIEW

下一代視窗系統心得, 學習文件 No Comments »

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).

MICROSOFT WINDOWS 8 BUILD STUDY NOTE (2)

下一代視窗系統心得, 學習文件 No Comments »

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.

  1. Consistent with WPF and silverlight
  2. New in Windows 8 Metro
    1. New look and support for touch
    2. Deployment by Windows Store
    3. Tile –> splash screen to application
  3. New XAML UI Control
    1. Build in “Grouping”
    2. Windows 8 look and feel and its “selection model”
    3. Media player on Metro Style
    4. Grid view and Flip view
    5. Application Bar: Swipe from bottom/top to display
    6. Manipulation and gestures: It could handle rotation on Button_Clicp event.
  4. Metro Style App Concept
    1. Diversity of display and resolution
    2. Layout changed
      1. Snapped(small one on split), Filled (big one on split) and Full Screen
      2. It could be tested on simulator on VS2011 CTP.
  5. Metro style app lifetime
    1. Background apps are “Suspended”
      1. App notified.
    2. App will terminated when memory is low
      1. App will not notified.
    3. Event:
      1. Application.Current.Suspending –> Save state when suspend
      2. 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.

  1. Windows 8 is compatible with apps that run on Windows 7
  2. OS version increasement
    1. Application should not set upper bound for version handle
    2. Windows 8 version is 6.2
  3. DWM (Desktop Windows Manager) always ON
    1. If application try to turn off it, it will failed silently.
    2. Color depth must on 32-bit (for DWM limitation) but lower could be simulated
  4. Startuo application changed
    1. Apps on “Start” should goes to “task scheduler” or “automatic maintance”
  5. .NET 3.5 demanded
    1. Default is .NET 4.5 it could enable if user install .NET 3.5 application.
  6. Use Windows Resource Widely
    1. Use RegExpandSZ for path query
    2. New error code add one
      1. Some SUCCESSED might goes to FAILED.
  7. Manifest your executable
    1. Need add DPIAWARE for your application.
    2. Application compatibility <compatibility xmln..>
      1. Starting on Win7, if no this tag treat it as Vista application.
    3. Metro Style Application should managed it manifest
      1. <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

  1. Trail is really matter
    1. 70 times download, 10 times revenue and 10% conversion.
  2. In-App Offer
    1. 72% revenue comes from app which present “In-App offers”
    2. 48% comes from “In-App offers”
  3. Flxibility option for this.
    1. Use your existing commerce
      1. maintain relationship, subscription and consumable phuchases.
    2. Ad supporteds
      1. Choice of ad controls
    3. One time purchase
      1. Time limited trail and features differentiated trails.
    4. Purchase over time
      1. Persisent purchase and Expiring purchase.
  4. Implement basic
    1. Check License
      1. It could use simulate since store still no open
    2. Get latest listing data
    3. 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:

  1. Using media API could easy to build up tailored user experience application with little domain knowledge.
  2. HTML 5 standard <audio><video>
    1. DXVA full support
    2. You can creat rich media by CSS, JS and DOM.
  3. Windows 8 enhancement
    1. 3D video (Stereo 3D)
      1. S3D still not work on CTP version
    2. Audio/Video effect and extensibility
    3. Zoom/Mirror
    4. Audio output selection
    5. Background audio
    6. DRM
    7. Streaming media to TV and Audio systems
  4. System-wide support format
    1. File name:
      1. MP4/ASF
    2. Video:
      1. H264/VC1
    3. Audio:
      1. AAC/MP3/WMA
  5. Simple HTML5 video player all related feature: Seeking, bookmark, play/pause, channel switching, capture feature already support on build-in API.
  6. Media Focus:
    1. When app own media focus video could be see and heard
    2. When suspends it will remove from active list, and app will mute
    3. When select second media, it will leave original focus to new one.
  7. Media format extensibility
    1. Custmize your app specific support format
    2. Extension are  packaged and local on your app (only for your app, no share)
    3. Extension could be naive (C++/COM) Media Fundation component.
  8. Extending your custom format
    1. Register DLL with in App manifest on MF(Media Fundation)
      1. Such audio/video source filter or demux
    2. In your app, register custom  streaming/data format with ExtensibilityManager
      1. Register your custom video/audio encoder/decoder
    3. Custom effect could be insert effect pipeline

Microsoft Windows 8 build study NOTE (1)

下一代視窗系統心得, 學習文件 No Comments »

 

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:
      • MFC
  • About WinRT
  • 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.

Buildbot still not fullfill for Perfornce

學習文件 No Comments »

上一篇文章: 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:

  1. #101 Set "revision" property when using computeSourceRevision
  2. #127 got_revision not tracked for perforce
  3. #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.

說明文件–Buildbot在XP上安裝與Perforce 連線 (Install buildbot in xP connect with P4)

NET程式設計, 學習文件 No Comments »

Buildbot.jpg

要轉錄請務必標示文章出處:   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
    1. "buildbot create-master <master_path>" <master_path> should be a path for Buildbot using.  For my case using "buildbot create-master MASTER".
    2. Modify master.cfg on the <master_path>. (you could refer as master.cfg as lastest of this article)
  • Create Slave
    1. buildbot create-slave bot1name bot1:8010 bot1 123(default Master port is the same with setting in Master.cfg)
      1. c[’slavePortnum’] = 8010 #default is 9989
  • Start Master
    1. "buildbot start MASTER"
  • Start SLAVE
    1. "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 (參考資料)

    1. Patrick: Buildbot + p4 + windows http://www.scribd.com/doc/4808056/buildbot-p4-windows
    2. Buildbot manual http://buildbot.net/repos/release/docs/buildbot.html
    3. buildbot安装配置笔记   http://blog.chinaunix.net/u2/68938/showart_1076484.html
    4. buildbot系统维护知识  http://blog.chinaunix.net/u2/68938/showart_1111019.html
    5. buildbot setup trac! (Buildbot for WIKI) http://timchen119.blogspot.com/2007/02/buildbot-setup-trac.html
    6. How to build Mozilla with Buildbot  http://zenit.senecac.on.ca/wiki/index.php/Building_Mozilla_with_Buildbot
    7. User:Bhearsum:Build/Buildserver ref image https://wiki.mozilla.org/User:Bhearsum:Build/Buildserver_ref_image
    8. Development: Buildbot http://wiki.wxwidgets.org/Development:_Buildbot (Wiki page with full doc for buildbot)
  • QuickTime.qts 導致的程式執行錯誤,並且無法順利移除Quicktime (QuickTime.qts cause app crash and could not uninstall quicktime)

    VC++程式設計, 學習文件 No Comments »

    Inside QuickTime

     

    最近在做結婚光碟的時候,發現製作光碟的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 是在 那個目錄裡面的~~~~~

     

     

    所以我想到正確的解法是~~~

    1. 尋找Quicktime.qts (Find out all Quicktime.qts)
    2. 將它改名字 (Rename it)
    3. 移除 Quicktime (uninstall quicktime)
    4. 重新安裝一次 (reinstall again)

     

    這樣果然就成功了!!!!! 

    MT Perl MySQL Module 忽然掛點 — Perl CPAN DBD:mysql error

    關於MT的學習心得, 學習文件 No Comments »

    本來跑好好的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 即可

    在論壇(forum)上面顯示YOUTUBE

    學習文件 No Comments »

    在論壇上面顯示YOUTUBE

    隨著TAKE THAT演唱會的接近~~我最近開始在整理我的論壇~~卻發現YABBSE論壇無法去張貼YouTUBE的影像~~不過後來去察看YABBSE論壇裡面原來提到~~ 整組人馬全部跑去做新的論壇軟體SMF(Simple Machines Forum)~~ 而且我也找到原來SMF裡面有support YouTubeTag的MOD,於是我就開始了我的轉移平台計畫Yabbse->SMF.

    1. Download and Install SMF 1.1
    2. Use YabbSe Converter(裡面可能有些不能順利的轉換~~ 就手動去增加幾個欄位吧~~)
    3. Install YouRube MOD.

    大家可以到專屬的TakeThat 討論區去看結果

    重新安裝PHP與Apache

    學習文件 No Comments »

    PHP
    一向以來~Evan家裡的主機都是透過Mandrake所提供的安裝光碟所安裝起來的~ 除卻一些比較奇怪的module,我都會使用安裝光碟上面所提供的版本來安裝~~ 所以一向以來備份與復原都相當的快速。(何謂備份? 就是把所有網站全部放進去MYSQL~ 並且定期備份出來~ 復原~也是如此~ )

    經過這樣的機制~ 就算我家的老伺服器電腦的風扇掛點~ 我也能在一天之內恢復我的主機功能~ (A 備份 a day, Keep 幹譙 away) 但是最近倒是比較奇怪了~ 一直覺得網路速度有點緩慢~ 使得我"友善資源分享"的驢子都無法盡情的奔跑~~ 而且 ls 的功能也變成會出現錯誤~
       ls: unrecognized option `–show-control-chars’
    讓我覺得有點異常的詭異~ 經過網中人大哥的指點這篇文章。我更是確定我的主機被人家透過Samba 來Hack了~~ 所以只好又再度的重灌~~。

    不過~ 這次倒是覺得很奇怪了說~ 我的PHP完全無法使用~ 每次去執行PHP的網頁~ 反而會變成下載指令~ 搞了一陣子~ 總算了解是因為PHP 與APACHE 在安裝上的問題~ 不過在我全部重新安裝之後,到也是沒有這個問題了~ (參考這篇文章來安裝的)

    1. 安裝libphp_common
    2. 安裝apache2-mod_php
    3. 安裝mod_php

    WP Theme & Icons by N.Design Studio
    Entries RSS Comments RSS 登入