devenv102

This is an old revision of the document!


Developing Environment

To set up the developing environment you should have prepared a developing VM or PC as documented in VM Setup for Development.

The Qt 5.15 toolset described here is used for BPS 2.24.1.0 and up.

Note that during the setup not all applications will work because the matching DLL's will not yet be found. The required links and settings will get applied in the step Automate Proper DLL Loading, please wait until then.

  • Get Visual Studio Community 2019
  • Install «Desktop development with C++»
    • Install optional components:
      • MSVC v142 - VS 2019 C++ x64/x86 build tools
      • C++ CMake tools for Windows
    • Individual components
      • Scroll down to near end of list
      • Check «Windows 10 SDK (10.0.19041-0)

Install Debugger:

  • In Windows Settings go to “Apps & Features”
  • Search for “Windows Software Development Kit”
  • Click on “change”
  • Click “change” again
  • Select “Debugging Tools for Windows”.

Start Visual Studio IDE to test and prepare.

Homepage: http://strawberryperl.com/

  • Download 64 bit edition
  • Run strawberry-perl-5.30.2.1-64bit.msi
  • Install to: C:\dev\perl
  • Get binaries from: http://www.python.org
  • Download «Windows x86-64 executable installer»
  • Run python-3.8.5-amd64.exe
  • Uncheck:
    • Install launcher for all users
    • Add Python 3.8 to PATH
  • Customize installation
  • Optional Features
    • Uncheck all
  • Advanced Options
    • Uncheck all
  • Customize install location: C:\dev\python

Replacement for nmake, compiles on multiple CPU cores simultaneously.

Homepage: http://wiki.qt.io/Jom

Download latest binary release.

  • Right click on jom_1_1_3.zip
    • 7-Zip
      • Extract files…
      • to: C:\dev\jom

Net-wide Assembler. Required for OpenSSL build.

Homepage: http://www.nasm.us/

  • Right click on nasm-2.14.02-win64.zip
    • 7-Zip
      • Extract files…
      • to: C:\dev
  • Rename C:\dev\nasm-2.14.02 to C:\dev\nasm

Homepage: http://www.openssl.org/

  • Download latest source tarball

Prepare source:

  • Right click on openssl-1.1.1g.tar.gz
    • 7-Zip
      • Extract here
  • Right click on openssl-1.1.1g.tar
    • 7-Zip
      • Extract files…
      • to: C:\dev
  • Rename C:\dev\openssl-1.1.1g to C:\dev\openssl.src

Build:

  • Start / Visual Studio 2019 / x64 Native Command Prompt AS ADMINISTRATOR
  • cd \dev\openssl.src
  • PATH=C:\dev\nasm;C:\dev\perl\perl\bin;%PATH%
  • perl Configure VC-WIN64A --prefix=c:\dev\openssl --openssldir=c:\dev\openssl
  • nmake
  • nmake test
  • nmake install
  • nmake clean
  • exit

Get source:

Apply patches:

  • C:\dev\qt.src\qtbase\src\widgets\itemviews\qlistwidget.h
    C:\dev\qt.src\qtbase\src\widgets\widgets\qcombobox.h
    • Move “addItems” to “public Q_SLOTS”
  • C:\dev\qt.src\qtbase\src\corelib\kernel\qvariant.h
    • Insert at end of file, immediately before QT_END_NAMESPACE:
      Q_CORE_EXPORT const QVariant::Handler* userVariantHandler();
      Q_CORE_EXPORT void setUserVariantHandler(const QVariant::Handler* aHandler);
  • C:\dev\qt.src\qtbase\src\corelib\kernel\qvariant.cpp
    • Insert after function QVariantPrivate::registerHandler (approx. line 1591):
      Q_CORE_EXPORT const QVariant::Handler* userVariantHandler()
      {
      	return handlerManager[QMetaType::User];
      }
       
      Q_CORE_EXPORT void setUserVariantHandler(const QVariant::Handler* aHandler)
      {
      	handlerManager.registerHandler(QModulesPrivate::Unknown, aHandler);
      }
  • C:\dev\qt.src\qtbase\src\network\socket\qlocalsocket_win.cpp
    • Change statement in line 144:
          if (d->serverName.startsWith(QLatin1String("\\\\")/*pipePath*/))
  • C:\dev\qt.src\qtbase\src\printsupport\kernel\qprintengine_win.cpp
    • In function QWin32PrintEnginePrivate::setPageSize(const QPageSize &pageSize) starting approx. at line 1620
    • Replace: printerPageSize.isValid()
      by: pageSize.id()!=QPageSize::Custom && printerPageSize.isValid()
    • In line 1629 approximately:
          const QPageSize usePageSize = pageSize.id()!=QPageSize::Custom && printerPageSize.isValid() ? printerPageSize : pageSize;
    • In line 1635 approximately:
          if (pageSize.id()!=QPageSize::Custom && printerPageSize.isValid()) {

Create C:\dev\bat\qtbuildenv.bat:

@echo off
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
set INCLUDE=C:\dev\openssl\include;%INCLUDE%
set LIB=C:\dev\openssl\lib;%LIB%
set LLVM_INSTALL_DIR=C:\dev\libclang
PATH=C:\dev\libclang\bin;%PATH%
PATH=C:\dev\python;%PATH%
PATH=C:\dev\perl\perl\bin;%PATH%
PATH=C:\dev\nasm;%PATH%
PATH=C:\dev\jom;%PATH%
PATH=C:\dev\qt.src\gnuwin32\bin;%PATH%
PATH=C:\dev\qt.src\qtbase\bin;%PATH%
PATH=C:\dev\qt\qtbase\bin;%PATH%
cd /d C:\dev

Create the shortcut Qt Command Prompt:

  • Target: %COMSPEC% /k C:\dev\bat\qtbuildenv.bat

Run Qt Command Prompt:

  • mkdir \dev\qt
  • cd \dev\qt
  • ..\qt.src\configure -prefix C:\dev\qt\qtbase -nomake examples -nomake tests -skip qtwebengine -opensource -confirm-license
  • jom

If Qt5Script (lib, dll) missing:

  • jom module-qtscript

Build docs:

  • jom docs
    • Click Clone or download
    • Download ZIP
  • Create folder C:\dev\qtsol
  • Extract directories C:\dev\qtsol:
    • qtpropertybrowser
    • qtservice
    • qtsingleapplication

Patches:

  • C:\dev\qtsol\qtpropertybrowser\common.pri:
    QTPROPERTYBROWSER_LIBNAME = $$qtLibraryTarget(QtSolutions_PropertyBrowser-head)
    QTPROPERTYBROWSER_LIBNAME = $$qtLibraryTarget(QtPropertyBrowser)
  • C:\dev\qtsol\qtservice\common.pri:
    QTSERVICE_LIBNAME = QtSolutions_Service-head
    QTSERVICE_LIBNAME = QtService
  • C:\dev\qtsol\qtsingleapplication\common.pri:
    QTSINGLEAPPLICATION_LIBNAME = $$qt5LibraryTarget(QtSolutions_SingleApplication-head)
    QTSINGLEAPPLICATION_LIBNAME = $$qt5LibraryTarget(QtSingleApplication)

    QTSINGLEAPPLICATION_LIBNAME = $$qtLibraryTarget(QtSolutions_SingleApplication-head)
    QTSINGLEAPPLICATION_LIBNAME = $$qtLibraryTarget(QtSingleApplication)
  • C:\dev\qtsol\qtsingleapplication\src\qtsingleapplication.cpp:
  • Append to header includes:
    #if defined(Q_OS_WIN)
        #include <windows.h>
    #endif
  • Insert to sysInit(…):
    #if defined(Q_OS_WIN)
        AllowSetForegroundWindow(ASFW_ANY);
    #endif
  • C:\dev\qtsol\qtsingleapplication\buildlib\buildlib.pro:
    • Append:
      win32: LIBS += -lUser32

Run Qt Command Prompt:

  • cd \dev\qtsol\qtpropertybrowser
    • configure -library
    • qmake
    • jom debug
    • jom release
    • cd doc\html
    • qhelpgenerator qtpropertybrowser.qhp
  • cd \dev\qtsol\qtservice
    • configure -library
    • qmake
    • jom debug
    • jom release
    • cd doc\html
    • qhelpgenerator qtservice.qhp
  • cd \dev\qtsol\qtsingleapplication
    • configure -library
    • qmake
    • jom debug
    • jom release
    • cd doc\html
    • qhelpgenerator qtsingleapplication.qhp
  • Add to PATH in system environment variables:
    • C:\dev\openssl\bin
    • C:\dev\libclang\bin
    • C:\dev\qt\qtbase\bin
    • C:\dev\oracle\instantclient
    • C:\dev\pgsql\bin
    • C:\dev\pgsql\lib
    • C:\dev\bps\Release64\bin
  • Add new system environment variables
    • QT_PLUGIN_PATH=C:\dev\qt\qtbase\plugins
    • TNS_ADMIN=C:\dev\oracle

Run Qt Assistant in C:\dev\qt64\qtbase\bin:

  • Pin to taskbar
  • Wait for indexing to finish at first run.
  • Edit - Preferences - Documentation - Add…
    • C:\dev\qtsol\qtpropertybrowser\doc\html\qtpropertybrowser.qch
    • C:\dev\qtsol\qtservice\doc\html\qtservice.qch
    • C:\dev\qtsol\qtsingleapplication\doc\html\qtsingleapplication.qch

Run Qt64 Command Prompt:

  • mkdir c:\dev\qtcre
  • cd c:\dev\qtcre
  • c:\dev\qt\qtbase\bin\qmake.exe -r c:\dev\qtcre.src
  • jom
  • jom docs

Run C:\dev\qtcre64\bin\qtcreator.exe

Help - About Plugins

Recommended:

  • Build Systems
    • QmakeProjectManager
  • C++
    • ClassView
    • CppEditor
  • Core
    • Bookmarks
    • Help
    • TextEditor
    • Welcome
  • Qt Creator
    • BinEditor
    • Debugger
    • Designer
    • ResourceEditor
  • Utilities
    • ImageViewer

Tools - Options

Kits

Environment

C++

Build & Run

Help

Homepage: http://www.postgresql.org/

  • Download 64 bit installer from EDB
  • Run postgresql-12.3-2-windows-x64.exe
  • Installation Directory: C:\dev\pgsql
  • Uncheck “Stackbuilder”
  • Accept Data Directory: C:\dev\pgsql\data
  • Enter your password for postgres
  • Accept Port: 5432
  • Accept Locale: [Default locale]
  • Create folder C:\dev\oracle
  • Unzip WINDOWS.X64_193000_db_home.zip to C:\dev\oracle\software
  • Run C:\dev\oracle\software\setup.exe

Installation Log

sqlplus / as sysdba
alter pluggable database orclpdb open;
alter pluggable database orclpdb save state;

Create folder C:\dev\oracle\\bps_data_pump

sqlplus / as sysdba
alter session set container = orclpdb;
create or replace directory BPS_DATA_PUMP as 'C:\dev\oracle\bps_data_pump';

Check

select directory_name, directory_path from dba_directories where directory_name='BPS_DATA_PUMP';

List:

sqlplus / as sysdba
alter session set container = orclpdb;
select tablespace_name, status, contents from dba_tablespaces;

Create:

create tablespace lu_fgb datafile 'C:\dev\oracle\oradata\BPSDEV\orclpdb\LU_FGB.DBF' size 100m  autoextend on next 100m;

Drop:

drop tablespace os_zab including contents and datafiles;
sqlplus / as sysdba
alter session set container = orclpdb;

List:

select username from dba_users;

Unlock:

alter user system identified by ****** account unlock;

Disable password expire:

select profile from DBA_USERS where username = 'SYSTEM';
select resource_name, limit from dba_profiles where profile='DEFAULT';
alter profile DEFAULT limit password_life_time UNLIMITED;

Homepage: http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html

  • Download the latest Windows 64-bit zip file including JDK
  • Right click on sqldeveloper-20.2.0.175.1842-x64.zip
    • 7-Zip
      • Extract files…
      • to: C:\dev\oracle

For high DPI displays:

  • Uncheck «Show on startup» at bottom of the start page.
  • If you want to see it again: Help - Start Page

Proceed from here either to Custom Apps and Plugins if you want to develop your own components, or to Core Development if you want to develop on the BPS core itself.

  • devenv102.1596289767.txt.gz
  • Last modified: 2020/08/01 15:49
  • by ibk