Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Replacement in text files (http://forums.winamp.com/showthread.php?t=300508)

occular 1st December 2008 13:54

Replacement in text files
 
Hi all,
I'm new to NSIS development. I've looked through the examples but don't quite yet see what I'm looking for...

I wish to create a patching installer, i.e. one which asks your for an existing directory, and then patches some files.
The actual patching involves processing a file like this:

Quote:

#Fri Nov 28 15:48:55 GMT 2008
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.maxProblemPerUnit=200
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
org.eclipse.jdt.core.compiler.problem.autoboxing=warning
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch,*.testsuite,*.deploy,*.location,*.execution,*.datapool,*.artifact,*.testlog,*.xml,*.html,*.svg
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
org.eclipse.jdt.core.codeComplete.visibilityCheck=enabled
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.classpathVariable.JRE_SRC=C\:/Program Files/Java/jdk1.6.0/src.zip
org.eclipse.jdt.core.classpathVariable.TOMCAT_HOME=C\:/workspaces/JPJ/Tomcat-5.5.17
org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
org.eclipse.jdt.core.classpathVariable.JRE_LIB=C\:/Program Files/Java/jdk1.6.0/jre/lib/rt.jar
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
org.eclipse.jdt.core.classpathVariable.JRE_SRCROOT=
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.source=1.6
... and replacing certain lines containing keys of interest with certain values, e.g.:

Quote:

org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
This should replace the original line containing "org.eclipse.jdt.core.compiler.problem.autoboxing"...

Any ideas any one? The patching example that comes with NSIS wasn't quite what I was looking for....

ta,
occ

kichik 1st December 2008 17:11

Look at ConfigWrite.

occular 1st December 2008 17:17

Quote:

Originally posted by kichik
Look at ConfigWrite.
Thanks for that - looks like just the thing!


All times are GMT. The time now is 05:32.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.