mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 21:13:23 -07:00
Preparing to make the credentials flow into the project at build time.
This commit is contained in:
parent
cfdc7a7ec2
commit
58050f5092
8 changed files with 241 additions and 187 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -209,3 +209,6 @@ FakesAssemblies/
|
|||
GeneratedArtifacts/
|
||||
_Pvt_Extensions/
|
||||
ModelManifest.xml
|
||||
|
||||
# Greenshot credentials files
|
||||
*.credentials.cs
|
|
@ -39,7 +39,7 @@
|
|||
<PropertyGroup Condition="$(MSBuildProjectName.Contains('Tests')) Or $(MSBuildProjectName.Contains('Demo'))">
|
||||
<GenerateDocumentationFile>false</GenerateDocumentationFile>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
|
@ -63,8 +63,59 @@
|
|||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Tokens Include="Box_ClientId">
|
||||
<ReplacementValue>$(Box_ClientId)</ReplacementValue>
|
||||
</Tokens>
|
||||
<Tokens Include="Box_ClientSecret">
|
||||
<ReplacementValue>$(Box_ClientSecret)</ReplacementValue>
|
||||
</Tokens>
|
||||
<Tokens Include="DropBox_ClientId">
|
||||
<ReplacementValue>$(DropBox_ClientId)</ReplacementValue>
|
||||
</Tokens>
|
||||
<Tokens Include="DropBox_ClientSecret">
|
||||
<ReplacementValue>$(DropBox_ClientSecret)</ReplacementValue>
|
||||
</Tokens>
|
||||
<Tokens Include="Flickr_ClientId">
|
||||
<ReplacementValue>$(Flickr_ClientId)</ReplacementValue>
|
||||
</Tokens>
|
||||
<Tokens Include="Flickr_ClientSecret">
|
||||
<ReplacementValue>$(Flickr_ClientSecret)</ReplacementValue>
|
||||
</Tokens>
|
||||
<Tokens Include="Imgur_ClientId">
|
||||
<ReplacementValue>$(Imgur_ClientId)</ReplacementValue>
|
||||
</Tokens>
|
||||
<Tokens Include="Imgur_ClientSecret">
|
||||
<ReplacementValue>$(Imgur_ClientSecret)</ReplacementValue>
|
||||
</Tokens>
|
||||
<Tokens Include="Photobucket_ClientId">
|
||||
<ReplacementValue>$(Photobucket_ClientId)</ReplacementValue>
|
||||
</Tokens>
|
||||
<Tokens Include="Photobucket_ClientSecret">
|
||||
<ReplacementValue>$(Photobucket_ClientSecret)</ReplacementValue>
|
||||
</Tokens>
|
||||
<Tokens Include="Picasa_ClientId">
|
||||
<ReplacementValue>$(Picasa_ClientId)</ReplacementValue>
|
||||
</Tokens>
|
||||
<Tokens Include="Picasa_ClientSecret">
|
||||
<ReplacementValue>$(Picasa_ClientSecret)</ReplacementValue>
|
||||
</Tokens>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="Exists('$(ProjectName).Credentials.template')">
|
||||
<PackageReference Include="MSBuildTasks" Version="1.5.0.235" GeneratePathProperty="true"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(PkgTools_MSBuildTasks)MSBuild.Community.Tasks.Targets" Condition="Exists('$(ProjectName).Credentials.template')"/>
|
||||
|
||||
<Target Name="Process templates" BeforeTargets="PrepareForBuild" Condition="Exists('$(ProjectName).Credentials.template')">
|
||||
<Message Text="Processing: $(ProjectName).Credentials.template" />
|
||||
<TemplateFile Template="$(ProjectName).Credentials.template" OutputFilename="$(ProjectName).Credentials.cs" Tokens="@(Tokens)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="PostBuild" BeforeTargets="PostBuildEvent" Condition="'$(BuildingInsideVisualStudio)' == 'true' And $(MSBuildProjectName.Contains('Plugin')) And !$(MSBuildProjectName.Contains('Test')) And !$(MSBuildProjectName.Contains('Demo'))">
|
||||
<Exec Command="
|
||||
|
||||
xcopy /y /d "$(TargetDir)$(TargetName).*" "$(SolutionDir)$(SolutionName)\$(OutDir)"

|
||||
xcopy /y /d "$(TargetDir)*.dll" "$(SolutionDir)$(SolutionName)\$(OutDir)"

|
||||
xcopy /y /d "$(TargetDir)*.xml" "$(SolutionDir)$(SolutionName)\$(OutDir)"


|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
/*
|
||||
* Greenshot - a free and open source screenshot tool
|
||||
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
||||
*
|
||||
* For more information see: http://getgreenshot.org/
|
||||
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
*
|
||||
* This program 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 1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace GreenshotBoxPlugin {
|
||||
/// <summary>
|
||||
/// This class is merely a placeholder for the file keeping the API key and secret for Box integration.
|
||||
/// You can set your own values here
|
||||
/// </summary>
|
||||
public static class BoxCredentials {
|
||||
public static string ClientId = "@credentials_box_client_id@";
|
||||
public static string ClientSecret = "@credentials_box_client_secret@";
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Greenshot - a free and open source screenshot tool
|
||||
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
||||
*
|
||||
* For more information see: http://getgreenshot.org/
|
||||
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
*
|
||||
* This program 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 1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace GreenshotBoxPlugin {
|
||||
/// <summary>
|
||||
/// This class is merely a placeholder for the file keeping the API key and secret for Box integration.
|
||||
/// You can set your own values here
|
||||
/// </summary>
|
||||
public static class BoxCredentials {
|
||||
public static string ClientId = "${Box_ClientId}";
|
||||
public static string ClientSecret = "${Box_ClientSecret}";
|
||||
}
|
||||
}
|
|
@ -1,31 +1,31 @@
|
|||
/*
|
||||
* Greenshot - a free and open source screenshot tool
|
||||
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
||||
*
|
||||
* For more information see: http://getgreenshot.org/
|
||||
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
*
|
||||
* This program 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 1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace GreenshotDropboxPlugin {
|
||||
/// <summary>
|
||||
/// This class is merely a placeholder for the file keeping the API key and secret for dropbox integration.
|
||||
/// You can set your own values here
|
||||
/// </summary>
|
||||
public static class DropBoxCredentials {
|
||||
public static string CONSUMER_KEY = "@credentials_dropbox_consumer_key@";
|
||||
public static string CONSUMER_SECRET = "@credentials_dropbox_consumer_secret@";
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Greenshot - a free and open source screenshot tool
|
||||
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
||||
*
|
||||
* For more information see: http://getgreenshot.org/
|
||||
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
*
|
||||
* This program 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 1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace GreenshotDropboxPlugin {
|
||||
/// <summary>
|
||||
/// This class is merely a placeholder for the file keeping the API key and secret for dropbox integration.
|
||||
/// You can set your own values here
|
||||
/// </summary>
|
||||
public static class DropBoxCredentials {
|
||||
public static string CONSUMER_KEY = "${DropBox_ClientId}";
|
||||
public static string CONSUMER_SECRET = "${DropBox_ClientSecret}";
|
||||
}
|
||||
}
|
|
@ -1,31 +1,31 @@
|
|||
/*
|
||||
* Greenshot - a free and open source screenshot tool
|
||||
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
||||
*
|
||||
* For more information see: http://getgreenshot.org/
|
||||
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
*
|
||||
* This program 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 1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace GreenshotFlickrPlugin {
|
||||
/// <summary>
|
||||
/// This class is merely a placeholder for the file keeping the API key and secret for dropbox integration.
|
||||
/// You can set your own values here
|
||||
/// </summary>
|
||||
public static class FlickrCredentials {
|
||||
public static string ConsumerKey = "@credentials_flickr_consumer_key@";
|
||||
public static string ConsumerSecret = "@credentials_flickr_consumer_secret@";
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Greenshot - a free and open source screenshot tool
|
||||
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
||||
*
|
||||
* For more information see: http://getgreenshot.org/
|
||||
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
*
|
||||
* This program 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 1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace GreenshotFlickrPlugin {
|
||||
/// <summary>
|
||||
/// This class is merely a placeholder for the file keeping the API key and secret for dropbox integration.
|
||||
/// You can set your own values here
|
||||
/// </summary>
|
||||
public static class FlickrCredentials {
|
||||
public static string ConsumerKey = "${Flickr_ClientId}";
|
||||
public static string ConsumerSecret = "${Flickr_ClientSecret}";
|
||||
}
|
||||
}
|
|
@ -1,31 +1,31 @@
|
|||
/*
|
||||
* Greenshot - a free and open source screenshot tool
|
||||
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
||||
*
|
||||
* For more information see: http://getgreenshot.org/
|
||||
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
*
|
||||
* This program 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 1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace GreenshotImgurPlugin {
|
||||
/// <summary>
|
||||
/// This class is merely a placeholder for the file keeping the API key and secret for imgur integration.
|
||||
/// You can set your own values here
|
||||
/// </summary>
|
||||
public static class ImgurCredentials {
|
||||
public static string CONSUMER_KEY = "@credentials_imgur_consumer_key@";
|
||||
public static string CONSUMER_SECRET = "@credentials_imgur_consumer_secret@";
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Greenshot - a free and open source screenshot tool
|
||||
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
||||
*
|
||||
* For more information see: http://getgreenshot.org/
|
||||
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
*
|
||||
* This program 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 1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace GreenshotImgurPlugin {
|
||||
/// <summary>
|
||||
/// This class is merely a placeholder for the file keeping the API key and secret for imgur integration.
|
||||
/// You can set your own values here
|
||||
/// </summary>
|
||||
public static class ImgurCredentials {
|
||||
public static string CONSUMER_KEY = "${Imgur_ClientId}";
|
||||
public static string CONSUMER_SECRET = "${Imgur_ClientSecret}";
|
||||
}
|
||||
}
|
|
@ -1,31 +1,31 @@
|
|||
/*
|
||||
* Greenshot - a free and open source screenshot tool
|
||||
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
||||
*
|
||||
* For more information see: http://getgreenshot.org/
|
||||
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
*
|
||||
* This program 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 1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace GreenshotPhotobucketPlugin {
|
||||
/// <summary>
|
||||
/// This class is merely a placeholder for the file keeping the API key and secret for photobucket integration.
|
||||
/// You can set your own values here
|
||||
/// </summary>
|
||||
public static class PhotobucketCredentials {
|
||||
public static string ConsumerKey = "@credentials_photobucket_consumer_key@";
|
||||
public static string ConsumerSecret = "@credentials_photobucket_consumer_secret@";
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Greenshot - a free and open source screenshot tool
|
||||
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
||||
*
|
||||
* For more information see: http://getgreenshot.org/
|
||||
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
*
|
||||
* This program 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 1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace GreenshotPhotobucketPlugin {
|
||||
/// <summary>
|
||||
/// This class is merely a placeholder for the file keeping the API key and secret for photobucket integration.
|
||||
/// You can set your own values here
|
||||
/// </summary>
|
||||
public static class PhotobucketCredentials {
|
||||
public static string ConsumerKey = "${Photobucket_ClientId}";
|
||||
public static string ConsumerSecret = "${Photobucket_ClientSecret}";
|
||||
}
|
||||
}
|
|
@ -1,31 +1,31 @@
|
|||
/*
|
||||
* Greenshot - a free and open source screenshot tool
|
||||
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
||||
*
|
||||
* For more information see: http://getgreenshot.org/
|
||||
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
*
|
||||
* This program 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 1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace GreenshotPicasaPlugin {
|
||||
/// <summary>
|
||||
/// This class is merely a placeholder for the file keeping the API key and secret for dropbox integration.
|
||||
/// You can set your own values here
|
||||
/// </summary>
|
||||
public static class PicasaCredentials {
|
||||
public static string ClientId = "@credentials_picasa_consumer_key@";
|
||||
public static string ClientSecret = "@credentials_picasa_consumer_secret@";
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Greenshot - a free and open source screenshot tool
|
||||
* Copyright (C) 2007-2020 Thomas Braun, Jens Klingen, Robin Krom
|
||||
*
|
||||
* For more information see: http://getgreenshot.org/
|
||||
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
*
|
||||
* This program 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 1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace GreenshotPicasaPlugin {
|
||||
/// <summary>
|
||||
/// This class is merely a placeholder for the file keeping the API key and secret for dropbox integration.
|
||||
/// You can set your own values here
|
||||
/// </summary>
|
||||
public static class PicasaCredentials {
|
||||
public static string ClientId = "${Picasa_ClientId}";
|
||||
public static string ClientSecret = "${Picasa_ClientSecret}";
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue