Improvement: Combine start and download scripts. Improve and expand file-checks. #622
Closed
opened 2026-06-26 21:15:56 +02:00 by Griefed
·
19 comments
No Branch/Tag specified
main
develop
dependabot-gradle-serverpackcreator-plugin-example-develop-org.junit.platform-junit-platform-launcher-6.1.2
dependabot-gradle-serverpackcreator-plugin-example-develop-org.jetbrains.kotlin-kotlin-test-junit5-2.4.10
dependabot/npm_and_yarn/serverpackcreator-web-frontend/brace-expansion-1.1.16
dependabot/npm_and_yarn/serverpackcreator-web-frontend/postcss-8.5.23
dependabot/npm_and_yarn/serverpackcreator-web-frontend/quasar-2.23.1
dependabot/npm_and_yarn/serverpackcreator-web-frontend/axios-1.18.0
dependabot/npm_and_yarn/serverpackcreator-web-frontend/immutable-5.1.9
dependabot/npm_and_yarn/serverpackcreator-web-frontend/js-yaml-4.3.0
dependabot/npm_and_yarn/serverpackcreator-web-frontend/multi-7ba89ddc59
dependabot-gradle-serverpackcreator-api-develop-de.jensklingenberg.ktorfit-ktorfit-lib-2.7.5
dependabot-gradle-serverpackcreator-api-develop-org.junit.platform-junit-platform-launcher-6.1.1
dependabot-gradle-serverpackcreator-api-develop-com.electronwill.night-config-toml-3.9.0
dependabot-gradle-serverpackcreator-api-develop-org.jetbrains.kotlin-kotlin-bom-2.4.0
dependabot-gradle-serverpackcreator-app-develop-com.install4j-install4j-runtime-13.0
dependabot-gradle-serverpackcreator-app-develop-org.springframework.boot-spring-boot-starter-test-4.1.0
dependabot-gradle-serverpackcreator-app-develop-org.jetbrains.kotlin-kotlin-reflect-2.4.0
dependabot-gradle-serverpackcreator-plugin-example-develop-io.mockk-mockk-1.14.11
dependabot-gradle-serverpackcreator-api-develop-org.jetbrains.kotlin-kotlin-test-junit5-2.4.0
dependabot-npm_and_yarn-serverpackcreator-web-frontend-develop-vue-i18n-11.4.6
dependabot-npm_and_yarn-serverpackcreator-web-frontend-develop-globals-17.7.0
dependabot-npm_and_yarn-serverpackcreator-web-frontend-develop-autoprefixer-10.5.2
dependabot-npm_and_yarn-serverpackcreator-web-frontend-develop-vite-plugin-checker-0.14.4
dependabot-github_actions-develop-actions-github-script-9.0.0
dependabot-npm_and_yarn-serverpackcreator-web-frontend-develop-typescript-eslint-8.62.1
dependabot-github_actions-develop-peter-evans-create-pull-request-8.1.1
dependabot-gradle-serverpackcreator-app-develop-org.springframework.boot-spring-boot-starter-web-4.1.0
dependabot-github_actions-develop-actions-cache-6.1.0
dependabot-gradle-serverpackcreator-app-develop-org.springframework.boot-spring-boot-starter-log4j2-4.1.0
dependabot-github_actions-develop-softprops-action-gh-release-3.0.1
dependabot-github_actions-develop-actions-checkout-df4cb1c069e1874edd31b4311f1884172cec0e10
dependabot/npm_and_yarn/serverpackcreator-web-frontend/multi-90c305e17a
dependabot/npm_and_yarn/serverpackcreator-web-frontend/form-data-4.0.6
alpha
dependabot-gradle-serverpackcreator-app-develop-org.junit.jupiter-junit-jupiter-engine-6.0.2
gh-pages
dependabot/npm_and_yarn/serverpackcreator-web-frontend/js-yaml-4.1.1
7.x.x
6.x.x
5.x.x
4.x.x
3.x.x
2.x.x
1.x.x
9.0.0-alpha.6
9.0.0-alpha.5
9.0.0-alpha.2
9.0.0-alpha.3
9.0.0-alpha.4
9.0.0-alpha.1
8.1.2
8.1.1
8.1.1-beta.2
8.1.1-beta.1
8.1.0
8.1.0-beta.3
8.1.0-beta.2
8.1.0-beta.1
8.0.8
8.0.7
8.0.6
8.0.5
8.0.4
8.0.3
8.0.2
8.0.1
8.0.0
8.0.0-beta.3
8.0.0-beta.2
8.0.0-beta.1
8.0.0-alpha.6
8.0.0-alpha.5
8.0.0-alpha.4
8.0.0-alpha.3
8.0.0-alpha.2
8.0.0-alpha.1
7.3.0
7.2.8
7.2.7
7.2.6
7.2.5
7.2.4
7.2.3
7.2.2
7.2.1
7.2.0
7.1.9
7.1.8
7.1.7
7.1.6
7.1.5
7.1.4
7.1.3
7.1.2
7.1.1
7.1.0
7.0.2
7.0.1
7.0.0
7.0.0-beta.5
7.0.0-beta.4
7.0.0-beta.3
7.0.0-beta.2
7.0.0-beta.1
7.0.0-alpha.3
7.0.0-alpha.2
7.0.0-alpha.1
continuous
6.3.11
6.3.10
6.3.9
6.3.8
6.3.7
6.3.6
6.3.5
6.3.4
6.3.3
6.3.2
6.3.1
6.3.0
6.2.1
6.2.0
6.1.1
6.1.0
6.0.0
6.0.0-beta.23
6.0.0-beta.22
6.0.0-beta.21
6.0.0-beta.20
6.0.0-beta.19
6.0.0-beta.18
6.0.0-beta.17
6.0.0-beta.16
6.0.0-beta.15
6.0.0-beta.14
6.0.0-beta.13
6.0.0-beta.12
6.0.0-beta.11
6.0.0-beta.10
6.0.0-beta.9
6.0.0-beta.8
6.0.0-beta.7
6.0.0-beta.6
6.0.0-beta.5
6.0.0-beta.4
6.0.0-beta.3
6.0.0-beta.2
6.0.0-beta.1
6.0.0-alpha.17
6.0.0-alpha.16
6.0.0-alpha.15
6.0.0-alpha.14
6.0.0-alpha.13
6.0.0-alpha.12
6.0.0-alpha.11
6.0.0-alpha.10
6.0.0-alpha.9
5.2.5
6.0.0-alpha.8
5.2.4
6.0.0-alpha.7
6.0.0-alpha.6
6.0.0-alpha.5
6.0.0-alpha.4
6.0.0-alpha.3
6.0.0-alpha.2
6.0.0-alpha.1
5.2.3
5.2.2
5.2.1
5.2.0
5.1.19
5.1.18
5.1.17
5.1.16
5.1.15
5.1.14
5.1.13
5.1.12
5.1.12-beta.4
5.1.12-beta.3
5.1.12-beta.2
5.1.12-beta.1
5.1.12-alpha.8
5.1.12-alpha.7
5.1.12-alpha.6
5.1.12-alpha.5
5.1.12-alpha.4
5.1.12-alpha.3
5.1.12-alpha.2
5.1.12-alpha.1
5.1.11
5.1.10
5.1.9
5.1.8
5.1.7
5.1.6
5.1.5
5.1.4
5.1.3
5.1.2
5.1.1
5.1.0
5.0.1
5.0.0
5.0.0-beta.17
5.0.0-beta.16
5.0.0-beta.15
5.0.0-beta.14
5.0.0-beta.13
5.0.0-beta.12
5.0.0-beta.11
5.0.0-beta.10
5.0.0-beta.9
5.0.0-beta.8
5.0.0-beta.7
5.0.0-beta.6
4.3.2
5.0.0-beta.5
5.0.0-beta.4
5.0.0-beta.3
5.0.0-beta.2
5.0.0-beta.1
5.0.0-alpha.36
5.0.0-alpha.35
5.0.0-alpha.34
5.0.0-alpha.33
5.0.0-alpha.32
5.0.0-alpha.31
5.0.0-alpha.30
5.0.0-alpha.29
5.0.0-alpha.28
5.0.0-alpha.27
5.0.0-alpha.26
4.3.1
5.0.0-alpha.25
5.0.0-alpha.24
5.0.0-alpha.23
4.3.0
5.0.0-alpha.22
5.0.0-alpha.21
4.2.1
5.0.0-alpha.20
4.2.0
5.0.0-alpha.19
5.0.0-alpha.18
5.0.0-alpha.17
5.0.0-alpha.16
4.1.5
5.0.0-alpha.15
4.1.4
5.0.0-alpha.14
4.1.3
5.0.0-alpha.13
4.1.2
5.0.0-alpha.12
5.0.0-alpha.11
4.1.1
4.1.0
4.0.6
5.0.0-alpha.10
5.0.0-alpha.9
5.0.0-alpha.8
5.0.0-alpha.7
5.0.0-alpha.6
4.0.5
5.0.0-alpha.5
5.0.0-alpha.4
5.0.0-alpha.3
5.0.0-alpha.2
5.0.0-alpha.1
4.0.4
4.0.3
4.0.2
4.0.1
4.0.0
4.0.0-beta.5
4.0.0-beta.4
4.0.0-beta.3
4.0.0-beta.2
4.0.0-beta.1
4.0.0-alpha.13
4.0.0-alpha.12
4.0.0-alpha.11
4.0.0-alpha.10
4.0.0-alpha.9
4.0.0-alpha.8
4.0.0-alpha.7
4.0.0-alpha.6
4.0.0-alpha.5
4.0.0-alpha.4
4.0.0-alpha.3
4.0.0-alpha.2
4.0.0-alpha.1
3.15.1
3.15.0
3.15.0-beta.6
3.15.0-beta.5
3.15.0-beta.4
3.15.0-beta.3
3.15.0-beta.2
3.15.0-beta.1
3.14.7
3.14.6
3.14.5
3.14.4
3.14.4-beta.2
3.14.4-beta.1
3.14.3
3.14.2
3.14.1
3.14.0
3.14.0-beta.9
3.14.0-beta.8
3.14.0-beta.7
3.14.0-beta.6
3.14.0-beta.5
3.14.0-beta.4
3.14.0-beta.3
3.14.0-beta.2
3.14.0-beta.1
3.14.0-alpha.4
3.14.0-alpha.3
3.14.0-alpha.2
3.14.0-alpha.1
3.13.0
3.13.0-beta.3
3.13.0-beta.2
3.13.0-beta.1
3.12.0
3.12.0-beta.7
3.12.0-beta.6
3.12.0-beta.5
3.12.0-beta.4
3.12.0-beta.3
3.12.0-beta.2
3.12.0-beta.1
3.11.1
3.11.0
3.10.2
3.10.1
3.10.0
3.9.0
3.8.0
3.7.0
3.6.0
3.5.1
3.5.0
3.5.0-beta.4
3.5.0-beta.3
3.5.0-beta.2
3.5.0-beta.1
3.5.0-alpha.8
3.5.0-alpha.7
3.5.0-alpha.6
3.5.0-alpha.5
3.5.0-alpha.4
3.5.0-alpha.3
3.5.0-alpha.2
3.5.0-alpha.1
3.4.1
3.4.0
3.3.0
3.2.0-beta.1
3.2.0
3.1.0
3.0.1
3.0.0
3.0.0-beta.11
3.0.0-beta.10
3.0.0-beta.9
3.0.0-beta.8
3.0.0-beta.7
3.0.0-beta.6
3.0.0-beta.5
3.0.0-beta.4
3.0.0-beta.3
3.0.0-beta.2
3.0.0-beta.1
3.0.0-alpha.19
3.0.0-alpha.18
3.0.0-alpha.17
3.0.0-alpha.16
3.0.0-alpha.15
3.0.0-alpha.14
3.0.0-alpha.13
3.0.0-alpha.12
3.0.0-alpha.11
3.0.0-alpha.10
3.0.0-alpha.9
3.0.0-alpha.8
3.0.0-alpha.7
3.0.0-alpha.6
3.0.0-alpha.5
3.0.0-alpha.4
3.0.0-alpha.3
3.0.0-alpha.2
3.0.0-alpha.1
2.2.0-alpha.5
2.2.0-alpha.4
2.2.0-alpha.3
2.2.0-alpha.2
2.2.0-alpha.1
2.1.1
2.1.0
2.0.7
2.0.6
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.6.1
1.6.0
1.5.4
1.5.3
1.5.2
1.5.1
Labels
Clear labels
accepted
Feature Ask which got accepted.
bug
Something isn't working
dependencies
Pull requests that update a dependency file
docker
Docker dependency updates
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature, request or improvement
github-actions
GitHub-Actions dependency updates
github_actions
Pull requests that update GitHub Actions code
good first issue
Good for newcomers
gradle
Gradle dependency updates
hacktoberfest-accepted
help wanted
Extra attention is needed
invalid
This doesn't seem right
javascript
Pull requests that update Javascript code
not-an-issue
Not a problem, rather something for documentation purposes
npm
NPM dependency updates
question
Further information is requested
rejected
Feature Ask which got rejected.
wontfix
This will not be worked on
Working on it
Indicates that work is being done on this issue/pr
No labels
accepted
bug
dependencies
docker
documentation
duplicate
enhancement
github-actions
github_actions
good first issue
gradle
hacktoberfest-accepted
help wanted
invalid
javascript
not-an-issue
npm
question
rejected
wontfix
Working on it
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
Griefed/ServerPackCreator#622
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When the pack is created there are two scripts. one to start the forge and another to download minecraft server jar.
Use only start-forge and if the minecraft server jar is missing, then the batch coded needed to retrieve it is run.
Someone requested it on my discord. I've also had code like this before in my own scripts.
For example this is my script to download and install forge server which in it's own function will down the minecraft server jar.
I have
settings.shfile that contains the following, so that the script after will make sense:My main start forge wrapper that I actually use, yours is good for testing tho.
So this last one, if the forge jar is missing, it will install the server so that it won't be missing. This is also why I renamed the forge server.jar to the name of the current folder, so I don't have to edit this wrapper all the time.
I'm not sure how to do this in MS DOS batch, but it can be done relatively easily in PowerShell. Which is what every Windows user should be using now.
This works as expected.
It's a marriage of dos and PowerShell, which is what you're clearly doing.
Meaning, you can slide it right into the top of your start-forge.bat script. And the other thing I provided for the start-forge.sh.
So, update start-forge.sh script would look like this:
and the updated start-forge.bat like this:
Heya Kreezxil,
thanks for putting in so much work on this issue! I'm definitely going to take a closer look at this. Currently busy with #80 🙂
I'll let you know when I start working on this.
Cheers,
Griefed
Yep.
Might as well check for the existence of eula.txt too and if it doesn't exist create a file with one line
Right before running the server.
Basically, what the Minecraft server hosting companies do.
=== Thus ===
Linux (start-forge.sh)
Dos/PS (start-forge.bat)
Right, that's all I can think of, implementing these on my side manually on each new server pack release.
Might also be a good idea to add a check for the forge/fabric jars, so if a user does not let ServerPackCreator install the server, the script can handle that, too.
yep, I was just concentrating on what I know.
On Fri, Oct 1, 2021 at 2:29 PM Griefed @.***> wrote:
So, for the bash-script for Forge I've now got this:
-sbecause it also checks whether the file is greater than zero.Now for the batch/ps script.
Batch script for Forge:
Needless to say the Java args will be set by ServerPackCreator. That's just a placeholder, much like the download links, Minecraft and Forge versions.
Looking good, EPIC attribute has increased by 10
That's the Forge Windows and Linux script templates pretty much done.
Now we're just missing the Fabric Windows and Linux templates and finally the implementation of these new scripts in ServerPackCreator.
Also, question: Since we are combining the scripts, thus replacing the download scripts. it would make sense to remove the option "Generate start-scripts" and have ServerPackCreator always generate said scripts for every server pack.
Otherwise we run into the issue of people not knowing how to get their Minecraft server-jar when they downloaded a server pack zip-archive generated by ServerPackCreator.
Thoughts?
sounds good. and yeah I tested what MDS pointed out and that was definitely
a thing about the args and what not for 1.17.1
On Tue, Oct 5, 2021 at 12:38 PM Griefed @.***> wrote:
Fabric batch script:
Fabric shell:
looking good
On Sun, Oct 10, 2021 at 7:05 AM Griefed @.***> wrote:
Will be available in the next alpha release (or from the test pipeline if you so desire). scripts will no longer be called
start-<modloader>.bat|shbut ratherstart.bat|shinstead, now.nice
On Sun, Oct 10, 2021 at 11:55 AM Griefed @.***> wrote:
See alpha.7