mirror of
https://github.com/chris2511/xca.git
synced 2026-09-12 19:51:05 +05:00
Visual Code adaptions
This commit is contained in:
parent
2cc1369c88
commit
52bf30e47b
40
INSTALL.w64
40
INSTALL.w64
@ -1,30 +1,22 @@
|
||||
|
||||
This is a short overview of how to build
|
||||
XCA for windows 64-bit.
|
||||
Since the switch to CMAKE a native compilation on Windows
|
||||
is possible.
|
||||
|
||||
This is for debian hosts, cross-compiling a windows binary.
|
||||
Required:
|
||||
QT via Maintainance tool:
|
||||
Qt -> 5.15.2 -> MingW-64bit
|
||||
-> Qt Creator
|
||||
-> MingW
|
||||
-> Cmake
|
||||
-> Ninja
|
||||
|
||||
Needed packages:
|
||||
mingw cross compiler
|
||||
wine (to run moc.exe and uic.exe)
|
||||
OpenSSL: Win64OpenSSL_1_1_1k.msi
|
||||
|
||||
# apt-get install mingw-w64 wine
|
||||
Optional for the documentation
|
||||
Python3.9 via Microsoft Store
|
||||
Inside Python console run "pip install sphinx"
|
||||
|
||||
create a new, empty directory say xca-w64
|
||||
$ cd xca-w64
|
||||
$ tar zxf xca-0.x.y.tar.gz
|
||||
Add the C:\Qt\5.15.2\mingw81_64\bin and the path shown by pip
|
||||
to your %PATH% environment
|
||||
|
||||
Use a Windows host to execute and install the QT5 tools
|
||||
The required component is: Qt5 / MinGW 64-bit
|
||||
https://www.qt.io/download
|
||||
|
||||
./bootstrap
|
||||
touch build-libs
|
||||
|
||||
comment out OSSLSIGN line in Makefile
|
||||
|
||||
copy the installed Qt tree from windows host to ./qt/
|
||||
|
||||
Edit the Qt path in xca-x.y.z/release/build-w64.sh
|
||||
Now call xca-x.y.z/release/build-w64.sh
|
||||
and wait until xca-portable-x.y.z is built.
|
||||
Open XCA in the Qt Creator and GO
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
#define CCHAR(x) qPrintable(x)
|
||||
|
||||
#define C_FILE ((strrchr(__FILE__, '/') ? : __FILE__- 1) + 1)
|
||||
#define C_FILE ((strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') : __FILE__- 1) + 1)
|
||||
#define TRACE qDebug("File: %s Func: %s Line: %d", C_FILE, __func__, __LINE__);
|
||||
|
||||
#define nativeSeparator(s) QDir::toNativeSeparators(s)
|
||||
|
||||
@ -32,11 +32,11 @@ dbhistory::dbhistory()
|
||||
|
||||
history.clear();
|
||||
while (!file.atEnd()) {
|
||||
char buf[1024];
|
||||
ssize_t size = file.readLine(buf, sizeof buf);
|
||||
if (size <= 0)
|
||||
QByteArray ba;
|
||||
ba = file.readLine(1024);
|
||||
if (ba.size() == 0)
|
||||
break;
|
||||
name = QString::fromUtf8(buf).trimmed();
|
||||
name = QString::fromUtf8(ba).trimmed();
|
||||
if (name.size() == 0)
|
||||
continue;
|
||||
if (history.indexOf(name) == -1)
|
||||
|
||||
@ -156,7 +156,7 @@ void pki_multi::probeAnything(const QString &fname)
|
||||
append_item(item);
|
||||
break;
|
||||
}
|
||||
} catch (errorEx &err) {
|
||||
} catch (errorEx &) {
|
||||
continue;
|
||||
} catch (enum open_result r) {
|
||||
if (r == pw_cancel)
|
||||
|
||||
@ -8,10 +8,18 @@
|
||||
#ifndef __X_FILE_H
|
||||
#define __X_FILE_H
|
||||
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#include <QFile>
|
||||
#include <QDebug>
|
||||
#include <stdio.h>
|
||||
#if defined (Q_CC_MSVC)
|
||||
#include <stdlib.h>
|
||||
#include <io.h>
|
||||
typedef int mode_t;
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
#include <QMessageBox>
|
||||
|
||||
CertDetail::CertDetail(QWidget *w)
|
||||
: QDialog(w ?: mainwin), keySqlId(), issuerSqlId(), thisSqlId()
|
||||
: QDialog(w ? w : mainwin), keySqlId(), issuerSqlId(), thisSqlId()
|
||||
{
|
||||
setupUi(this);
|
||||
setWindowTitle(XCA_TITLE);
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
#include <QLineEdit>
|
||||
|
||||
CrlDetail::CrlDetail(QWidget *w)
|
||||
: QDialog(w ?: mainwin), issuerSqlId(), crlSqlId()
|
||||
: QDialog(w ? w : mainwin), issuerSqlId(), crlSqlId()
|
||||
{
|
||||
setupUi(this);
|
||||
setWindowTitle(XCA_TITLE);
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
ExportDialog::ExportDialog(QWidget *w, const QString &title,
|
||||
const QString &filt, pki_base *pki, const QPixmap &img,
|
||||
QList<exportType> types, const QString &help_ctx)
|
||||
: QDialog(w ?: mainwin)
|
||||
: QDialog(w ? w : mainwin)
|
||||
{
|
||||
setupUi(this);
|
||||
setWindowTitle(XCA_TITLE);
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
#include <typeinfo>
|
||||
|
||||
ImportMulti::ImportMulti(QWidget *parent)
|
||||
: QDialog(parent ?: mainwin)
|
||||
: QDialog(parent ? parent : mainwin)
|
||||
{
|
||||
setupUi(this);
|
||||
setWindowTitle(XCA_TITLE);
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
#include <QLineEdit>
|
||||
|
||||
KeyDetail::KeyDetail(QWidget *w)
|
||||
: QDialog(w ?: mainwin) , keySqlId()
|
||||
: QDialog(w ? w : mainwin) , keySqlId()
|
||||
{
|
||||
setupUi(this);
|
||||
setWindowTitle(XCA_TITLE);
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
#include <QMessageBox>
|
||||
|
||||
NewCrl::NewCrl(const crljob &j, QWidget *w)
|
||||
: QWidget(w ?: mainwin), task(j)
|
||||
: QWidget(w ? w : mainwin), task(j)
|
||||
{
|
||||
pki_x509 *issuer = task.issuer;
|
||||
pki_key *key = issuer->getRefKey();
|
||||
|
||||
@ -84,7 +84,7 @@ class keyListItem
|
||||
Q_DECLARE_METATYPE(keyListItem);
|
||||
|
||||
NewKey::NewKey(QWidget *parent, const QString &name)
|
||||
:QDialog(parent ?: mainwin)
|
||||
:QDialog(parent ? parent : mainwin)
|
||||
{
|
||||
static const QList<int> sizeList = { 1024, 2048, 4096, 8192 };
|
||||
slotidList p11_slots;
|
||||
|
||||
@ -107,7 +107,7 @@ QList<nameEdit> NewX509::setupExplicitInputs(NIDlist nid_list,
|
||||
return edits;
|
||||
}
|
||||
|
||||
NewX509::NewX509(QWidget *w) : QDialog(w ?: mainwin)
|
||||
NewX509::NewX509(QWidget *w) : QDialog(w ? w : mainwin)
|
||||
{
|
||||
int i;
|
||||
QStringList keys;
|
||||
|
||||
@ -93,7 +93,7 @@ void RevocationList::setupRevocationView(QTreeWidget *certList,
|
||||
certList->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||
}
|
||||
|
||||
RevocationList::RevocationList(QWidget *w) : QDialog(w ?: mainwin)
|
||||
RevocationList::RevocationList(QWidget *w) : QDialog(w ? w : mainwin)
|
||||
{
|
||||
QPushButton *genCrl;
|
||||
setupUi(this);
|
||||
|
||||
@ -18,7 +18,7 @@ static const char * const PixmapMap[] = {
|
||||
XcaDialog::XcaDialog(QWidget *parent, enum pki_type type, QWidget *w,
|
||||
const QString &t, const QString &desc,
|
||||
const QString &help_ctx)
|
||||
: QDialog(parent ?: mainwin)
|
||||
: QDialog(parent ? parent : mainwin)
|
||||
{
|
||||
setupUi(this);
|
||||
setWindowTitle(XCA_TITLE);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user