Skip to content

Commit

Permalink
Merge branch 'release/1.21.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
eaproton committed Jul 14, 2021
2 parents 5fc8111 + ca50c4b commit f13de12
Show file tree
Hide file tree
Showing 338 changed files with 12,455 additions and 3,868 deletions.
9 changes: 6 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ csharp_new_line_between_query_expression_clauses=true
# http://kent-boogaart.com/blog/editorconfig-reference-for-c-developers#csharp_prefer_simple_default_expression
csharp_prefer_simple_default_expression=false:error

# IDE0063: Use simple 'using' statement
csharp_prefer_simple_using_statement = false

# http://kent-boogaart.com/blog/editorconfig-reference-for-c-developers#csharp_preserve_single_line_blocks
csharp_preserve_single_line_blocks=true

Expand Down Expand Up @@ -131,10 +134,10 @@ csharp_style_expression_bodied_indexers=true:error
csharp_style_expression_bodied_methods=true

# http://kent-boogaart.com/blog/editorconfig-reference-for-c-developers#csharp_style_expression_bodied_operators
csharp_style_expression_bodied_operators=true:error
csharp_style_expression_bodied_operators=false:suggestion

# http://kent-boogaart.com/blog/editorconfig-reference-for-c-developers#csharp_style_expression_bodied_properties
csharp_style_expression_bodied_properties=true:error
csharp_style_expression_bodied_properties=when_on_single_line:suggestion

# http://kent-boogaart.com/blog/editorconfig-reference-for-c-developers#csharp_style_inlined_variable_declaration
csharp_style_inlined_variable_declaration=true:error
Expand Down Expand Up @@ -257,4 +260,4 @@ dotnet_naming_symbols.constant_fields.required_modifiers=const
dotnet_naming_style.pascal_case_style.capitalization=pascal_case

# ReSharper inspection severities
resharper_arrange_this_qualifier_highlighting=hint
resharper_arrange_this_qualifier_highlighting=hint
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ variables:
PUBLIC_REPO_URL: [email protected]:ProtonVPN/win-app.git

stages:
- bot # comes from translations/generator job
- build
- test
- sign
- build-installer
- ui-test
- installation-test
- mirror
- bot # comes from translations/generator job

sign:
stage: sign
Expand Down
4 changes: 3 additions & 1 deletion Setup/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ ProtonVPN-SetupFiles/*
ProtonVPN-cache/*
ProtonVPN.back.aip
ProtonVPNTap-cache/*
ProtonVPNTap-SetupFiles/*
ProtonVPNTap-SetupFiles/*
ProtonVPNTun-cache/*
ProtonVPNTun-SetupFiles/*
Binary file added Setup/Images/BannerBitmap.bmp
Binary file not shown.
Binary file added Setup/Images/DialogBitmap.bmp
Binary file not shown.
37 changes: 33 additions & 4 deletions Setup/ProtonVPN.aip

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions VisualStudioItemTemplates/CSharp/Code/1033/Class/Class.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) 2021 Proton Technologies AG
*
* This file is part of ProtonVPN.
*
* ProtonVPN is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ProtonVPN is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProtonVPN. If not, see <https://www.gnu.org/licenses/>.
*/
namespace $rootnamespace$
{
public class $safeitemrootname$
{
}
}
24 changes: 24 additions & 0 deletions VisualStudioItemTemplates/CSharp/Code/1033/Interface/Interface.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) 2021 Proton Technologies AG
*
* This file is part of ProtonVPN.
*
* ProtonVPN is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ProtonVPN is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProtonVPN. If not, see <https://www.gnu.org/licenses/>.
*/
namespace $rootnamespace$
{
public interface $safeitemrootname$
{
}
}
24 changes: 24 additions & 0 deletions VisualStudioItemTemplates/CSharp/Code/1033/WebClass/Class.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) 2021 Proton Technologies AG
*
* This file is part of ProtonVPN.
*
* ProtonVPN is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ProtonVPN is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ProtonVPN. If not, see <https://www.gnu.org/licenses/>.
*/
namespace $rootnamespace$
{
public class $safeitemrootname$
{
}
}
11 changes: 11 additions & 0 deletions VisualStudioItemTemplates/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
In the current folder (VisualStudioItemTemplates) you should have a CSharp folder.

That folder should be copied to the inside of the folder:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\ItemTemplates

It should substitute 3 files.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\ItemTemplates\CSharp\Code\1033\Class\Class.cs
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\ItemTemplates\CSharp\Code\1033\Interface\Interface.cs
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\ItemTemplates\CSharp\Code\1033\WebClass\Class.cs

Now Visual Studio has proper default files.
31 changes: 25 additions & 6 deletions ci/signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,33 @@ def sign():
exts = [".dll", ".exe"]
mainpath = "src/bin"
files = [p for p in Path(mainpath).rglob('*') if p.suffix in exts]
filepaths = []

for f in files:
filepath = str(Path(__file__).parent.absolute()) + "\\..\\" + str(f)
filepath = str(f)
unsign(filepath)
p = subprocess.Popen(['signtool.exe', 'sign', '/a', '/tr', 'http://timestamp.digicert.com', '/td', 'SHA256', '/fd', 'SHA256', filepath])
p.communicate()
if p.returncode != 0:
print("Failed to sign: " + filepath)
sys.exit(p.returncode)
filepaths.append(filepath)

if len(filepaths) >= 30:
filepaths = sign_filepaths(filepaths)

if len(filepaths) > 0:
filepaths = sign_filepaths(filepaths)

def sign_filepaths(filepaths):
cmd = ['signtool.exe', 'sign', '/a', '/tr', 'http://timestamp.globalsign.com/tsa/r6advanced1', '/td', 'SHA256', '/fd', 'SHA256']
cmd.extend(filepaths)
filepaths.clear()

p = subprocess.Popen(cmd)
p.communicate()

if p.returncode != 0:
print("Failed to sign the files.")
sys.exit(p.returncode)

return filepaths


def unsign(filepath):
p = subprocess.Popen(['dumpbin.exe', '/HEADERS', filepath], stdout=subprocess.PIPE)
Expand Down
4 changes: 2 additions & 2 deletions src/GlobalAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: AssemblyVersion("1.20.4.0")]
[assembly: AssemblyFileVersion("1.20.4.0")]
[assembly: AssemblyVersion("1.21.2.0")]
[assembly: AssemblyFileVersion("1.21.2.0")]
[assembly: ComVisible(false)]
[assembly: AssemblyInformationalVersion("$AssemblyVersion")]
Loading

0 comments on commit f13de12

Please sign in to comment.