mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 10:47:02 -07:00
Added a script for replacing the credentials via the environment variables which can be set before the build. Changed the way the build works, only if private-credentials files are stored they will be used where before there would be an error if none were available.
The current credentials files now have replacement tokens, a build without replacement will work but the credentials will be invalid.
This commit is contained in:
parent
4a22a01d31
commit
848c77890a
13 changed files with 77 additions and 176 deletions
|
@ -22,10 +22,10 @@
|
|||
namespace GreenshotFlickrPlugin {
|
||||
/// <summary>
|
||||
/// This class is merely a placeholder for the file keeping the API key and secret for dropbox integration.
|
||||
/// Copy this file to FlickrCredentials.private.cs and fill in valid credentials. (Or empty strings, but of course you won't be able to use the DropBox plugin then.)
|
||||
/// You can set your own values here
|
||||
/// </summary>
|
||||
public static class FlickrCredentials {
|
||||
public static string ConsumerKey = empty;
|
||||
public static string ConsumerSecret = empty;
|
||||
public static string ConsumerKey = "@credentials_flickr_consumer_key@";
|
||||
public static string ConsumerSecret = "@credentials_flickr_consumer_secret@";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
<PostBuildEvent>if exist "$(ProjectDir)FlickrCredentials.orig.cs" (
|
||||
rename "$(ProjectDir)FlickrCredentials.cs" "FlickrCredentials.private.cs"
|
||||
rename "$(ProjectDir)FlickrCredentials.orig.cs" "FlickrCredentials.cs"
|
||||
) else exit /b -1
|
||||
)
|
||||
|
||||
mkdir "$(SolutionDir)bin\$(Configuration)\Plugins\$(ProjectName)"
|
||||
copy "$(ProjectDir)bin\$(Configuration)\$(TargetFileName)" "$(SolutionDir)bin\$(Configuration)\Plugins\$(ProjectName)\*.gsp"
|
||||
|
@ -76,34 +76,6 @@ copy "$(ProjectDir)Languages\*.xml" "$(SolutionDir)bin\$(Configuration)\Language
|
|||
if exist "$(ProjectDir)FlickrCredentials.private.cs" (
|
||||
rename "$(ProjectDir)FlickrCredentials.cs" "FlickrCredentials.orig.cs"
|
||||
rename "$(ProjectDir)FlickrCredentials.private.cs" "FlickrCredentials.cs"
|
||||
) else exit /b -1</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'x86' ">
|
||||
<RegisterForComInterop>False</RegisterForComInterop>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<BaseAddress>4194304</BaseAddress>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
|
||||
<RegisterForComInterop>False</RegisterForComInterop>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<BaseAddress>4194304</BaseAddress>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<Optimize>False</Optimize>
|
||||
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
|
||||
<DebugType>Full</DebugType>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>True</Optimize>
|
||||
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
|
||||
<DebugType>None</DebugType>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
)</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
Loading…
Add table
Add a link
Reference in a new issue