Code/CFLite/CFNetwork: Difference between revisions

From kJams Wiki
Jump to navigation Jump to search
 
(40 intermediate revisions by the same user not shown)
Line 1: Line 1:
This page will document the results of the [https://www.freelancer.com/projects/Software-Architecture-CPlusPlus-Programming/CFNetwork-for-Windows-SSL-Bonjour.htm CFNetwork project on Freelancer].
I hereby release everything here under the terms of the "[https://en.wikipedia.org/wiki/BSD_licenses#2-clause_license_.28.22Simplified_BSD_License.22_or_.22FreeBSD_License.22.29 FreeBSD License]".
==If you use QuickTime on Windows, or Parallels Desktop for debugging Windows==
Be very sure you [[CFLite#Cooperating_with_QuickTime|check this stuff out]], it's important.


To see work already completed, see the [[Code/CFLite/CFNetwork/Old|old page]]
==CFTest Project==
The latest [https://karaoke.kjams.com/cflite/downloads/cfnetwork.zip CFNetwork] test framework.
'''Update:''' Since the above was released, a bug has been fixed in CFBonjour.  Please get this [https://karaoke.kjams.com/cflite/downloads/delta.zip delta update].
==How to get started==
==How to get started==
#Install [http://support.apple.com/kb/DL999 Bonjour Print Services] for Windows.
#if you're on Windows:
#download [https://karaoke.kjams.com/cflite/downloads/cfnetwork.zip the CFTest project] and put it in your development tree
##Install [http://support.apple.com/kb/DL999 Bonjour Print Services].  (you do not need to run the printer wizard nor set up a printer, this is just a service that CFTest makes use of)
#download the above [https://karaoke.kjams.com/cflite/downloads/delta.zip delta updater], and merge it with the CFTest project
##install [http://downloads.activestate.com/ActivePython/releases/ Python 2.7] do NOT install python 3. Python is used for post-build steps / deployment
#in VS2008, Open the file "CFNetwork/CFTest/win_vs/CFTest.sln".
## i installed [https://www.visualstudio.com/downloads/ Visual Studio Community Edition] (the free one). if you install something else, YMMV
#In the "Solution Explorer"
## when [https://info.qt.io/download-qt-for-application-development installing Qt Open Source], be sure to install MSVC2015 32 and 64
##select "CFTest", right click it and pick "Properties"
#download <googa>../../../cflite/downloads/CoreFoundation.zip|CoreFoundation|/downloads/CoreFoundationInstaller</googa> (which includes CFTest with CFLite and CFNetwork) and put it in your development tree
##in the "Configuration:" menu, pick "All Configurations"
# using Qt (tested on 5.9.1)
##go to "configuration properties->debugging"
## on Windows: open CF/opencflite-476.17.2/Qt/CFLite/CFLite.pro.
##set "Command" to "$(SolutionDir)build\CFTest Debug.app\Contents\Windows\CFTest Debug.exe".
## you SHOULD be able to use the .user file, cuz all paths are relative, so if it asks if you want to "take over" that file, even though it was created on another machine, go ahead
#Now build and run.
## open CFTest/project/qt/CFTest/CFTest_win.pro (do the same thing, take over that file if it asks)
#your output should match the file "correct.txt" (except the bonjour services you have on your network may vary)
## your "Session" should look like this: (on Mac you will not see CFLite )<br>{{SERVER}}/cflite/screenshots/qt_session.png
#for cleaner output during testing, you can temporarily set 'kExtraLogging' to 0 (that way you just get pass / fail rather than full logging)
## on Windows:
### set CFTest_win/mac to the active project, use the 64bit one
### set it to depend on and sync with CFLite, like this:<br>{{SERVER}}/cflite/screenshots/qt_session_dependencies.png
## below screen shots show 64bit debug as an example, (on mac they'll show "clang" instead of "MSVC2015") you can optionally set up 32bit debug, and also release of both 32 and 64. Note mac doesn't have 32bit.
## Windows: how CFLite build settings should look: (ignore run settings)<br>{{SERVER}}/cflite/screenshots/qt_build_cflite.png
## how CFTest build settings should look:<br>{{SERVER}}/cflite/screenshots/qt_build_cftest.png
## how CFTest run settings should look:<br>{{SERVER}}/cflite/screenshots/qt_run_cftest.png
# if you're using Visual Studio
## Open the file "CFNetwork/CFTest/win_vs/CFTest.sln".
## go to "Solution Explorer"
## select "CFTest", right click it and pick "Properties"
## in the "Configuration:" menu, pick "All Configurations"
## go to "configuration properties->debugging"
## set "Command" to "$(SolutionDir)build\$(TargetName).app\Contents\Windows\$(TargetFileName)".
## in VS2010 and later, actually you may need to just specify the full path (in step 4 above), as "$(TargetName)" does not seem to expand correctly for debug vs. release

Latest revision as of 16:48, 10 August 2017

I hereby release everything here under the terms of the "FreeBSD License".

If you use QuickTime on Windows, or Parallels Desktop for debugging Windows

Be very sure you check this stuff out, it's important.

How to get started

  1. if you're on Windows:
    1. Install Bonjour Print Services. (you do not need to run the printer wizard nor set up a printer, this is just a service that CFTest makes use of)
    2. install Python 2.7 do NOT install python 3. Python is used for post-build steps / deployment
    3. i installed Visual Studio Community Edition (the free one). if you install something else, YMMV
    4. when installing Qt Open Source, be sure to install MSVC2015 32 and 64
  2. download CoreFoundation (which includes CFTest with CFLite and CFNetwork) and put it in your development tree
  3. using Qt (tested on 5.9.1)
    1. on Windows: open CF/opencflite-476.17.2/Qt/CFLite/CFLite.pro.
    2. you SHOULD be able to use the .user file, cuz all paths are relative, so if it asks if you want to "take over" that file, even though it was created on another machine, go ahead
    3. open CFTest/project/qt/CFTest/CFTest_win.pro (do the same thing, take over that file if it asks)
    4. your "Session" should look like this: (on Mac you will not see CFLite )
      qt_session.png
    5. on Windows:
      1. set CFTest_win/mac to the active project, use the 64bit one
      2. set it to depend on and sync with CFLite, like this:
        qt_session_dependencies.png
    6. below screen shots show 64bit debug as an example, (on mac they'll show "clang" instead of "MSVC2015") you can optionally set up 32bit debug, and also release of both 32 and 64. Note mac doesn't have 32bit.
    7. Windows: how CFLite build settings should look: (ignore run settings)
      qt_build_cflite.png
    8. how CFTest build settings should look:
      qt_build_cftest.png
    9. how CFTest run settings should look:
      qt_run_cftest.png
  4. if you're using Visual Studio
    1. Open the file "CFNetwork/CFTest/win_vs/CFTest.sln".
    2. go to "Solution Explorer"
    3. select "CFTest", right click it and pick "Properties"
    4. in the "Configuration:" menu, pick "All Configurations"
    5. go to "configuration properties->debugging"
    6. set "Command" to "$(SolutionDir)build\$(TargetName).app\Contents\Windows\$(TargetFileName)".
    7. in VS2010 and later, actually you may need to just specify the full path (in step 4 above), as "$(TargetName)" does not seem to expand correctly for debug vs. release