Skip to content

Commit 9348b41

Browse files
mhoopmannmhoopmann
and
mhoopmann
authored
Restructuring (#32)
* Complete restructuring of the source. 1. Removed older 3rd party source that I don't think anyone is using anymore. 2. Separated builds into MSToolkit code and external 3rd party code. 3. Static builds optionally using the 3rd party code. 4. Added .dll builds 5. Users should be able to use their own zlib and expat builds if already installed on their system. 6. Adding VS projects for validation builds on GitHub. * Create VS2019.yml (#29) (#30) Builds MSToolkit on Visual Studio 2019 * Update VS2019.yml * restore missing files: this was due to rules in the .gitignore, so consider revising... fix some paths for the visual studio build * simplifying the expat builds. * Changes to VS builds * VS build changes. * VS changes. * Update VS2019.yml (#31) * action update * VS and action changes. * VS updates * VS2019.yml update * Added another build test. * Add in Thermo RAW file support on windows builds. * Create linux.yml * Updating Makefile for Linux builds. Updating VS projects for better library builds. Version update to new numbering system. Silence some warnings. * Update linux.yml * Updated nmake file. --------- Co-authored-by: mhoopmann <[email protected]>
1 parent df69564 commit 9348b41

File tree

692 files changed

+33258
-306483
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

692 files changed

+33258
-306483
lines changed

.github/workflows/VS2019.yml

+17-4
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,30 @@ on:
77

88
jobs:
99
build:
10-
runs-on: window-2019
10+
runs-on: windows-2019
1111
steps:
1212
- uses: actions/checkout@v4
13+
14+
- name: unzip Thermo MSFileReader
15+
shell: bash
16+
run: unzip -P iacceptthelicense extern/msfreader.zip -d dlls
17+
18+
- name: register Thermo MSFileReader
19+
shell: cmd
20+
run: FOR %%G IN (dlls\*.dll) DO regsvr32 /S %%G
1321

1422
- name: msbuild
1523
uses: microsoft/setup-msbuild@v2
1624

1725
- name: build mstoolkit
18-
run: |
19-
msbuild VisualStudio/MSToolkit.sln -p:Configuration=Release -p:Platform=x64 -p:PlatformToolset=v142 -tv:Current
26+
# use -p:PreDef=/D_NO_THERMORAW to build MSToolkit without Thermo raw support windows
27+
run: msbuild VisualStudio/MSToolkit.sln -p:Configuration=Release -p:Platform=x64 -p:PlatformToolset=v142 -tv:Current
2028

2129
- name: test
2230
shell: cmd
23-
run: D:\a\MSToolkit\VisualStudio\x64\Release\MSSingleScan.exe
31+
run: D:\a\mstoolkit\mstoolkit\VisualStudio\x64\Release\MSSingleScan.exe
32+
33+
- name: test DLL
34+
shell: cmd
35+
run: D:\a\mstoolkit\mstoolkit\VisualStudio\x64\Release\DLL\MSSingleScan.exe
36+

.github/workflows/linux.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: linux build
2+
3+
on:
4+
push:
5+
branches: [ Restructuring ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-24.04
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: build mstoolkit
15+
run: make all
16+
17+
- name: test
18+
run: ./MSSingleScan
19+
20+
- name: test shared lib version
21+
run: |
22+
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/runner/work/mstoolkit/mstoolkit/ && \
23+
./MSSingleScanSL

MAKEFILE.nmake

+22-16
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,41 @@
1-
MSTOOLKIT_DEFS=/D"_NOSQLITE"
2-
31
CFLAGS=/permissive- /GS /GL /W3 /Gy /Zc:wchar_t /Zi /Gm- /O2 /sdl /Zc:inline /fp:precise /errorReport:prompt /WX- /Zc:forScope /Gd /Oi /MD /FC /EHsc /nologo /diagnostics:column
4-
CDEFS=/D "WIN32" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "XML_STATIC" /D "_MBCS"
2+
CDEFS=/D "NDEBUG" /D "WIN32" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "XML_STATIC" /D "_MBCS"
53
LIBFLAGS=/LTCG /MACHINE:X64 /NOLOGO
64

75
BUILD_INC=.\include
6+
BUILD_INC_EXT=$(BUILD_INC)\extern
87
BUILD_SRC=.\src
8+
BUILD_EXT=.\extern
99
BUILD_DIR=.\x64\Release
10+
BUILD_DIR_EXT=.\x64\Release\extern
1011

1112
# -- Global build rules -------------------------------
1213
# Rules for all packages of the MSToolkit.
1314
#------------------------------------------------------
1415
.PHONY: all
15-
all : output zlib expat mzparser mzid core mstoolkit
16+
all : output zlib expat mzparser core mstoolkit mstoolkitextern
1617

1718

1819
# -- Output -------------------------------------------
1920
# Create output directories
2021
#------------------------------------------------------
2122
output:
2223
@if not exist $(BUILD_DIR) mkdir $(BUILD_DIR)
24+
@if not exist $(BUILD_DIR_EXT) mkdir $(BUILD_DIR_EXT)
2325

2426
# -- MSToolkit ---------------------------------------
2527
# The core MSToolkit files
2628
#------------------------------------------------------
2729
MSTOOLKIT_SRCDIR=$(BUILD_SRC)\MSToolkit
2830

2931
mstoolkit: $(BUILD_DIR)\*.obj
30-
lib /OUT:"$(BUILD_DIR)\MSToolkitLite.lib" $(LIBFLAGS) $?
32+
lib /OUT:"$(BUILD_DIR)\MSToolkit.lib" $(LIBFLAGS) $?
33+
34+
mstoolkitextern: $(BUILD_DIR_EXT)\*.obj
35+
lib /OUT:"$(BUILD_DIR)\MSToolkitExtern.lib" $(LIBFLAGS) $?
3136

32-
core : $(MSTOOLKIT_SRCDIR)\\*.cpp
33-
cl $(CFLAGS) $(CDEFS) $(MSTOOLKIT_DEFS) /I"$(BUILD_INC)" /c /Fo$(BUILD_DIR)\ $?
37+
core: $(MSTOOLKIT_SRCDIR)\*.cpp
38+
cl $(CFLAGS) $(CDEFS) $(MSTOOLKIT_DEFS) /I"$(BUILD_INC)" /I"$(BUILD_INC_EXT)" /c /Fo$(BUILD_DIR)\ $?
3439

3540
clean:
3641
del $(BUILD_DIR)\*.obj
@@ -39,19 +44,20 @@ clean:
3944
# -- Expat --------------------------------------------
4045
# XML support
4146
#------------------------------------------------------
42-
EXPAT_SRCDIR=$(BUILD_SRC)\expat-2.2.9\lib
47+
EXPAT_SRCDIR=$(BUILD_EXT)\expat-2.2.9\lib
4348

4449
expat : $(EXPAT_SRCDIR)\\*.c
45-
cl $(CFLAGS) $(CDEFS) /I"$(BUILD_INC)" /c /Fo$(BUILD_DIR)\ $?
50+
cl $(CFLAGS) $(CDEFS) /I"$(BUILD_INC)" /c /Fo$(BUILD_DIR_EXT)\ $?
4651

4752

53+
# This tool is deprecated.
4854
# -- mzIMLTools ---------------------------------------
4955
# mzIdentML support
5056
#------------------------------------------------------
51-
MZID_SRCDIR=$(BUILD_SRC)\mzIMLTools
52-
53-
mzid : $(MZID_SRCDIR)\\*.cpp
54-
cl $(CFLAGS) $(CDEFS) /I"$(BUILD_INC)" /c /Fo$(BUILD_DIR)\ $?
57+
#MZID_SRCDIR=$(BUILD_SRC)\mzIMLTools
58+
#
59+
#mzid : $(MZID_SRCDIR)\\*.cpp
60+
# cl $(CFLAGS) $(CDEFS) /I"$(BUILD_INC)" /c /Fo$(BUILD_DIR)\ $?
5561

5662

5763
# -- mzParser -----------------------------------------
@@ -60,15 +66,15 @@ mzid : $(MZID_SRCDIR)\\*.cpp
6066
MZP_SRCDIR=$(BUILD_SRC)\mzParser
6167

6268
mzparser : $(MZP_SRCDIR)\\*.cpp
63-
cl $(CFLAGS) $(CDEFS) /I"$(BUILD_INC)" /c /Fo$(BUILD_DIR)\ $?
69+
cl $(CFLAGS) $(CDEFS) /I"$(BUILD_INC)" /I"$(BUILD_INC_EXT)" /c /Fo$(BUILD_DIR)\ $?
6470

6571

6672
# -- zlib ---------------------------------------------
6773
# zlib file compression
6874
#------------------------------------------------------
69-
ZLIB_SRCDIR=$(BUILD_SRC)\zlib-1.2.11
75+
ZLIB_SRCDIR=$(BUILD_EXT)\zlib-1.2.11
7076

7177
zlib : $(ZLIB_SRCDIR)\\*.c
72-
cl $(CFLAGS) $(CDEFS) /I"$(BUILD_INC)" /c /Fo$(BUILD_DIR)\ $?
78+
cl $(CFLAGS) $(CDEFS) /I"$(BUILD_INC)" /c /Fo$(BUILD_DIR_EXT)\ $?
7379

7480

MSSingleScanSrc/MSSingleScan.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ using namespace MSToolkit;
2424

2525
int main(int argc, char *argv[]){
2626

27-
//Here are all the variable we are going to need
27+
//Here are all the variables we are going to need
2828
MSReader r;
2929
Spectrum s;
3030
int j;

0 commit comments

Comments
 (0)