Explorar o código

Moved qsrc files and added build instructions

oldentree %!s(int64=5) %!d(string=hai) anos
pai
achega
40fcd30ab7

+ 12 - 2
README.md

@@ -12,8 +12,18 @@ You can also find a copy of version 1.0 of this mod, which is the same as the ve
 
 If you haven't already, create a directory called "Mod" in your GirlLife game directory. Put everything in the "Mod" folder and activate the mod through the game menu. You have to input bestmod when asked for the name of the mod.
 
-QSP: Mod/bestmod.qsp
-Images: Mod/bestmod/images
+- QSP: Mod/bestmod.qsp
+- Images: Mod/bestmod/images
+
+# Building from source
+
+## macOS/Linux
+
+Just use the build.sh I store from the main Girl Life source ;-)
+
+## Windows
+
+It looks like Windows users can also use the build.sh. No idea how you can, since I don't use Windows.
 
 # Roadmap
 

+ 19 - 0
bestmod.qproj

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<QGen-project version="4.0.0 beta 1">
+	<Structure>
+  <Location name="mod_bestmod_setup"/>
+  <Location name="mod_bestmod_readme"/>
+	<Location name="mod_bestmod"/>
+	<Location name="mod_bestmod_banditbreak"/>
+	<Location name="mod_bestmod_kuhr2x"/>
+	<Location name="mod_bestmod_mira"/>
+	<Location name="mod_bestmod_sitr2x"/>
+	<Location name="mod_bestmod_bandit"/>
+	<Location name="mod_bestmod_kuhr"/>
+	<Location name="mod_bestmod_petdog"/>
+  <Location name="mod_bestmod_sitr"/>
+	<Location name="mod_bestmod_gadsarai"/>
+	<Location name="mod_bestmod_margo"/>
+	<Location name="mod_bestmod_petshop"/>
+	</Structure>
+</QGen-project>

BIN=BIN
bestmod.txt


+ 27 - 0
build.sh

@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+set -x
+
+# Set those lines to fit your setup.
+# This is where glife.qsp will be copied. If you don't want to move it just comment (#) the line below.
+#DESTDIR=../GL_ECV
+
+# The file that will be generated or open
+QSPFILE=bestmod.qsp
+
+#######################################################################
+
+./txtmerge.py locations glife.txt
+if [[ "$OSTYPE" == "linux-gnu" ]]; then
+	./txt2gam.linux glife.txt "${QSPFILE}" 1> /dev/null
+elif [[ "$OSTYPE" == "darwin"* ]]; then
+	./txt2gam.mac glife.txt "${QSPFILE}" 1> /dev/null
+elif [[ "$OSTYPE" == "msys" ]]; then
+	if [[ "$MSYSTEM_CARCH" == "x86_64" ]]; then
+		./txt2gam64.exe glife.txt "${QSPFILE}" 1> /dev/null
+	else
+		./txt2gam.exe glife.txt "${QSPFILE}" 1> /dev/null
+	fi
+fi
+if [ -d "${DESTDIR}" ]; then
+	cp --reflink=auto "${QSPFILE}" "${DESTDIR}"
+fi

+ 0 - 0
mod_bestmod.qsrc → locations/mod_bestmod.qsrc


+ 0 - 0
mod_bestmod_bandit.qsrc → locations/mod_bestmod_bandit.qsrc


+ 0 - 0
mod_bestmod_banditbreak.qsrc → locations/mod_bestmod_banditbreak.qsrc


+ 0 - 0
mod_bestmod_gadsarai.qsrc → locations/mod_bestmod_gadsarai.qsrc


+ 0 - 0
mod_bestmod_kuhr.qsrc → locations/mod_bestmod_kuhr.qsrc


+ 0 - 0
mod_bestmod_kuhr2x.qsrc → locations/mod_bestmod_kuhr2x.qsrc


+ 0 - 0
mod_bestmod_margo.qsrc → locations/mod_bestmod_margo.qsrc


+ 0 - 0
mod_bestmod_mira.qsrc → locations/mod_bestmod_mira.qsrc


+ 0 - 0
mod_bestmod_petdog.qsrc → locations/mod_bestmod_petdog.qsrc


+ 0 - 0
mod_bestmod_petshop.qsrc → locations/mod_bestmod_petshop.qsrc


+ 0 - 0
mod_bestmod_readme.qsrc → locations/mod_bestmod_readme.qsrc


+ 4 - 5
mod_bestmod_setup.qsrc → locations/mod_bestmod_setup.qsrc

@@ -1,16 +1,16 @@
 # mod_bestmod_setup
-!input basic mod information here. 
+!input basic mod information here.
 !this location must be the first one
 
 $mod_info[0] = 'bestmod'
-!0=mod name, saved to $mod_name[i] array 
+!0=mod name, saved to $mod_name[i] array
 
-$mod_info[1] = '10000'
+$mod_info[1] = '10100'
 !1=mod version
 !this will be displayed as version 1.2, fix3.
 !if you input 40500, will be showen as version 4.5
 
-$mod_info[2] = 'julzor'
+$mod_info[2] = 'julzor, oldentree'
 !2=mod author
 
 $mod_info[3] = 'bestiality content'
@@ -28,4 +28,3 @@ if curloc = 'mod_<<$mod_info[0]>>_setup':
 end
 
 --- mod_bestmod_setup ---------------------------------
-

+ 0 - 0
mod_bestmod_sitr.qsrc → locations/mod_bestmod_sitr.qsrc


+ 0 - 0
mod_bestmod_sitr2x.qsrc → locations/mod_bestmod_sitr2x.qsrc


BIN=BIN
txt2gam.exe


BIN=BIN
txt2gam.linux


BIN=BIN
txt2gam.mac


BIN=BIN
txt2gam64.exe


+ 42 - 0
txtmerge.py

@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+# usage: txtmerge.py <input_dir> <output_file_name>
+# does the exact opposite of txtsplit.py
+
+import os
+import sys
+import re
+import io
+import xml.etree.ElementTree as ET
+
+assert len(sys.argv) == 3, "usage:\ntxtmerge.py <input_dir> <output_file_name>"
+idir = str(sys.argv[1])
+oname = str(sys.argv[2])
+
+# read the project xml file first
+# let's do this later in order to implement directory structure
+tree = ET.parse('bestmod.qproj')
+root = tree.getroot()
+
+
+ofile = io.open(oname, 'w', encoding='utf-16', newline='\r\n')
+
+for location in root.iter('Location'):
+    iname = location.attrib['name']
+    iname = iname.replace("$","_")
+
+    try:
+        ifile = io.open(os.path.join(idir,iname + '.qsrc'), 'rt', encoding='utf-8')
+        text = ifile.read()
+
+        # make sure there's a line at the end of file
+        # (why wouldn't there be one? WINDOWS!
+        if text[-1] != u'\n':
+            text += u'\n\n'
+
+        ofile.write(text)
+        ifile.close()
+    except IOError:
+        print("WARNING: missing location %s" % iname)
+        pass
+
+ofile.close()

+ 46 - 0
txtsplit.py

@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+# usage: txtsplit.py <input_file_name> <output_dir>
+# splits a txt2gam file into individual location files
+# encoded in utf-8, for git to better handle
+
+import os
+import sys
+import re
+import io
+import xml.etree.ElementTree as ET
+
+assert len(sys.argv) == 3, "usage:\ntxtsplit.py <input_file_name> <output_dir>"
+iname = str(sys.argv[1])
+odir = str(sys.argv[2])
+
+# read the project xml file first
+# let's do this later in order to implement directory structure
+"""
+tree = ET.parse('glife.qproj')
+root = tree.getroot()
+"""
+
+ifile = io.open(iname, 'rt', encoding='utf-16')
+
+counter = 1
+
+oname = None
+firstline = ifile.readline().replace(u'\ufeff','')
+match = re.search(ur'^#\s(\$?[_.\w]+)$', firstline)
+if match:
+    oname = os.path.join(odir, match.group(1).replace("$","_") + '.qsrc' )
+    counter += 1
+assert oname, "file is in the wrong format, must start with a location name"
+
+ofile = io.open(oname, 'w', encoding='utf-8')
+ofile.write(firstline)
+
+for line in ifile:
+    match = re.search(ur'^#\s(\$?[_.\w]+)$', line)
+    if match:
+        ofile.close()
+        oname = os.path.join(odir, match.group(1).replace("$","_") + '.qsrc' )
+        counter += 1
+        ofile = io.open(oname, 'w', encoding='utf-8')
+    ofile.write(line)
+        

+ 46 - 0
txtsplit3.py

@@ -0,0 +1,46 @@
+#!/usr/bin/env python3
+# usage: txtsplit.py <input_file_name> <output_dir>
+# splits a txt2gam file into individual location files
+# encoded in utf-8, for git to better handle
+
+import os
+import sys
+import re
+import io
+import xml.etree.ElementTree as ET
+
+assert len(sys.argv) == 3, "usage:\ntxtsplit.py <input_file_name> <output_dir>"
+iname = str(sys.argv[1])
+odir = str(sys.argv[2])
+
+# read the project xml file first
+# let's do this later in order to implement directory structure
+"""
+tree = ET.parse('glife.qproj')
+root = tree.getroot()
+"""
+
+ifile = io.open(iname, 'rt', encoding='utf-16')
+
+counter = 1
+
+oname = None
+firstline = ifile.readline().replace(u'\ufeff','')
+match = re.search('^#\s(\$?[_.\w]+)$', firstline)
+if match:
+    oname = os.path.join(odir, match.group(1).replace("$","_") + '.qsrc' )
+    counter += 1
+assert oname, "file is in the wrong format, must start with a location name"
+
+ofile = io.open(oname, 'w', encoding='utf-8')
+ofile.write(firstline)
+
+for line in ifile:
+    match = re.search('^#\s(\$?[_.\w]+)$', line)
+    if match:
+        ofile.close()
+        oname = os.path.join(odir, match.group(1).replace("$","_") + '.qsrc' )
+        counter += 1
+        ofile = io.open(oname, 'w', encoding='utf-8')
+    ofile.write(line)
+