de en es fr
Let the machine help
Light teasing, exhibition, BDSM, sissyfication, watersports... with sounds and pictures


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 #include: Yes, we can.
PostPosted: Thu Sep 05, 2013 5:19 am 
Offline
Newcomer
Hi there! I'm new here and this is a real nice application! :-)

I'm making a couple of integrated scripts which have lot of common code between them. As currently we don't have statements like "include", is necessary to paste the common code on every file. This is really hard to maintain...

I solved this by creating a batch that merges a file containing the common code and the script specific code, works like this:

1) I created a "dev" folder on the root of SexScripts
2) Moved all my scripts to it, I'm using Notepad++ to edit.
3) Created a script file with all common code, and cleaned it on other files
4) The batch merges the common code with other scripts into new files inside of the "scripts" directory;

Bellow is an example of how this batch works. The files "myscript", "teasings" and "tests" are the scripts and the "commcode" is the code that should be shared with every file.

Code:
@echo off
rd /s /q ..\scripts\myscript
md ..\scripts\myscript
type commcode.groov myscript.groovy > ..\scripts\myscript.groovy
type commcode.groov teasings.groovy > ..\scripts\myscript\teasings.groovy
type commcode.groov tests.groovy > ..\scripts\myscript\tests.groovy
..\sexscripts myscript


I didn't test on Linux, but this might work:

Code:
#!/bin/sh
rm -rf ../scripts/myscript/*
cat commcode.groov myscript.groovy > ../scripts/myscript.groovy
cat commcode.groov teasings.groovy > ../scripts/myscript/teasings.groovy
cat commcode.groov tests.groovy > ../scripts/myscript/tests.groovy
../sexscripts.sh myscript


Top
 Profile Send private message 
 
 Re: #include: Yes, we can.
PostPosted: Fri Sep 26, 2014 4:42 am 
Offline
Active member
Very handy script to mix them togther.

Seems from searching around there are various approaches that people seem in theory think will work. Everything from using "File Evaluation" to using complex scripts.

I feel using classes is the best way to do this like having a file called Functions.class and in that file using class Functions { ...method() ... }. However I haven't managed to get this to work in groovy for SS :(


Top
 Profile Send private message 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010 - 2020
This website uses session cookies only.