diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8c876dc --- /dev/null +++ b/.gitignore @@ -0,0 +1,348 @@ +#-------------------------------- +# area generale +#-------------------------------- +*.pdb +.vs/* + +#-------------------------------- +# aree temp: log/bin/obj +#-------------------------------- +/*/bin/* +/*/obj/* +/*/logs/*.txt +/*/logs/*.log +/*/logs/*.zip +/*/logs/*.json + +# ---> VisualStudio +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +build/ +bld/ +[Bb]in/ +[Oo]bj/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# Windows Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# ---> C Sharp +# Build Folders (you can keep bin if you'd like, to store dlls and pdbs) +[Bb]in/ +[Oo]bj/ + +# mstest test results +TestResults + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results +[Dd]ebug/ +[Rr]elease/ +x64/ +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.log +*.vspscc +*.vssscc +.builds + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper* + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish + +# Publish Web Output +*.Publish.xml + +# NuGet Packages Directory +packages + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +[Bb]in +[Oo]bj +sql +TestResults +[Tt]est[Rr]esult* +*.Cache +ClientBin +[Ss]tyle[Cc]op.* +~$* +*.dbmdl +Generated_Code #added for RIA/Silverlight projects + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML + + +.fake +.ionide diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..fbaba59 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,295 @@ +variables: + VERS_MAIN: '0.9' + NEW_REL: '' + APP_NAME: '' + APP_CONF: 'Release' + +# # Step esecuzione script powershell x code obfuscation (tool install + esecuzione) +# .obfuscate: &obfuscate +# - | +# obfuscate.ps1 + +# helper x fix pacchetti nuget da repo locale nexus.steamware.net +.nuget-fix: &nuget-fix + - | + $hasSource = C:\Tools\nuget.exe sources list | find "`"Steamware Nexus`"" /C + if ($hasSource -eq 0) { + C:\Tools\nuget.exe sources Add -Name "`"Steamware Nexus`"" -Source https://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`"" -StorePasswordInClearText + } else { + C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source https://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`"" -StorePasswordInClearText + } + echo $hasSource + + # helper creazione hash files x IIS +.hashBuild: &hashBuild + - | + $Target = "$env:APP_NAME\Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip" + $MD5 = Get-FileHash $Target -Algorithm MD5 + $SHA1 = Get-FileHash $Target -Algorithm SHA1 + New-Item $Target".md5" + New-Item $Target".sha1" + $MD5.Hash | Set-Content -Path $Target".md5" + $SHA1.Hash | Set-Content -Path $Target".sha1" + + echo "Created HASH files for $Target" + +# helper x send su NEXUS x pack +.nexusUpload: &nexusUpload + - | + Set-Alias mCurl C:\Windows\system32\curl.exe + $currentDate = get-date -format yyMM; + $currentTime = get-date -format ddHH; + $fileVers = $env:APP_NAME + "\Resources\VersNum.txt" + $VersNumb = Get-Content $fileVers + echo "Curr Version: $VersNumb" + if($CI_COMMIT_BRANCH -eq "main") + { + $version = "stable" + } + else + { + $version = "unstable" + } + $File2Send = Get-ChildItem("$env:APP_NAME\Releases\" + $CI_COMMIT_BRANCH + "\*") + ForEach ($File in $File2Send) { + $FileName = Split-Path $File -leaf + mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:APP_NAME/$version/LAST/$FileName + mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:APP_NAME/$version/ARCHIVE/$VersNumb/$FileName + echo "mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:APP_NAME/$version/LAST/$FileName" + } + mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "$env:APP_NAME\Resources\manifest.xml" https://nexus.steamware.net/repository/SWS/$env:APP_NAME/$version/LAST/manifest.xml + mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "$env:APP_NAME\Resources\ChangeLog.html" https://nexus.steamware.net/repository/SWS/$env:APP_NAME/$version/LAST/ChangeLog.html + +# helper creazione files zip x app console +.artifactZipper: &artifactZipper + - | + $7zipPath = $env:ProgramFiles+"\7-Zip\7z.exe" + if (-not (Test-Path -Path $7zipPath -PathType Leaf)) { + throw "7 zip file '$7zipPath' not found" + } + Set-Alias 7zip $7zipPath + $Target = "$env:APP_NAME\Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip" + $Source = "$env:APP_NAME\bin\$env:APP_CONF\net6.0\publish\win-x64\*" + 7zip a -tzip $Target $Source -xr!DATA + echo "called ZIP $Source --> $Target" + +# helper copia pubblicati in dir x upload +.artifactMover: &artifactMover + - | + $Target = "$env:APP_NAME\Releases\" + $CI_COMMIT_BRANCH + "\" + $Source = "$env:APP_NAME\bin\publish\net6.0\" + ROBOCOPY $Source $Target /MIR + echo "called ROBOCOPY $Source --> $Target" + + +stages: + - build + - staging + - deploy + - pack + +# ADAPTER:build: +# stage: build +# tags: +# - win +# variables: +# APP_NAME: MP.MONO.ADAPTER.OPC +# before_script: +# - *nuget-fix +# - dotnet restore MP.MONO.ALL.sln +# script: +# - dotnet build $env:APP_NAME/$env:APP_NAME.csproj + +# DECODER:build: +# stage: build +# tags: +# - win +# variables: +# APP_NAME: MP.MONO.DECODER +# before_script: +# - *nuget-fix +# - dotnet restore MP.MONO.ALL.sln +# script: +# - dotnet build $env:APP_NAME/$env:APP_NAME.csproj + +# SIM:build: +# stage: build +# tags: +# - win +# variables: +# APP_NAME: MP.MONO.SIM +# before_script: +# - *nuget-fix +# - dotnet restore MP.MONO.ALL.sln +# script: +# - dotnet build $env:APP_NAME/$env:APP_NAME.csproj + +# UI:build: +# stage: build +# tags: +# - win +# variables: +# APP_NAME: MP.MONO.UI +# before_script: +# - *nuget-fix +# - dotnet restore MP.MONO.ALL.sln +# script: +# - dotnet build $env:APP_NAME/$env:APP_NAME.csproj + +# UI:staging: +# stage: staging +# tags: +# - win +# variables: +# APP_NAME: MP.MONO.UI +# only: +# - develop +# needs: ["UI:build"] +# script: +# - dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj + +# UI:deploy: +# stage: deploy +# tags: +# - win +# variables: +# APP_NAME: MP.MONO.UI +# only: +# - main +# needs: ["UI:build"] +# script: +# # IIS 02 +# - dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj +# # IIS DEV +# - dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj + + +# ADAPTER:packDebug: +# stage: pack +# tags: +# - win +# only: +# - develop +# variables: +# APP_NAME: MP.MONO.ADAPTER.OPC +# APP_CONF: Debug +# needs: ["ADAPTER:build"] +# script: +# - dotnet publish -p:PublishProfile=SingleAppDebug.pubxml -p:RunCodeAnalysis=false -p:Configuration=$env:APP_CONF $env:APP_NAME/$env:APP_NAME.csproj +# - *artifactZipper +# - *hashBuild +# - *nexusUpload + +# DECODER:packDebug: +# stage: pack +# tags: +# - win +# only: +# - develop +# variables: +# APP_NAME: MP.MONO.DECODER +# APP_CONF: Debug +# needs: ["DECODER:build"] +# script: +# - dotnet publish -p:PublishProfile=SingleAppDebug.pubxml -p:RunCodeAnalysis=false -p:Configuration=$env:APP_CONF $env:APP_NAME/$env:APP_NAME.csproj +# - *artifactZipper +# - *hashBuild +# - *nexusUpload + +# SIM:packDebug: +# stage: pack +# tags: +# - win +# only: +# - develop +# variables: +# APP_NAME: MP.MONO.SIM +# APP_CONF: Debug +# needs: ["SIM:build"] +# script: +# - dotnet publish -p:PublishProfile=SingleAppDebug.pubxml -p:RunCodeAnalysis=false -p:Configuration=$env:APP_CONF $env:APP_NAME/$env:APP_NAME.csproj +# - *artifactZipper +# - *hashBuild +# - *nexusUpload + +# UI:packDebug: +# stage: pack +# tags: +# - win +# only: +# - develop +# variables: +# APP_NAME: MP.MONO.UI +# APP_CONF: Debug +# needs: ["UI:build"] +# script: +# - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=$env:APP_CONF $env:APP_NAME/$env:APP_NAME.csproj -o:publish +# - *artifactMover +# - *hashBuild +# - *nexusUpload + + +# ADAPTER:packRelease: +# stage: pack +# tags: +# - win +# only: +# - main +# variables: +# APP_NAME: MP.MONO.ADAPTER.OPC +# APP_CONF: Release +# needs: ["ADAPTER:build"] +# script: +# - dotnet publish -p:PublishProfile=SingleApp.pubxml -p:RunCodeAnalysis=false -p:Configuration=$env:APP_CONF $env:APP_NAME/$env:APP_NAME.csproj +# - *artifactZipper +# - *hashBuild +# - *nexusUpload + +# DECODER:packRelease: +# stage: pack +# tags: +# - win +# only: +# - main +# variables: +# APP_NAME: MP.MONO.DECODER +# APP_CONF: Release +# needs: ["DECODER:build"] +# script: +# - dotnet publish -p:PublishProfile=SingleApp.pubxml -p:RunCodeAnalysis=false -p:Configuration=$env:APP_CONF $env:APP_NAME/$env:APP_NAME.csproj +# - *artifactZipper +# - *hashBuild +# - *nexusUpload + +# SIM:packRelease: +# stage: pack +# tags: +# - win +# only: +# - main +# variables: +# APP_NAME: MP.MONO.SIM +# APP_CONF: Release +# needs: ["SIM:build"] +# script: +# - dotnet publish -p:PublishProfile=SingleApp.pubxml -p:RunCodeAnalysis=false -p:Configuration=$env:APP_CONF $env:APP_NAME/$env:APP_NAME.csproj +# - *artifactZipper +# - *hashBuild +# - *nexusUpload + +# UI:packRelease: +# stage: pack +# tags: +# - win +# only: +# - main +# variables: +# APP_NAME: MP.MONO.UI +# APP_CONF: Release +# needs: ["UI:build"] +# script: +# - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=$env:APP_CONF $env:APP_NAME/$env:APP_NAME.csproj -o:publish +# - *artifactMover +# - *hashBuild +# - *nexusUpload + \ No newline at end of file diff --git a/MajMin.vers b/MajMin.vers new file mode 100644 index 0000000..374cb0d --- /dev/null +++ b/MajMin.vers @@ -0,0 +1 @@ +1.2. \ No newline at end of file