mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 21:13:23 -07:00
Fix to allow Greenshot to run as a portable App, installer will hopefully be made this week...
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2577 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
5e7f676cfd
commit
791140101a
3 changed files with 23 additions and 24 deletions
|
@ -6,5 +6,8 @@
|
||||||
</startup>
|
</startup>
|
||||||
<runtime>
|
<runtime>
|
||||||
<loadFromRemoteSources enabled="true"/>
|
<loadFromRemoteSources enabled="true"/>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<probing privatePath="App\Greenshot"/>
|
||||||
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
</configuration>
|
</configuration>
|
|
@ -28,8 +28,6 @@ namespace Greenshot {
|
||||||
/// Description of Main.
|
/// Description of Main.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GreenshotMain {
|
public class GreenshotMain {
|
||||||
private const string PAF_PATH = @"App\Greenshot";
|
|
||||||
|
|
||||||
static GreenshotMain() {
|
static GreenshotMain() {
|
||||||
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);
|
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);
|
||||||
}
|
}
|
||||||
|
@ -49,8 +47,6 @@ namespace Greenshot {
|
||||||
|
|
||||||
[STAThread]
|
[STAThread]
|
||||||
public static void Main(string[] args) {
|
public static void Main(string[] args) {
|
||||||
// Needed to make Greenshot portable, the path should be appended before the DLL's are loaded!!
|
|
||||||
AppDomain.CurrentDomain.AppendPrivatePath(PAF_PATH);
|
|
||||||
MainForm.Start(args);
|
MainForm.Start(args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<!-- This file can be used to make Greenshot log in the application directory -->
|
<!-- This file can be used to make Greenshot log in the application directory -->
|
||||||
<!-- See http://logging.apache.org/log4net/release/sdk/log4net.Layout.PatternLayout.html -->
|
<!-- See http://logging.apache.org/log4net/release/sdk/log4net.Layout.PatternLayout.html -->
|
||||||
<log4net>
|
<log4net>
|
||||||
<appender name="FileAppender" type="log4net.Appender.RollingFileAppender">
|
<appender name="FileAppender" type="log4net.Appender.RollingFileAppender">
|
||||||
<file value="Greenshot.log" />
|
<file value="Data\Greenshot\Greenshot.log" />
|
||||||
<encoding value="utf-8" />
|
<encoding value="utf-8" />
|
||||||
<appendToFile value="true" />
|
<appendToFile value="true" />
|
||||||
<rollingStyle value="Size" />
|
<rollingStyle value="Size" />
|
||||||
<maxSizeRollBackups value="3" />
|
<maxSizeRollBackups value="3" />
|
||||||
<maximumFileSize value="1MB" />
|
<maximumFileSize value="1MB" />
|
||||||
<staticLogFileName value="true" />
|
<staticLogFileName value="true" />
|
||||||
<layout type="log4net.Layout.PatternLayout">
|
<layout type="log4net.Layout.PatternLayout">
|
||||||
<conversionPattern value="%date{ISO8601} [%thread] %-5level - [%logger] %m%n%exception" />
|
<conversionPattern value="%date{ISO8601} [%thread] %-5level - [%logger] %m%n%exception" />
|
||||||
</layout>
|
</layout>
|
||||||
</appender>
|
</appender>
|
||||||
<root>
|
<root>
|
||||||
<level value="INFO" />
|
<level value="ERROR" />
|
||||||
<appender-ref ref="FileAppender" />
|
<appender-ref ref="FileAppender" />
|
||||||
</root>
|
</root>
|
||||||
</log4net>
|
</log4net>
|
||||||
</configuration>
|
</configuration>
|
Loading…
Add table
Add a link
Reference in a new issue