mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
tools: wixguid.py
This commit is contained in:
parent
3c7e712e57
commit
aa7888effc
@ -20,7 +20,7 @@ The properties that control branding are the following:
|
|||||||
|
|
||||||
* `MyCopyright`: This is the product's copyright.
|
* `MyCopyright`: This is the product's copyright.
|
||||||
|
|
||||||
* `MyFspFsctlDeviceClassGuid`, `MyFspFsvrtDeviceClassGuid`: When creating devices the FSD needs to assign GUID classes to them; it uses the GUIDs specified by these properties. You MUST change these GUIDs when rebranding or your product and "official" WinFsp releases may interfere with each other. From the Visual Studio main menu use Tools > Create GUID and select option "3. static const struct GUID" to produce GUIDs in the correct format.
|
* `MyFspFsctlDeviceClassGuid`, `MyFspFsvrtDeviceClassGuid`: When creating devices the FSD needs to assign GUID classes to them; it uses the GUIDs specified by these properties. You MUST change these GUIDs when rebranding; otherwise your product and "official" WinFsp releases may interfere with each other. From the Visual Studio main menu use Tools > Create GUID and select option "3. static const struct GUID" to produce GUIDs in the correct format.
|
||||||
|
|
||||||
=== Versioning
|
=== Versioning
|
||||||
|
|
||||||
@ -56,4 +56,4 @@ Currently WinFsp does not support rebranding of the following components:
|
|||||||
|
|
||||||
Additional limitations:
|
Additional limitations:
|
||||||
|
|
||||||
* The default installer (in file `build\VStudio\installer\Product.wxs`) contains a number of GUIDs. These MUST be changed if the default installer is used by a rebranded product or installation of your product and "official" WinFsp releases may interfere with each other. At this time this can only be done manually; it may be automated in the future via a script.
|
* The default installer (in file `build\VStudio\installer\Product.wxs`) contains a number of GUIDs. These MUST be changed if the default installer is used by a rebranded product; otherwise installation of your product and "official" WinFsp releases may interfere with each other. There is a Python script at `tools\gensrc\wixguid.py` that can help with this.
|
||||||
|
16
tools/gensrc/wixguid.py
Normal file
16
tools/gensrc/wixguid.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
import re, sys, uuid
|
||||||
|
|
||||||
|
guid_re = re.compile("[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}")
|
||||||
|
guid_dt = {}
|
||||||
|
def mk_guid(m):
|
||||||
|
guid = m.group(0).upper()
|
||||||
|
if guid not in guid_dt:
|
||||||
|
guid_dt[guid] = str(uuid.uuid4()).upper()
|
||||||
|
return guid_dt[guid]
|
||||||
|
|
||||||
|
with open(sys.argv[1]) as file:
|
||||||
|
text = file.read()
|
||||||
|
text = guid_re.sub(mk_guid, text)
|
||||||
|
sys.stdout.write(text)
|
Loading…
x
Reference in New Issue
Block a user