Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add .exe installer on Windows #5674

Open
wants to merge 63 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
24b71e1
Renv Lockfiles (#5629)
RensDofferhoff Jul 17, 2024
1805576
Translations update from Hosted Weblate (#5621)
weblate Jul 20, 2024
f9ff03c
updated translation files
invalid-email-address Jul 20, 2024
f51bebf
fix Results crash upon encountering a string var in a number type col…
RensDofferhoff Jul 22, 2024
14b4e60
Update submodules (#5632)
RensDofferhoff Jul 26, 2024
6c2d3ae
Dependencies: upgrade to Quill 2.0 (#5517)
shun2wang Jul 29, 2024
544c9e7
Translated using Weblate (German) (#5634)
weblate Aug 3, 2024
b731e61
updated translation files
invalid-email-address Aug 3, 2024
e20cba9
Fix max column (#5636)
RensDofferhoff Aug 5, 2024
d1b1497
Fix Arch Linux system deps install commands in linux build guide (#5640)
Joao-O-Santos Aug 26, 2024
56add15
Update Dev Guide for Linux specifics (#5601)
tomtomme Aug 26, 2024
f5d07e9
Encode non-latin character in QML.
boutinb Aug 27, 2024
6c0f62f
update submodules (#5642)
RensDofferhoff Aug 27, 2024
e5877e7
dependencies: upgrade marked.js (#5635)
shun2wang Aug 27, 2024
a69105b
Fix OpenMX compilation
RensDofferhoff Aug 27, 2024
f0ef5d4
submodules (#5643)
RensDofferhoff Aug 27, 2024
0faa32d
add jaspBFF (#5644)
RensDofferhoff Aug 28, 2024
86a256c
removeInvisibles properties should also remove dropdown in VariablesF…
boutinb Aug 29, 2024
243b226
docs: remove deprecated `suggestedColumns` in docs (#5626)
shun2wang Aug 30, 2024
0dffcf9
update submodules (#5647)
RensDofferhoff Sep 1, 2024
6bc2d54
update submodules (#5648)
RensDofferhoff Sep 1, 2024
6294f22
Create checkPOFiles.sh
boutinb Sep 2, 2024
d5c3653
fix ZIP issue and fix some windows build thing (#5649)
RensDofferhoff Sep 2, 2024
9a02d64
Update ZIP.cmd.in
RensDofferhoff Sep 2, 2024
a14bef4
Update BuildBotScript.cmd
RensDofferhoff Sep 2, 2024
0685f80
Update checkPOFiles.sh
boutinb Sep 3, 2024
a4332f1
Update JASP.cmake
RensDofferhoff Sep 3, 2024
4cfe619
add some pragmas to speed it all up (#5651)
JorisGoosen Sep 3, 2024
63b8cef
Add New in Menu (#5650)
boutinb Sep 4, 2024
acc0d0a
fix note editor image delect behavior
shun2wang Sep 3, 2024
a37d96d
Using lambda to define titles and tooltips allows for dynamic transla…
JorisGoosen Sep 4, 2024
21c2e0d
Turning WAL on necessitates checkpoints, otherwise it wont properly s…
JorisGoosen Sep 4, 2024
cbdc331
squashed js changes
vandenman Feb 29, 2024
3d01a09
update submodules
JorisGoosen Sep 4, 2024
3e14bd4
Feat: add line numbers to code editors (#5474)
shun2wang Sep 5, 2024
89f12d8
feat: R syntax highlighter in analysis panel controls (#5538)
shun2wang Sep 5, 2024
72667a7
updated translation files
invalid-email-address Sep 7, 2024
3ef092b
add sem data example (#5637)
juliuspfadt Sep 9, 2024
e29fe39
Update jaspTestModule
boutinb Sep 9, 2024
533603b
update submodules and add branchtracking to jaspModuleInstaller and j…
JorisGoosen Sep 10, 2024
6cb5f68
remove useless org.jaspstats.JASP.json
JorisGoosen Sep 10, 2024
0d0e655
add R Syntax Highlighter to JAGSTextArea
shun2wang Sep 10, 2024
2ff3871
syntaxhighlighting improvements (#5661)
JorisGoosen Sep 12, 2024
3102e9e
remove WAL from sqlite to avoid bugs
JorisGoosen Sep 12, 2024
90a9752
feat: implement importing excel (.xls .xlsx) files (#5638)
shun2wang Sep 12, 2024
1c8381c
Set the control width of Dropdown by setting the fieldWidth property …
boutinb Sep 12, 2024
1e709a2
Translations update from Hosted Weblate (#5654)
weblate Sep 14, 2024
2e3ecbd
updated translation files
invalid-email-address Sep 14, 2024
beb9915
Update submodules (#5664)
RensDofferhoff Sep 16, 2024
d9847ab
bugfix: replace newlines with _ in CSV cell values (#5656)
shun2wang Sep 16, 2024
d79cebc
Post highlighter tweaks (#5663)
shun2wang Sep 17, 2024
0054568
fix autosort not being saved on a new column being created`
JorisGoosen Sep 17, 2024
d1cd46e
added JASP palette (#5622)
vincentott Sep 17, 2024
90373ae
use new jaspGraphs with JASP Palette
JorisGoosen Sep 17, 2024
2bbbab9
Improve docs (#5668)
PabRod Sep 18, 2024
4ae070a
update submodules (#5669)
RensDofferhoff Sep 18, 2024
f5739e6
Prettier filterconstructor
JorisGoosen Sep 18, 2024
7dff1ee
Make sure jaspBase is loaded before computed columns are ran
JorisGoosen Sep 19, 2024
34ee83a
update submodules (#5670)
RensDofferhoff Sep 19, 2024
0a1f6e2
stop checking syntax for all rwrappers
JorisGoosen Sep 19, 2024
1a860d1
Translations update from Hosted Weblate (#5673)
weblate Sep 21, 2024
786238f
updated translation files
invalid-email-address Sep 21, 2024
a7dde45
chore:add .exe installer on Windows
shun2wang Sep 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
sudo apt install libmpfr-dev #required by rmpfr packages
sudo apt install libglpk-dev #required by igraph packages
sudo apt install jags
sudo apt install libminizip-dev # required by freexl
git clone https://github.com/jasp-stats/freexl.git
cd freexl && ./configure && make && sudo make install

- name: Install boost
uses: MarkusJx/[email protected]
Expand Down
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,11 @@
path = Common/jaspColumnEncoder
url = https://github.com/jasp-stats/jaspColumnEncoder
branch = master
[submodule "Engine/jaspModuleInstaller"]
path = Engine/jaspModuleInstaller
url = https://github.com/jasp-stats/jaspModuleInstaller.git
branch = master
[submodule "Modules/jaspBFF"]
path = Modules/jaspBFF
url = https://github.com/jasp-stats/jaspBFF
branch = master
2 changes: 1 addition & 1 deletion Common/utilenums.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define UTILENUMS_H
#include "enumutilities.h"

DECLARE_ENUM(FileTypeBase, jasp = 0, html, csv, txt, tsv, sav, zsav, ods, pdf, sas7bdat, sas7bcat, por, xpt, dta, database, empty, unknown );
DECLARE_ENUM(FileTypeBase, jasp = 0, html, csv, txt, tsv, sav, zsav, ods, xls, xlsx, pdf, sas7bdat, sas7bcat, por, xpt, dta, database, empty, unknown );

//const QStringList Database::dbTypes() const should be updated if DbType is changed.
DECLARE_ENUM(DbType, NOTCHOSEN, QDB2, /*QIBASE,*/ QMYSQL, QOCI, QODBC, QPSQL, QSQLITE /*, QSQLITE2, QTDS*/ );
Expand Down
12 changes: 8 additions & 4 deletions CommonData/column.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ Column::Column(DataSet * data, int id)
_emptyValues( new EmptyValues(data->emptyValues())),
_doubleDummy( new Label(this)),
_autoSortByValue( _autoSortByValuesByDefault)
{}
{
if(_id != -1)
db().columnSetAutoSort(_id, _autoSortByValue); //Store autosort in db
}

Column::~Column()
{
Expand Down Expand Up @@ -82,7 +85,7 @@ void Column::dbDelete(bool cleanUpRest)
{
assert(_id != -1);

labelsClear();
labelsClear(false);
db().columnDelete(_id, cleanUpRest);

_id = -1;
Expand Down Expand Up @@ -649,13 +652,14 @@ void Column::_sortLabelsByOrder()
std::sort(_labels.begin(), _labels.end(), [](const Label * l, const Label * r) { return l->order() < r->order(); });
}

void Column::labelsClear()
void Column::labelsClear(bool doIncRevision)
{
db().labelsClear(_id);
_labels.clear();
_labelByIntsIdMap.clear();

incRevision(false);
if(doIncRevision)
incRevision(false);
}

void Column::beginBatchedLabelsDB()
Expand Down
2 changes: 1 addition & 1 deletion CommonData/column.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class Column : public DataSetBaseNode
void upgradeSetDoubleLabelsInInts(); ///< Used by upgrade 0.18.* -> 0.19
void upgradeExtractDoublesIntsFromLabels(); ///< Used by upgrade 0.18.* -> 0.19

void labelsClear();
void labelsClear(bool doIncRevision=true);
int labelsAdd( int display);
int labelsAdd( const std::string & display);
int labelsAdd( const std::string & display, const std::string & description, const Json::Value & originalValue);
Expand Down
57 changes: 39 additions & 18 deletions CommonData/databaseinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ int DatabaseInterface::dataSetInsert(const std::string & dataFilePath, long data

transactionWriteBegin();
int id = runStatementsId("INSERT INTO DataSets (dataFilePath, dataFileTimestamp, description, databaseJson, emptyValuesJson, dataFileSynch) VALUES (?, ?, ?, ?, ?, ?) RETURNING id;", prepare);
runStatements("CREATE TABLE " + dataSetName(id) + " (rowNumber INTEGER PRIMARY KEY);");
runStatements("CREATE TABLE " + dataSetName(id) + " (rowNumber INTEGER PRIMARY KEY);"); // Can be overwritten through dataSetCreateTable
transactionWriteEnd();

return id;
Expand Down Expand Up @@ -183,6 +183,7 @@ void DatabaseInterface::filterDelete(int filterIndex)

if(dataSetId != -1)
runStatements("ALTER TABLE " + dataSetName(dataSetId) + " DROP COLUMN " + filterName(filterIndex) + ";");

runStatements("DELETE FROM Filters WHERE id = " + std::to_string(filterIndex) + ";");

transactionWriteEnd();
Expand Down Expand Up @@ -391,7 +392,7 @@ void DatabaseInterface::filterWrite(int filterIndex, const std::vector<bool> & v
transactionWriteEnd();
}

int DatabaseInterface::columnInsert(int dataSetId, int index, const std::string & name, columnType colType)
int DatabaseInterface::columnInsert(int dataSetId, int index, const std::string & name, columnType colType, bool alterTable)
{
JASPTIMER_SCOPE(DatabaseInterface::columnInsert);
transactionWriteBegin();
Expand Down Expand Up @@ -419,19 +420,38 @@ int DatabaseInterface::columnInsert(int dataSetId, int index, const std::string
Log::log() << "Inserting column failed!" << std::endl;
#endif

//Add a scalar and ordinal/nominal column to DataSet_# for the column
const std::string alterDatasetPrefix = "ALTER TABLE " + dataSetName(dataSetId);
const std::string addColumnFragment = " ADD " + columnBaseName(columnId);

runStatements(alterDatasetPrefix + addColumnFragment + "_DBL REAL NULL;");
runStatements(alterDatasetPrefix + addColumnFragment + "_INT INT NULL;");


if(alterTable) //If not then via dataSetCreateTable
{
//Add a scalar and ordinal/nominal column to DataSet_# for the column
const std::string alterDatasetPrefix = "ALTER TABLE " + dataSetName(dataSetId);
const std::string addColumnFragment = " ADD " + columnBaseName(columnId);

runStatements(alterDatasetPrefix + addColumnFragment + "_DBL REAL NULL;");
runStatements(alterDatasetPrefix + addColumnFragment + "_INT INT NULL;");
}

//The labels will be added separately later

transactionWriteEnd();
return columnId;
}

void DatabaseInterface::dataSetCreateTable(DataSet * dataSet)
{
runStatements("DROP TABLE " + dataSetName(dataSet->id()) + ";");

std::stringstream statements;
statements << "CREATE TABLE " + dataSetName(dataSet->id()) + " (rowNumber INTEGER PRIMARY KEY, "+ filterName(dataSet->filter()->id()) + " INT NOT NULL DEFAULT 1";

for(Column * column : dataSet->columns())
statements << ", " << columnBaseName(column->id()) << "_DBL REAL NULL, " << columnBaseName(column->id()) << "_INT INT NULL";

statements << ");";

runStatements(statements.str());
}

int DatabaseInterface::columnGetDataSetId(int columnId)
{
JASPTIMER_SCOPE(DatabaseInterface::columnGetDataSetId);
Expand Down Expand Up @@ -1438,19 +1458,19 @@ void DatabaseInterface::_runStatements(const std::string & statements, bindParam
}
while(remain > 1 && (ret == SQLITE_OK && ret != SQLITE_DONE));

const int maxLenStatementError = 200;
std::string shortStatements = statements.size() <= maxLenStatementError ? statements : statements.substr(0, maxLenStatementError);

if(ret == SQLITE_ERROR)
{
std::string errorMsg = "Running ```\n"+statements+"\n``` failed because of: `" + sqlite3_errmsg(_db);
Log::log() << errorMsg << std::endl;

throw std::runtime_error(errorMsg);
Log::log() << "Running ```\n"+statements +"\n``` failed because of: `" + sqlite3_errmsg(_db) << std::endl;
throw std::runtime_error( "Running ```\n"+shortStatements +"\n``` failed because of: `" + sqlite3_errmsg(_db));
}

if(ret == SQLITE_READONLY)
{
std::string errorMsg = "Running ```\n"+statements+"\n``` failed because the database is readonly...";
Log::log() << errorMsg << std::endl;
throw std::runtime_error(errorMsg);
Log::log() << "Running ```\n"+statements +"\n``` failed because the database is readonly..." << std::endl;
throw std::runtime_error( "Running ```\n"+shortStatements +"\n``` failed because the database is readonly...");
}
}

Expand Down Expand Up @@ -1569,8 +1589,7 @@ void DatabaseInterface::create()
}
else
Log::log() << "Opened internal sqlite database for creation at '" << dbFile() << "'." << std::endl;



transactionWriteBegin();
runStatements(_dbConstructionSql);
transactionWriteEnd();
Expand All @@ -1593,6 +1612,7 @@ void DatabaseInterface::load()
}
else
Log::log() << "Opened internal sqlite database for loading at '" << dbFile() << "'." << std::endl;

}

void DatabaseInterface::close()
Expand Down Expand Up @@ -1662,3 +1682,4 @@ void DatabaseInterface::transactionReadEnd()
runStatements("COMMIT");
}


5 changes: 3 additions & 2 deletions CommonData/databaseinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class DatabaseInterface
int dataSetGetRevision( int dataSetId);
int dataSetGetFilter( int dataSetId);
void dataSetInsertEmptyRow( int dataSetId, size_t row);
void dataSetCreateTable( DataSet * dataSet); ///< Assumes you are importing fresh data and havent created any DataSet_? table yet

void dataSetBatchedValuesUpdate(DataSet * data, std::vector<Column*> columns, std::function<void(float)> progressCallback = [](float){});
void dataSetBatchedValuesUpdate(DataSet * data, std::function<void(float)> progressCallback = [](float){});
Expand All @@ -109,7 +110,7 @@ class DatabaseInterface

//Columns & Data/Values
//Index stuff:
int columnInsert( int dataSetId, int index = -1, const std::string & name = "", columnType colType = columnType::unknown); ///< Insert a row into Columns and create the corresponding columns in DataSet_? Also makes sure the indices are correct
int columnInsert( int dataSetId, int index = -1, const std::string & name = "", columnType colType = columnType::unknown, bool alterTable=true); ///< Insert a row into Columns and create the corresponding columns in DataSet_? Also makes sure the indices are correct
int columnLastFreeIndex( int dataSetId);
void columnIndexIncrements( int dataSetId, int index); ///< If index already is in use that column and all after are incremented by 1
void columnIndexDecrements( int dataSetId, int index); ///< Indices bigger than index are decremented, assumption is that the previous one using it has been removed already
Expand Down Expand Up @@ -157,7 +158,7 @@ class DatabaseInterface
void transactionWriteEnd(bool rollback = false); ///< runs COMMIT or ROLLBACK based on rollback and ends the transaction. Tracks whether nested and only does BEGIN+COMMIT at lowest depth
void transactionReadBegin(); ///< runs BEGIN DEFERRED and waits for sqlite to not be busy anymore if some other process is writing Tracks whether nested and only does BEGIN+COMMIT at lowest depth
void transactionReadEnd(); ///< runs COMMIT and ends the transaction. Tracks whether nested and only does BEGIN+COMMIT at lowest depth

private:
void _doubleTroubleBinder(sqlite3_stmt *stmt, int param, double dbl); ///< Needed to work around the lack of support for NAN, INF and NEG_INF in sqlite, converts those to string to make use of sqlite flexibility
double _doubleTroubleReader(sqlite3_stmt *stmt, int colI); ///< The reading counterpart to _doubleTroubleBinder to convert string representations of NAN, INF and NEG_INF back to double
Expand Down
13 changes: 10 additions & 3 deletions CommonData/dataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ void DataSet::dbDelete()

_dataSetID = -1;


db().transactionWriteEnd();
}

Expand Down Expand Up @@ -171,12 +172,12 @@ void DataSet::removeColumn(const std::string & name)
}
}

void DataSet::insertColumn(size_t index)
void DataSet::insertColumn(size_t index, bool alterDataSetTable)
{

assert(_dataSetID > 0);

Column * newColumn = new Column(this, db().columnInsert(_dataSetID, index));
Column * newColumn = new Column(this, db().columnInsert(_dataSetID, index, "", columnType::unknown, alterDataSetTable));

_columns.insert(_columns.begin()+index, newColumn);

Expand Down Expand Up @@ -382,18 +383,24 @@ void DataSet::setColumnCount(size_t colCount)
db().transactionWriteBegin();

int curCount = columns().size();

bool alterTableAfterwards = curCount == 0 && colCount > 0;

if(colCount > curCount)
for(size_t i=curCount; i<colCount; i++)
insertColumn(i);
insertColumn(i, !alterTableAfterwards);

else if(colCount < curCount)
for(size_t i=curCount-1; i>=colCount; i--)
removeColumn(i);


incRevision();

db().transactionWriteEnd();

if(alterTableAfterwards)
db().dataSetCreateTable(this);
}

void DataSet::setRowCount(size_t rowCount)
Expand Down
4 changes: 2 additions & 2 deletions CommonData/dataset.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ class DataSet : public DataSetBaseNode
void beginBatchedToDB();
void endBatchedToDB(std::function<void(float)> progressCallback = [](float){}, Columns columns={});
void endBatchedToDB(Columns columns) { endBatchedToDB([](float){}, columns); }

void removeColumn( const std::string & name );
void removeColumn( size_t index );
void removeColumnById( size_t id );
void insertColumn( size_t index );
void insertColumn( size_t index, bool alterDataSetTable = true);
Column * newColumn( const std::string & name);
int getColumnIndex( const std::string & name ) const;
int columnIndex( const Column * col ) const;
Expand Down
6 changes: 5 additions & 1 deletion Desktop/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ qt_add_executable(
${BUNDLE_RESOURCES}
$<$<PLATFORM_ID:Windows>:${CMAKE_CURRENT_LIST_DIR}/icon.rc>
$<$<PLATFORM_ID:Darwin>:${_R_Framework}>
$<$<PLATFORM_ID:Windows>:${CMAKE_SOURCE_DIR}/Desktop/JASP.exe.manifest>
$<$<PLATFORM_ID:Windows>:${CMAKE_SOURCE_DIR}/Desktop/JASP.exe.manifest>
)

set(
Expand Down Expand Up @@ -105,6 +105,7 @@ target_include_directories(
$<$<BOOL:${FLATPAK_USED}>:/app/include/QtCore5Compat>
$<$<BOOL:${FLATPAK_USED}>:/app/include/QtWebEngineQuick>
$<$<BOOL:${FLATPAK_USED}>:/app/include/QtWebEngineCore>
${LIBFREEXL_INCLUDE_DIRS}
)

target_link_libraries(
Expand Down Expand Up @@ -145,6 +146,9 @@ target_link_libraries(
Iconv::Iconv
OpenSSL::SSL
OpenSSL::Crypto
# FreeXL
${LIBFREEXL_LIBRARIES}
$<$<NOT:$<BOOL:${LINUX_LOCAL_BUILD}>>:freexl::freexl>
# ReadStat -----------------------------------
${LIBREADSTAT_LIBRARIES}
# MinGW's ReadStat
Expand Down
7 changes: 7 additions & 0 deletions Desktop/components/JASP/Widgets/ComputeColumnWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.3
import JASP.Controls 1.0 as JaspControls
import JASP

import "FilterConstructor"

Expand Down Expand Up @@ -103,6 +104,12 @@ FocusScope
TextArea
{
id: computeColumnEdit

RSyntaxHighlighterQuick
{
textDocument: computeColumnEdit.textDocument
}


anchors.top: parent.top
anchors.left: parent.left
Expand Down
2 changes: 1 addition & 1 deletion Desktop/components/JASP/Widgets/DataPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Rectangle
id: filterWindow
objectName: "filterWindow"
SplitView.minimumHeight: desiredMinimumHeight
SplitView.preferredHeight: rootDataset.height * 0.25
SplitView.preferredHeight: desiredHeight
SplitView.maximumHeight: rootDataset.height * 0.8

}
Expand Down
Loading
Loading